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

Commit 3ae02c0

Browse files
committed
push: namespace user_id and put in root notification JSON rather than devices
Signed-off-by: Sumner Evans <sumner@beeper.com>
1 parent f6cbe6e commit 3ae02c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

synapse/push/httppusher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,14 @@ async def _build_notification_dict(
376376
"unread": badge,
377377
"com.beeper.server_type": "synapse",
378378
},
379+
"com.beeper.user_id": self.user_id,
379380
"prio": priority,
380381
"devices": [
381382
{
382383
"app_id": self.app_id,
383384
"pushkey": self.pushkey,
384385
"pushkey_ts": int(self.pushkey_ts / 1000),
385386
"data": self.data_minus_url,
386-
"user_id": self.user_id,
387387
}
388388
],
389389
}
@@ -407,14 +407,14 @@ async def _build_notification_dict(
407407
"com.beeper.server_type": "synapse",
408408
# 'missed_calls': 2
409409
},
410+
"com.beeper.user_id": self.user_id,
410411
"devices": [
411412
{
412413
"app_id": self.app_id,
413414
"pushkey": self.pushkey,
414415
"pushkey_ts": int(self.pushkey_ts / 1000),
415416
"data": self.data_minus_url,
416417
"tweaks": tweaks,
417-
"user_id": self.user_id,
418418
}
419419
],
420420
}
@@ -475,13 +475,13 @@ async def _send_badge(self, badge: int) -> None:
475475
"unread": badge,
476476
"com.beeper.server_type": "synapse",
477477
},
478+
"com.beeper.user_id": self.user_id,
478479
"devices": [
479480
{
480481
"app_id": self.app_id,
481482
"pushkey": self.pushkey,
482483
"pushkey_ts": int(self.pushkey_ts / 1000),
483484
"data": self.data_minus_url,
484-
"user_id": self.user_id,
485485
}
486486
],
487487
}

0 commit comments

Comments
 (0)