mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 17:43:08 -04:00
Fix some plugins displaying legacy discriminators (username#0000)
This commit is contained in:
parent
214c101740
commit
d7ac418e05
8 changed files with 71 additions and 35 deletions
|
@ -16,6 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { getUniqueUsername, openUserProfile } from "@utils/discord";
|
||||
import { UserUtils } from "@webpack/common";
|
||||
|
||||
import settings from "./settings";
|
||||
|
@ -43,11 +44,19 @@ export async function onRelationshipRemove({ relationship: { type, id } }: Relat
|
|||
switch (type) {
|
||||
case RelationshipType.FRIEND:
|
||||
if (settings.store.friends)
|
||||
notify(`${user.tag} removed you as a friend.`, user.getAvatarURL(undefined, undefined, false));
|
||||
notify(
|
||||
`${getUniqueUsername(user)} removed you as a friend.`,
|
||||
user.getAvatarURL(undefined, undefined, false),
|
||||
() => openUserProfile(user.id)
|
||||
);
|
||||
break;
|
||||
case RelationshipType.FRIEND_REQUEST:
|
||||
if (settings.store.friendRequestCancels)
|
||||
notify(`A friend request from ${user.tag} has been removed.`, user.getAvatarURL(undefined, undefined, false));
|
||||
notify(
|
||||
`A friend request from ${getUniqueUsername(user)} has been removed.`,
|
||||
user.getAvatarURL(undefined, undefined, false),
|
||||
() => openUserProfile(user.id)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue