discord: proper support for discriminator-less
names with no discriminator are shown as @username, and search works with the @ too. Also bumped go version to 1.20, since it was stuck on 1.16 and i felt like trying generics (in an ugly way).
This commit is contained in:
@@ -863,7 +863,7 @@ func (app *appContext) sendByID(email *Message, ID ...string) error {
|
||||
|
||||
func (app *appContext) getAddressOrName(jfID string) string {
|
||||
if dcChat, ok := app.storage.discord[jfID]; ok && dcChat.Contact && discordEnabled {
|
||||
return dcChat.Username + "#" + dcChat.Discriminator
|
||||
return RenderDiscordUsername(dcChat)
|
||||
}
|
||||
if tgChat, ok := app.storage.telegram[jfID]; ok && tgChat.Contact && telegramEnabled {
|
||||
return "@" + tgChat.Username
|
||||
|
||||
Reference in New Issue
Block a user