diff options
author | dolfies <jeyalfie47@gmail.com> | 2023-07-07 20:37:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-08 02:37:32 +0200 |
commit | 2db0e71e5bdc10f0654f3a4874d7f65717a92e71 (patch) | |
tree | 023b2d0c961c40ba1ae4cc677adc28cc9e915e49 /src/plugins/relationshipNotifier/utils.ts | |
parent | cde8074f4417de18979dd8ba793214b5b6ada715 (diff) | |
download | Vencord-2db0e71e5bdc10f0654f3a4874d7f65717a92e71.tar.gz Vencord-2db0e71e5bdc10f0654f3a4874d7f65717a92e71.tar.bz2 Vencord-2db0e71e5bdc10f0654f3a4874d7f65717a92e71.zip |
fix(RelationshipNotifier): Ignore user-actioned friend requests (#1390)
Diffstat (limited to 'src/plugins/relationshipNotifier/utils.ts')
-rw-r--r-- | src/plugins/relationshipNotifier/utils.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/relationshipNotifier/utils.ts b/src/plugins/relationshipNotifier/utils.ts index d5fd1da..5de9d75 100644 --- a/src/plugins/relationshipNotifier/utils.ts +++ b/src/plugins/relationshipNotifier/utils.ts @@ -80,7 +80,10 @@ export async function syncAndRunChecks() { if (settings.store.friendRequestCancels && oldFriends?.requests?.length) { for (const id of oldFriends.requests) { - if (friends.requests.includes(id)) continue; + if ( + friends.requests.includes(id) || + [RelationshipType.FRIEND, RelationshipType.BLOCKED, RelationshipType.OUTGOING_REQUEST].includes(RelationshipStore.getRelationshipType(id)) + ) continue; const user = await UserUtils.fetchUser(id).catch(() => void 0); if (user) @@ -164,7 +167,7 @@ export async function syncFriends() { case RelationshipType.FRIEND: friends.friends.push(id); break; - case RelationshipType.FRIEND_REQUEST: + case RelationshipType.INCOMING_REQUEST: friends.requests.push(id); break; } |