mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
fix userutils (#1861)
This commit is contained in:
parent
788d22f9e9
commit
2478ffb695
6 changed files with 8 additions and 10 deletions
|
@ -37,7 +37,7 @@ export async function onRelationshipRemove({ relationship: { type, id } }: Relat
|
|||
return;
|
||||
}
|
||||
|
||||
const user = await UserUtils.fetchUser(id)
|
||||
const user = await UserUtils.getUser(id)
|
||||
.catch(() => null);
|
||||
if (!user) return;
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ export async function syncAndRunChecks() {
|
|||
for (const id of oldFriends.friends) {
|
||||
if (friends.friends.includes(id)) continue;
|
||||
|
||||
const user = await UserUtils.fetchUser(id).catch(() => void 0);
|
||||
const user = await UserUtils.getUser(id).catch(() => void 0);
|
||||
if (user)
|
||||
notify(
|
||||
`You are no longer friends with ${getUniqueUsername(user)}.`,
|
||||
|
@ -85,7 +85,7 @@ export async function syncAndRunChecks() {
|
|||
[RelationshipType.FRIEND, RelationshipType.BLOCKED, RelationshipType.OUTGOING_REQUEST].includes(RelationshipStore.getRelationshipType(id))
|
||||
) continue;
|
||||
|
||||
const user = await UserUtils.fetchUser(id).catch(() => void 0);
|
||||
const user = await UserUtils.getUser(id).catch(() => void 0);
|
||||
if (user)
|
||||
notify(
|
||||
`Friend request from ${getUniqueUsername(user)} has been revoked.`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue