Matterbridge: {NICK} Uses Matrix Username, Not Nickname

Created on 30 May 2018  路  3Comments  路  Source: 42wim/matterbridge

Describe the bug
When bridging a matrix room, the user's username is displayed on other platforms rather than their nickname.

To Reproduce
Bridge matrix with another platform, change your nickname to be different from your username.

Expected behavior
Bridge should use the nickname for the {NICK} formatting option.

Screenshots/debug logs
Riot: screenshot_20180530_135738
Discord: screenshot_20180530_135806

Environment (please complete the following information):

  • OS: Debian 9
  • Matterbridge version: version: 1.10.1 dba259e

Additional context

[discord.unix]                                                                                                                                                                               
Token=redacted                                                                                                                         
Server=redacted                                                                                                                                                                          
WebhookURL=redacted                                               
RemoteNickFormat="{NICK}"                                                                                                                                                                    

[discord.uofft]                                                                                                                                                                              
Token=redacted                                                                                                                         
Server=redacted                                                                                                                                                                      
WebhookURL=redacted                                                  
RemoteNickFormat="{NICK}"                                                                                                                                                                    

[discord.bnet]                                                                                                                                                                                                                                                                                                       
Token=redacted                                                                                                                  
Server=redacted                                                                                                                                                               
WebhookURL=redacted                                                
RemoteNickFormat="{NICK} [{PROTOCOL}]"                                                                                                                                                       

[discord.landfill]                                                                                                                                                                           
Token=redacted                                                                                                                        
Server=redacted                                                                                                                                                                      
WebhookURL=redacted                                                   
RemoteNickFormat="{NICK}"                                                                                                                                                                    

[xmpp.at]                                                                                                                                                                                    
Server="xmpp.is:5222"
#Jid your userid
Jid=redacted
Password=redacted
Muc=redacted
Nick=redacted
RemoteNickFormat="[{PROTOCOL}] {NICK}: "
ReplaceMessages=[ ["@everyone","@everyone"], ["@here","@here"] ]

[matrix.org]
#Server is your homeserver (eg https://matrix.org)
Server="https://matrix.org"

#login/pass of your bot.
#Use a dedicated user for this and not your own!
#Messages sent from this user will not be relayed to avoid loops.
Login=redacted
Password=redacted

RemoteNickFormat="[{PROTOCOL}] {NICK}: "

#Whether to send the homeserver suffix. eg ":matrix.org" in @username:matrix.org
#to other bridges, or only send "username".(true only sends username)
#OPTIONAL (default false)
NoHomeServerSuffix=true
ReplaceMessages=[ ["@everyone","@everyone"], ["@here","@here"] ]

[irc.rizon]
Server=redacted
Nick=redacted
RemoteNickFormat="[{PROTOCOL}] {NICK}: "
ReplaceMessages=[ ["@everyone","@everyone"], ["@here","@here"], ["[ ,,]",""] ]

<gateways redacted>
enhancement matrix

Most helpful comment

If anyone wants to implement:

If this issue is still open in <2 weeks (when I have time), I'll implement it! If someone else wants to do it before I'll come to it, go ahead of course! The sooner it's fixed, the better

I'll assume the cache can be in RAM, and have a expiry of +- 10 minutes.

All 3 comments

If anyone wants to implement:

You'll have to use GetDisplayName for this
https://github.com/matrix-org/gomatrix/blob/072b39f7fa6b40257b4eead8c958d71985c28bdd/client.go#L391

And make a cache for this so not to query for every nick.

If anyone wants to implement:

If this issue is still open in <2 weeks (when I have time), I'll implement it! If someone else wants to do it before I'll come to it, go ahead of course! The sooner it's fixed, the better

I'll assume the cache can be in RAM, and have a expiry of +- 10 minutes.

Fixed in #1282

Was this page helpful?
0 / 5 - 0 ratings

Related issues

w3bb picture w3bb  路  6Comments

strugee picture strugee  路  6Comments

bluddy picture bluddy  路  4Comments

pb30 picture pb30  路  5Comments

hoerup picture hoerup  路  5Comments