Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 853eb1e

Browse files
committed
Include the user_id when pushing to sygnal
1 parent b587462 commit 853eb1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

synapse/push/httppusher.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def __init__(self, hs: "HomeServer", pusher_config: PusherConfig):
8888
pusher_config.app_id,
8989
pusher_config.pushkey,
9090
)
91+
# Beeper: Save this so we can pass this on to Sygnal as well
92+
self.user_name = pusher_config.user_name
9193

9294
# Validate that there's a URL and it is of the proper form.
9395
if "url" not in self.data:
@@ -345,6 +347,7 @@ async def _build_notification_dict(
345347
"pushkey": self.pushkey,
346348
"pushkey_ts": int(self.pushkey_ts / 1000),
347349
"data": self.data_minus_url,
350+
"user_id": self.user_id,
348351
}
349352
],
350353
}
@@ -372,6 +375,7 @@ async def _build_notification_dict(
372375
"pushkey_ts": int(self.pushkey_ts / 1000),
373376
"data": self.data_minus_url,
374377
"tweaks": tweaks,
378+
"user_id": self.user_id,
375379
}
376380
],
377381
}
@@ -435,6 +439,7 @@ async def _send_badge(self, badge: int) -> None:
435439
"pushkey": self.pushkey,
436440
"pushkey_ts": int(self.pushkey_ts / 1000),
437441
"data": self.data_minus_url,
442+
"user_id": self.user_id,
438443
}
439444
],
440445
}

0 commit comments

Comments
 (0)