equal
deleted
inserted
replaced
59 pass |
59 pass |
60 else: |
60 else: |
61 action = message.get('action') |
61 action = message.get('action') |
62 if action == 'notify': |
62 if action == 'notify': |
63 # dispatch notification to subscribers |
63 # dispatch notification to subscribers |
64 json_message = json.dumps(message) |
64 target = message.get('target', {}).get('principals', ()) |
65 target = message.get('target').get('principals', ()) |
65 clean_message = message.copy() |
|
66 clean_message.pop('target') |
|
67 json_message = json.dumps(clean_message) |
66 for connection, subscription in users.items(): |
68 for connection, subscription in users.items(): |
67 if subscription.filter_target(target): |
69 if subscription.filter_target(target): |
68 yield from connection.send(json_message) |
70 yield from connection.send(json_message) |
69 # store message in memcached_queue |
71 # store message in memcached_queue |
70 if cache_handler is not None: |
72 if cache_handler is not None: |