ignore self invites

This commit is contained in:
Natsumi
2020-11-20 02:13:56 +13:00
committed by pypy
parent e0fb98d86c
commit 63e3f45161
2 changed files with 9 additions and 9 deletions

View File

@@ -3463,11 +3463,13 @@ import gameLogService from './service/gamelog.js'
var { data } = this.notificationTable;
for (i = 0; i < data.length; i++) {
var ctx = data[i];
arr.push({
...ctx,
isFriend: this.friends.has(ctx.senderUserId),
isFavorite: API.cachedFavoritesByObjectId.has(ctx.senderUserId)
});
if (ctx.senderUserId !== API.currentUser.id) {
arr.push({
...ctx,
isFriend: this.friends.has(ctx.senderUserId),
isFavorite: API.cachedFavoritesByObjectId.has(ctx.senderUserId)
});
}
}
arr.sort(function (a, b) {
if (a.created_at < b.created_at) {