mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 07:22:15 -04:00
Send room name and first alias in notification poke.
This commit is contained in:
parent
e3e2fc3255
commit
2ca2dbc821
3 changed files with 61 additions and 3 deletions
|
@ -61,6 +61,19 @@ class Pusher(object):
|
|||
return False
|
||||
return True
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_context_for_event(self, ev):
|
||||
name_aliases = yield self.store.get_room_name_and_aliases(
|
||||
ev['room_id']
|
||||
)
|
||||
|
||||
ctx = {'aliases': name_aliases[1]}
|
||||
if name_aliases[0] is not None:
|
||||
ctx['name'] = name_aliases[0]
|
||||
|
||||
defer.returnValue(ctx)
|
||||
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def start(self):
|
||||
if not self.last_token:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue