summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander <emu.sas@gmail.com>2022-03-26 22:52:24 +0300
committerGitHub <noreply@github.com>2022-03-26 20:52:24 +0100
commit6fe0cff342e701aabc069a9b2ea2ec2d26006f8b (patch)
tree8c9498af6db3c789033b664f8088735afc483744
parent5f75f9886d4458c5b08ae7f98a20f85415c3d706 (diff)
downloadmatterbridge-msglm-6fe0cff342e701aabc069a9b2ea2ec2d26006f8b.tar.gz
matterbridge-msglm-6fe0cff342e701aabc069a9b2ea2ec2d26006f8b.tar.bz2
matterbridge-msglm-6fe0cff342e701aabc069a9b2ea2ec2d26006f8b.zip
Use slack real name as user name (slack) (#1775)
* Use slack real name as user name * Change slack option UseRealName to UseFullName
-rw-r--r--bridge/slack/helpers.go3
-rw-r--r--matterbridge.toml.sample4
2 files changed, 7 insertions, 0 deletions
diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go
index c970b0d7..bdacd7ee 100644
--- a/bridge/slack/helpers.go
+++ b/bridge/slack/helpers.go
@@ -87,6 +87,9 @@ func (b *Bslack) populateMessageWithUserInfo(ev *slack.MessageEvent, rmsg *confi
if user.Profile.DisplayName != "" {
rmsg.Username = user.Profile.DisplayName
}
+ if b.GetBool("UseFullName") && user.Profile.RealName != "" {
+ rmsg.Username = user.Profile.RealName
+ }
return nil
}
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index 54768a1e..a0fa7c0b 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -862,6 +862,10 @@ ShowUserTyping=false
#Default "<clipped message>"
MessageClipped="<clipped message>"
+#If enabled use the slack "Real Name" as username.
+#OPTIONAL (default false)
+UseFullName=false
+
###################################################################
#discord section
###################################################################