vijfhoek / telematrix

Bridge between Telegram and Matrix
MIT License
98 stars 19 forks source link

Allow configuring bridged user display name format #33

Closed Mikaela closed 7 years ago

Mikaela commented 7 years ago

I think it should be possible for the bridge administrator to be able to change how display names are formatted and if it's changed, sync the change to existing clients.

TeleIRC has options:

// formatting of Telegram usernames on IRC.
// the following placeholders are available:
//
// - %firstName% (first name of sender)
// - %lastName% (last name of sender)
// - %username% (optional Telegram username of sender)
config.nameFormat = '%username%';

// fallback format string for %username% if sender lacks username
config.usernameFallbackFormat = '%firstName% %lastName%';

Currently the Telegram users have display name Firstname Lastname (Telegram) at Telegram and thus Matrix users don't know how to ping Telegram users. If the display name format was set to @%username% (Telegram), automatically completing the Telegram name would be possible and everyone would know how to do it at least from Matrix.


Other issues we have encoutered at SailfishOS Fan Club in case someone else will find them through this issue:

vijfhoek commented 7 years ago

This is an interesting case, as the %firstname% %lastname% name in Telegram could be viewed as a display name, just like the display name on Matrix. It is indeed a problem that Telegram users can't be pinged however — maybe this can be done with some conversion magic in the bridge

vijfhoek commented 7 years ago

Oh I just saw that Matrix indeed does have a mentioning API now. Fixing #36 should fix the problem this solves as well, and I'm a major supporter of keeping the name behaviour as it is now, so I'm closing this for now.