Skip to content

Commit a94731d

Browse files
committed
possible notification links
1 parent 5079a73 commit a94731d

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

docs/old-docs/boilerplate/Notifications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ curl -X POST -H "Authorization: key=SERVER_KEY" -H "Content-Type: application/js
3030
"notification": {
3131
"title": "Web Push Notifications",
3232
"body": "Hey, Hello World",
33-
"click_action": "https://mywebsite.ccom"
33+
"click_action": "https://mywebsite.com"
3434
},
3535
"to": "USER_TOKEN"
3636
}' "https://fcm.googleapis.com/fcm/send"

src/event/event.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export class EventService {
9494
await this.notificationService.sendPushToUser(event.createdBy.id, {
9595
title: `${(user.firstName || user.username)} RSVP'd ${rsvp}.`,
9696
body: `to ${event.name}`,
97-
click_action: `event/${eventId}`,
97+
click_action: `tabs/event/${eventId}`,
9898
});
9999

100100
return userEvent;
@@ -117,7 +117,7 @@ export class EventService {
117117
await this.notificationService.sendPushToUser(invitee.id, {
118118
title: `You're invited to "${event.name}" event.`,
119119
body: `View the invite.`,
120-
click_action: `event/${eventId}`,
120+
click_action: `tabs/event/${eventId}`,
121121
});
122122
return joinUserEvent;
123123
}
@@ -166,7 +166,7 @@ export class EventService {
166166
await this.notificationService.sendPushToUser(event?.createdBy?.id, {
167167
title: `You're invited to "${event.name}" event.`,
168168
body: `View the invite.`,
169-
click_action: `event/${event?.id}`,
169+
click_action: `tabs/event/${event?.id}`,
170170
});
171171

172172
return joinUserEvent;
@@ -230,7 +230,7 @@ export class EventService {
230230
j.user.id,
231231
{ title: `"${event.name}" has been updated`,
232232
body: `View the event to see changes.`,
233-
click_action: `event/${event?.id}`,
233+
click_action: `tabs/event/${event?.id}`,
234234
}
235235
)
236236
);

src/hub/hub-activity/hub-activity.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class HubActivityService {
7979
await this.notificationService.sendPushToUser(joinUserHub.user.id, {
8080
title: `"${hub.name}" hub became active`,
8181
body: `Touch to go to hub.`,
82-
click_action: '',
82+
click_action: `tabs/hub/${hub?.id}`,
8383
} as PushNotificationDto);
8484

8585
await this.notificationService.addInAppNotificationForUser(
@@ -89,7 +89,7 @@ export class HubActivityService {
8989
header: `"${hub.name}" hub became active`,
9090
text: `Touch to go to hub.`,
9191
date: Date.now().toString(),
92-
actionLink: undefined,
92+
actionLink: `tabs/hub/${hub?.id}`,
9393
},
9494
);
9595
}

src/hub/hub-geofence/hub-geofence.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class HubGeofenceService {
107107
if (!relation.muted) {
108108
await this.notificationService.sendPushToUser(relation.user.id, {
109109
title: message,
110-
click_action: undefined,
110+
click_action: `tabs/hub/${hub?.id}`,
111111
body: `at the "${hub.name}" hub.`,
112112
});
113113
}
@@ -130,7 +130,7 @@ export class HubGeofenceService {
130130
if (!relation.muted) {
131131
await this.notificationService.sendPushToUser(relation.user.id, {
132132
title: message,
133-
click_action: undefined,
133+
click_action: `tabs/hub/${hub?.id}`,
134134
body: `the "${hub.name}" hub`,
135135
});
136136
}

src/hub/hub-invite/hub-invite.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ export class HubInviteService {
136136
header: `${invitee.firstName} accepted invite`,
137137
text: `to "${hub.name}" hub.`,
138138
date: Date.now().toString(),
139-
actionLink: null,
139+
actionLink: `tabs/hub/${hub?.id}`,
140140
});
141141

142142
await this.notificationService.sendPushToUser(invitee.id, {
143143
title: `${invitee.firstName} accepted invite`,
144144
body: `to "${hub.name}" hub.`,
145-
click_action: null,
145+
click_action: `tabs/hub/${hub?.id}`,
146146
});
147147

148148
return newRelationship;

src/hub/hub.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,14 @@ export class HubService {
274274
text: `By ${user.firstName} ${user.lastName}`,
275275
date: Date.now().toString(),
276276
thumbnail: (await hub.coverImage.load()).fileName,
277-
actionLink: undefined,
277+
actionLink: `tabs/hub/${hub?.id}`,
278278
},
279279
);
280280

281281
await this.notificationService.sendPushToUser(relationship.user.id, {
282282
title: `${hub.name} had its location changed.`,
283283
body: `By ${user.firstName} ${user.lastName}`,
284-
click_action: undefined,
284+
click_action: `tabs/hub/${hub?.id}`,
285285
});
286286
}
287287

0 commit comments

Comments
 (0)