summary refs log tree commit diff
path: root/src/connections
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@protonmail.com>2023-05-06 01:11:37 -0400
committerPuyodead1 <puyodead@protonmail.com>2023-12-23 16:35:01 -0500
commit0939236cc0aed4449621040d00a917c05efb3cef (patch)
tree6ec34e441390fed58692f78e41a0f28c7bb65055 /src/connections
parentrename handle to tag (diff)
downloadserver-ts-0939236cc0aed4449621040d00a917c05efb3cef.tar.xz
remove display_name
Diffstat (limited to 'src/connections')
-rw-r--r--src/connections/Discord/index.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/connections/Discord/index.ts b/src/connections/Discord/index.ts

index 206aa671..a88a38ce 100644 --- a/src/connections/Discord/index.ts +++ b/src/connections/Discord/index.ts
@@ -17,6 +17,7 @@ */ import { + Config, ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, Connection, @@ -31,8 +32,7 @@ interface UserResponse { id: string; username: string; discriminator: string; - global_name: string; - display_name?: string; + global_name: string | null; avatar_url: string | null; } @@ -130,12 +130,14 @@ export default class DiscordConnection extends Connection { if (exists) return null; - // TODO: pomelo + const { pomeloEnabled } = Config.get().general; return await this.createConnection({ user_id: userId, external_id: userInfo.id, friend_sync: params.friend_sync, - name: `${userInfo.username}#${userInfo.discriminator}`, + name: pomeloEnabled + ? userInfo.username + : `${userInfo.username}#${userInfo.discriminator}`, type: this.id, }); }