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: 
Discord: 
Environment (please complete the following information):
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>
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
Most helpful comment
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.