From c4c2e80182b898dbddd62127267e69703764a053 Mon Sep 17 00:00:00 2001 From: Ashfame Date: Tue, 21 Nov 2023 20:52:29 +0400 Subject: [PATCH 1/2] prefer slack real name on matrix side as opposed to display name --- src/SlackGhost.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SlackGhost.ts b/src/SlackGhost.ts index cea94253..991f9e1c 100644 --- a/src/SlackGhost.ts +++ b/src/SlackGhost.ts @@ -147,9 +147,9 @@ export class SlackGhost { throw Error('No intent associated with ghost'); } let changed = false; - if (slackUser.profile.display_name && this.displayName !== slackUser.profile.display_name) { - await this._intent.setDisplayName(slackUser.profile.display_name); - this.displayname = slackUser.profile.display_name; + if (slackUser.profile.real_name && this.displayName !== slackUser.profile.real_name) { + await this._intent.setDisplayName(slackUser.profile.real_name); + this.displayname = slackUser.profile.real_name; changed = true; } From 1e237e185acd7d09af0962d321ac91ac7250f293 Mon Sep 17 00:00:00 2001 From: Ashfame Date: Tue, 21 Nov 2023 21:10:19 +0400 Subject: [PATCH 2/2] update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 7ccf340c..e665d220 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ In addition to all features of the upstream bridge, this fork adds the following - Define `rooms` field under teamsync config for who should be the creator, mods and admins in new rooms created by team sync. - Tweak message that gets posted in a new channel to suggest inviting `matrixbridge` Slack app. - Notify admins in admin room for bridge when bridge initialises upon boot, when a Slack channel is created/archived/deleted and unlinking of bridge fails upon channel archive/delete event. +- When user is synced, Slack's real name is preferred over display name and updated on user's profile on Matrix ## Usage