Skip to content

Commit

Permalink
Merge pull request #63 from Qabel/m/fix-fcm
Browse files Browse the repository at this point in the history
Remove message from body due to length limits
  • Loading branch information
audax authored Aug 8, 2016
2 parents 78ce350 + 122f3f4 commit 2998ac6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drop_service/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def notify(self, drop):
def _notify(self, drop):
data = {
'drop-id': drop.drop_id,
'message': base64.b64encode(drop.message).decode(),
# 'message': base64.b64encode(drop.message).decode(),
}
# Alphabet of topics: [a-zA-Z0-9-_.~%]
# Alphabet of drop IDs: [a-zA-Z0-9-_]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ djangorestframework==3.3.3
pytest-django==2.9.1
invoke==0.13.0
pprintpp==0.2.3
pyfcm==1.0.0
pyfcm==1.0.2
1 change: 0 additions & 1 deletion tests/test_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def test_fcm_basic(drop_messages):
fcm.notify(drop1)

data_message = {
'message': 'SGVsbG8gV29ybGQ=',
'drop-id': 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopo'
}
api.notify_topic_subscribers.assert_called_once_with(topic_name=drop1.drop_id, data_message=data_message)

0 comments on commit 2998ac6

Please sign in to comment.