42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.7k stars 623 forks source link

Discord webhooks doesn't show "Avatars"(profile pictures) when source is Telegram #1987

Open nucce1 opened 1 year ago

nucce1 commented 1 year ago

Describe the bug Discord webhooks doesn't show "Avatars"(profile pictures) when source is Telegram(not tested any other source).

To Reproduce Steps to reproduce the behavior: Type anything in the Telegram chat and see the result in the Discord channel: image

Expected behavior The avatar on Discord should show same avatar/profile picture as Telegram one. In my case I even use an MediaServer.

Screenshots/debug logs Screenshot above.

Environment (please complete the following information):

Additional context my config:

[general]
MediaDownloadPath="/var/www/html/upload"
MediaServerDownload="https://XXXXXXXXXXXXXXXXX/upload/"

[discord]
[discord.bot]
Token="XXXXXXXXXXXXXXXXX"

Server="XXXXXXXXXXXXXXXXX"
AutoWebhooks=true
UseLocalAvatar=["telegram.bot"]

RemoteNickFormat="[TG] <{NICK}> "

# Map threads from other bridges on discord replies
# False until fixed properly
PreserveThreading=false

[telegram.bot]
Token="XXXXXXXXXXXXXXXXX"
RemoteNickFormat="<{NICK}> " # How your message will be formatted when bridged.
MessageFormat="HTMLNick :"
QuoteFormat="{MESSAGE} (re @{QUOTENICK}: {QUOTEMESSAGE})"
QuoteLengthLimit=46 # Truncuate long quotes to prevent spammy bridged messages
IgnoreMessages="^/" # Don't bridge bot commands (as the responses will not be bridged)

[[gateway]]
name="gateway1"
enable=true

[[gateway.inout]]
account="discord.bot"
channel="ID:XXXXXXXXXXXXXXXXX"

[[gateway.inout]]
account="telegram.bot"
channel="-100XXXXXXXXXXXXXXXXX"

Regards

42wim commented 1 year ago

You need to setup a mediaserver to have telegram avatars as they're not publicly available but needs to be downloaded - see https://github.com/42wim/matterbridge/wiki/Mediaserver-setup-(advanced)

nucce1 commented 1 year ago

As my config shows I'm using a mediaserver as decribed in the advanced setup "local download"

[general]
MediaDownloadPath="/var/www/html/upload"
MediaServerDownload="https://141.144.203.111/upload/"
42wim commented 1 year ago

oops