Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for event_id_only push format #2450

Merged
merged 3 commits into from Sep 18, 2017

Conversation

Projects
None yet
3 participants
Member

dbkr commented Sep 18, 2017

Param in the data dict of a pusher that tells an HTTP pusher to
send just the event_id of the event it's notifying about and the
notification counts. For clients that want to go & fetch the body
of the event themselves anyway.

Add support for event_id_only push format
Param in the data dict of a pusher that tells an HTTP pusher to
send just the event_id of the event it's notifying about and the
notification counts. For clients that want to go & fetch the body
of the event themselves anyway.
synapse/push/httppusher.py
@@ -244,6 +244,25 @@ def _process_one(self, push_action):
@defer.inlineCallbacks
def _build_notification_dict(self, event, tweaks, badge):
+ if 'format' in self.data and self.data['format'] == 'event_id_only':
@erikjohnston

erikjohnston Sep 18, 2017

Owner

I'd tend to just do if self.data.get("format") == "event_id_only":

erikjohnston requested changes Sep 18, 2017 edited

Can we also include the room id? I'm thinking it may be useful for future things (especially for APIs that take room ID and event ID)

dbkr added some commits Sep 18, 2017

Also include the room_id
as really it's part of the event ID

@dbkr dbkr merged commit 862c8da into develop Sep 18, 2017

6 of 8 checks passed

Sytest Dendron (Commit) Build #2574 origin/dbkr/push_event_id_only failed in 5 min 22 sec
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #3406 origin/dbkr/push_event_id_only succeeded in 4 min 46 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #3499 origin/dbkr/push_event_id_only succeeded in 1 min 44 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

dbkr added a commit to matrix-org/sygnal that referenced this pull request Sep 19, 2017

@dbkr dbkr referenced this pull request in matrix-org/sygnal Sep 19, 2017

Merged

Support format=event_id_only #22

rubo77 commented Sep 25, 2017 edited

What does this pr do? (Can you explain for a non programmer please?)

@dbkr dbkr deleted the dbkr/push_event_id_only branch Oct 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment