| |
@@ -90,7 +90,10 @@
|
| |
}))
|
| |
|
| |
# Handle Hubs changes
|
| |
- if topic.endswith('.hubs.hub.created'):
|
| |
+ env_topic_prefix = ".".join([
|
| |
+ fedmsg_config["topic_prefix"], fedmsg_config["environment"]
|
| |
+ ])
|
| |
+ if topic == env_topic_prefix + '.hubs.hub.created':
|
| |
hub = hubs.models.Hub.query.get(msg["msg"]["hub_id"])
|
| |
if hub is not None:
|
| |
yield retask.task.Task(json.dumps({
|
| |
@@ -98,7 +101,7 @@
|
| |
'hub': hub.id,
|
| |
'created': True,
|
| |
}))
|
| |
- if topic.endswith('.hubs.user.created'):
|
| |
+ if topic == env_topic_prefix + '.hubs.user.created':
|
| |
username = msg["msg"]["username"]
|
| |
user = hubs.models.User.query.get(username)
|
| |
if user is not None:
|
| |
@@ -107,7 +110,7 @@
|
| |
'username': username,
|
| |
'created': True,
|
| |
}))
|
| |
- if topic.endswith('.hubs.widget.updated'):
|
| |
+ if topic == env_topic_prefix + '.hubs.widget.updated':
|
| |
widget = hubs.models.Widget.query.get(msg["msg"]["widget_id"])
|
| |
if widget is not None:
|
| |
widget_will_reload = False
|
| |
Fixes 558