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

Add support for event_id_only push format #2450

Merged
merged 3 commits into from
Sep 18, 2017
Merged

Conversation

dbkr
Copy link
Member

@dbkr 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.

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.
@@ -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':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dbkr merged commit 862c8da into develop Sep 18, 2017
dbkr added a commit to matrix-org/sygnal that referenced this pull request Sep 19, 2017
@rubo77
Copy link
Contributor

rubo77 commented Sep 25, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants