mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 09:57:08 -04:00
RelationShipNotifier: try to fix false positives for unavailable guilds
This commit is contained in:
parent
ca810250d1
commit
e79430ca84
2 changed files with 12 additions and 3 deletions
|
@ -21,7 +21,7 @@ import { UserUtils } from "@webpack/common";
|
|||
|
||||
import settings from "./settings";
|
||||
import { ChannelDelete, ChannelType, GuildDelete, RelationshipRemove, RelationshipType } from "./types";
|
||||
import { deleteGroup, deleteGuild, getGroup, getGuild, notify } from "./utils";
|
||||
import { deleteGroup, deleteGuild, getGroup, getGuild, GuildAvailabilityStore, notify } from "./utils";
|
||||
|
||||
let manuallyRemovedFriend: string | undefined;
|
||||
let manuallyRemovedGuild: string | undefined;
|
||||
|
@ -63,7 +63,7 @@ export async function onRelationshipRemove({ relationship: { type, id } }: Relat
|
|||
|
||||
export function onGuildDelete({ guild: { id, unavailable } }: GuildDelete) {
|
||||
if (!settings.store.servers) return;
|
||||
if (unavailable) return;
|
||||
if (unavailable || GuildAvailabilityStore.isUnavailable(id)) return;
|
||||
|
||||
if (manuallyRemovedGuild === id) {
|
||||
deleteGuild(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue