mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
revert 5db09e9
This commit is contained in:
@@ -364,56 +364,40 @@ export const useSharedFeedStore = defineStore('SharedFeed', () => {
|
||||
}
|
||||
// BlockedOnPlayerJoined, BlockedOnPlayerLeft, MutedOnPlayerJoined, MutedOnPlayerLeft
|
||||
if (ctx.type === 'OnPlayerJoined' || ctx.type === 'OnPlayerLeft') {
|
||||
if (
|
||||
ctx.userId &&
|
||||
!moderationStore.cachedPlayerModerationsUserIds.has(
|
||||
ctx.userId
|
||||
)
|
||||
) {
|
||||
// no moderation for this userId, skip
|
||||
} else {
|
||||
for (var ref of moderationStore.cachedPlayerModerations.values()) {
|
||||
if (
|
||||
ref.targetDisplayName !== ctx.displayName &&
|
||||
ref.sourceUserId !== ctx.userId
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = '';
|
||||
if (ref.type === 'block') {
|
||||
type = `Blocked${ctx.type}`;
|
||||
} else if (ref.type === 'mute') {
|
||||
type = `Muted${ctx.type}`;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
const entry = {
|
||||
created_at: ctx.created_at,
|
||||
type,
|
||||
displayName: ref.targetDisplayName,
|
||||
userId: ref.targetUserId,
|
||||
isFriend,
|
||||
isFavorite
|
||||
};
|
||||
if (
|
||||
wristFilter[type] &&
|
||||
(wristFilter[type] === 'Everyone' ||
|
||||
(wristFilter[type] === 'Friends' && isFriend) ||
|
||||
(wristFilter[type] === 'VIP' && isFavorite))
|
||||
) {
|
||||
wristArr.unshift(entry);
|
||||
const entryTime = Date.parse(entry.created_at);
|
||||
if (
|
||||
!earliestKeptTime ||
|
||||
entryTime < earliestKeptTime
|
||||
) {
|
||||
earliestKeptTime = entryTime;
|
||||
}
|
||||
}
|
||||
notificationStore.queueGameLogNoty(entry);
|
||||
for (var ref of moderationStore.cachedPlayerModerations.values()) {
|
||||
if (
|
||||
ref.targetDisplayName !== ctx.displayName &&
|
||||
ref.sourceUserId !== ctx.userId
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = '';
|
||||
if (ref.type === 'block') {
|
||||
type = `Blocked${ctx.type}`;
|
||||
} else if (ref.type === 'mute') {
|
||||
type = `Muted${ctx.type}`;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
const entry = {
|
||||
created_at: ctx.created_at,
|
||||
type,
|
||||
displayName: ref.targetDisplayName,
|
||||
userId: ref.targetUserId,
|
||||
isFriend,
|
||||
isFavorite
|
||||
};
|
||||
if (
|
||||
wristFilter[type] &&
|
||||
(wristFilter[type] === 'Everyone' ||
|
||||
(wristFilter[type] === 'Friends' && isFriend) ||
|
||||
(wristFilter[type] === 'VIP' && isFavorite))
|
||||
) {
|
||||
wristArr.unshift(entry);
|
||||
}
|
||||
notificationStore.queueGameLogNoty(entry);
|
||||
}
|
||||
}
|
||||
// when too many user joins happen at once when switching instances
|
||||
|
||||
Reference in New Issue
Block a user