-
-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
notif: Separate ids in pm_users for group PMs with ',' instead of ', '.
', ' would have been handled correctly, but seemingly by accident; in getNarrowFromNotificationData, pm_users was split on ',' to give ['1', ' 2', ' 3'] (note the spaces), then + was used on elements of that array, as in +idStrs[i], to convert to a number. Also, replace the confusing + syntax with parseInt.
- Loading branch information
Chris Bobbe
committed
Feb 21, 2020
1 parent
299d6fc
commit 92bee0e
Showing
4 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ describe('getNarrowFromNotificationData', () => { | |
test('on notification for a group message returns a group narrow', () => { | ||
const notification = { | ||
recipient_type: 'private', | ||
pm_users: '1, 2, 4', | ||
pm_users: '1,2,4', | ||
}; | ||
const usersById = new Map([ | ||
[1, { email: '[email protected]' }], | ||
|
@@ -47,7 +47,7 @@ describe('getNarrowFromNotificationData', () => { | |
test('do not throw when users are not found; return null', () => { | ||
const notification = { | ||
recipient_type: 'private', | ||
pm_users: '1, 2, 4', | ||
pm_users: '1,2,4', | ||
}; | ||
const usersById = new Map(); | ||
|
||
|
This file contains 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