mirror of https://github.com/mastodon/mastodon.git
Fix duplicate accounts in a group
parent
e92c2b9a96
commit
4e5768ed5e
|
@ -133,7 +133,11 @@ export const notificationsGroupsReducer =
|
||||||
if (existingGroupIndex > -1) {
|
if (existingGroupIndex > -1) {
|
||||||
const existingGroup = state.groups[existingGroupIndex];
|
const existingGroup = state.groups[existingGroupIndex];
|
||||||
|
|
||||||
if (existingGroup && existingGroup.type !== 'gap') {
|
if (
|
||||||
|
existingGroup &&
|
||||||
|
existingGroup.type !== 'gap' &&
|
||||||
|
!existingGroup.sampleAccountsIds.includes(notification.account.id) // This can happen for example if you like, then unlike, then like again the same post
|
||||||
|
) {
|
||||||
// Update the existing group
|
// Update the existing group
|
||||||
if (
|
if (
|
||||||
existingGroup.sampleAccountsIds.unshift(notification.account.id) >
|
existingGroup.sampleAccountsIds.unshift(notification.account.id) >
|
||||||
|
|
Loading…
Reference in New Issue