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,
});
}
|