Created
March 13, 2017 09:33
-
-
Save bezysoftware/2fe86d83ca623c98764cddef056d0a34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function createRawPayload(userName: string, groupName: string, groupId: string, change: Change) | |
| { | |
| let payload = | |
| { | |
| data: | |
| { | |
| "by" : userName, | |
| "action" : change.action, | |
| "entity" : change.entity, | |
| "groupId" : groupId, | |
| "groupName" : groupName | |
| } | |
| }; | |
| return payload; | |
| } | |
| function createIosPayload(userName: string, groupName: string, change: Change) | |
| { | |
| let payload = | |
| { | |
| body_loc_key : `notification_body_${change.entity}_${change.action}`, | |
| body_loc_args : [ userName, change.entityName ], | |
| title_loc_key : 'notification_title', | |
| title_loc_args : [ groupName ] | |
| }; | |
| return payload; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment