42wim/matterbridge

Forwarded image from Telegram doesn't show link on IRC and XMPP

mahdi1234 opened this issue · 1 comments

With matterbridge v1.26.0

  • in Telegram forward some image into group bridged with matrix and IRC
  • matrix shows the image correctly
  • however IRC only receives Text:"Forwarded from mahdi: " and no image link is shown

Same behavior with xmmp.

time="2024-01-28T22:15:30+01:00" level=debug msg="== Receiving event: &tgbotapi.Message{MessageID:489, From:(*tgbotapi.User)(0xc00088e360), SenderChat:(*tgbotapi.Chat)(nil), Date:1706476530, Chat:(*tgbotapi.Chat)(0xc0002480f0), ForwardFrom:(*tgbotapi.User)(0xc00088e3c0), ForwardFromChat:(*tgbotapi.Chat)(nil), ForwardFromMessageID:0, ForwardSignature:"", ForwardSenderName:"", ForwardDate:1706476229, IsAutomaticForward:false, ReplyToMessage:(*tgbotapi.Message)(nil), ViaBot:(*tgbotapi.User)(nil), EditDate:0, HasProtectedContent:false, MediaGroupID:"", AuthorSignature:"", Text:"", Entities:[]tgbotapi.MessageEntity(nil), Animation:(*tgbotapi.Animation)(nil), Audio:(*tgbotapi.Audio)(nil), Document:(*tgbotapi.Document)(0xc0006aa140), Photo:[]tgbotapi.PhotoSize(nil), Sticker:(*tgbotapi.Sticker)(nil), Video:(*tgbotapi.Video)(nil), VideoNote:(*tgbotapi.VideoNote)(nil), Voice:(*tgbotapi.Voice)(nil), Caption:"", CaptionEntities:[]tgbotapi.MessageEntity(nil), Contact:(*tgbotapi.Contact)(nil), Dice:(*tgbotapi.Dice)(nil), Game:(*tgbotapi.Game)(nil), Poll:(*tgbotapi.Poll)(nil), Venue:(*tgbotapi.Venue)(nil), Location:(*tgbotapi.Location)(nil), NewChatMembers:[]tgbotapi.User(nil), LeftChatMember:(*tgbotapi.User)(nil), NewChatTitle:"", NewChatPhoto:[]tgbotapi.PhotoSize(nil), DeleteChatPhoto:false, GroupChatCreated:false, SuperGroupChatCreated:false, ChannelChatCreated:false, MessageAutoDeleteTimerChanged:(*tgbotapi.MessageAutoDeleteTimerChanged)(nil), MigrateToChatID:0, MigrateFromChatID:0, PinnedMessage:(*tgbotapi.Message)(nil), Invoice:(*tgbotapi.Invoice)(nil), SuccessfulPayment:(*tgbotapi.SuccessfulPayment)(nil), ConnectedWebsite:"", PassportData:(*tgbotapi.PassportData)(nil), ProximityAlertTriggered:(*tgbotapi.ProximityAlertTriggered)(nil), VoiceChatScheduled:(*tgbotapi.VoiceChatScheduled)(nil), VoiceChatStarted:(*tgbotapi.VoiceChatStarted)(nil), VoiceChatEnded:(*tgbotapi.VoiceChatEnded)(nil), VoiceChatParticipantsInvited:(*tgbotapi.VoiceChatParticipantsInvited)(nil), ReplyMarkup:(*tgbotapi.InlineKeyboardMarkup)(nil)}" func=handleRecv file="bridge/telegram/handlers.go:175" prefix=telegram
time="2024-01-28T22:15:30+01:00" level=debug msg="Trying to download "osm.png" with size 6365" func=HandleDownloadSize file="bridge/helper/helper.go:162" prefix=telegram
time="2024-01-28T22:15:30+01:00" level=debug msg="Download OK "osm.png" 6365" func=HandleDownloadData2 file="bridge/helper/helper.go:183" prefix=telegram
time="2024-01-28T22:15:30+01:00" level=debug msg="<= Sending message from mahdi on telegram.mytelegram to gateway" func=handleRecv file="bridge/telegram/handlers.go:237" prefix=telegram
time="2024-01-28T22:15:30+01:00" level=debug msg="<= Message is config.Message{Text:"Forwarded from mahdi: ", Channel:"-123", Username:"mahdi", UserID:"123", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"", Gateway:"", ParentID:"", Timestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), ID:"489", Extra:map[string][]interface {}{"file":[]interface {}{config.FileInfo{Name:"osm.png", Data:(*[]uint8)(0xc0009ae2e8), Comment:"", URL:"", Size:0, Avatar:false, SHA:"", NativeID:""}}}}" func=handleRecv file="bridge/telegram/handlers.go:238" prefix=telegram
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Sending config.Message{Text:"Forwarded from mahdi: ", Channel:"-123", Username:"mahdi", UserID:"123", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"telegram", Gateway:"gateway5", ParentID:"", Timestamp:time.Date(2024, time.January, 28, 22, 15, 30, 184248020, time.Local), ID:"489", Extra:map[string][]interface {}{"file":[]interface {}{config.FileInfo{Name:"osm.png", Data:(*[]uint8)(0xc0009ae2e8), Comment:"", URL:"", Size:0, Avatar:false, SHA:"", NativeID:""}}}} from telegram.mytelegram (-123) to matrix.mymatrix (#room:matrix.org)" func=SendMessage file="gateway/gateway.go:499" prefix=gateway
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Receiving config.Message{Text:"Forwarded from mahdi: ", Channel:"#room:matrix.org", Username:"<b>mahdi</b> (telegram) » ", UserID:"123", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"telegram", Gateway:"gateway5", ParentID:"", Timestamp:time.Date(2024, time.January, 28, 22, 15, 30, 184248020, time.Local), ID:"", Extra:map[string][]interface {}{"file":[]interface {}{config.FileInfo{Name:"osm.png", Data:(*[]uint8)(0xc0009ae2e8), Comment:"", URL:"", Size:0, Avatar:false, SHA:"", NativeID:""}}}}" func=Send file="bridge/matrix/matrix.go:144" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="Channel #room:matrix.org maps to channel id !UxghrzihqQbkimfmdN:matrix.org" func=Send file="bridge/matrix/matrix.go:147" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="uploading file: osm.png image/png" func=handleUploadFile file="bridge/matrix/matrix.go:644" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="== Receiving event: &gomatrix.Event{StateKey:(*string)(nil), Sender:"@bot_matrix_osmcz:matrix.org", Type:"m.room.message", Timestamp:1706476530223, ID:"$UdXYZ", RoomID:"!UXYZ", Redacts:"", Unsigned:map[string]interface {}{"age":139, "transaction_id":"go1706476530185106506"}, Content:map[string]interface {}{"body":"mahdi (telegram) » ", "format":"org.matrix.custom.html", "formatted_body":"<b>mahdi</b> (telegram) » ", "msgtype":"m.text"}, PrevContent:map[string]interface {}(nil)}" func=handleEvent file="bridge/matrix/matrix.go:484" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="sendImage mxc://matrix.org/ExKjdjSYePXUzcbUIxgqpxnu" func=handleUploadFile file="bridge/matrix/matrix.go:671" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="result: &gomatrix.RespMediaUpload{ContentURI:"mxc://matrix.org/ExKjdjSYePXUzcbUIxgqpxnu"}" func=handleUploadFile file="bridge/matrix/matrix.go:717" prefix=matrix
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Send from telegram.mytelegram (-123) to matrix.mymatrix (#room:matrix.org) took 696.335193ms" func=func1 file="gateway/gateway.go:508" prefix=gateway
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Sending config.Message{Text:"Forwarded from mahdi: ", Channel:"-123", Username:"mahdi", UserID:"123", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"telegram", Gateway:"gateway5", ParentID:"", Timestamp:time.Date(2024, time.January, 28, 22, 15, 30, 184248020, time.Local), ID:"489", Extra:map[string][]interface {}{"file":[]interface {}{config.FileInfo{Name:"osm.png", Data:(*[]uint8)(0xc0009ae2e8), Comment:"", URL:"", Size:0, Avatar:false, SHA:"", NativeID:""}}}} from telegram.mytelegram (-123) to irc.myirc (#abc)" func=SendMessage file="gateway/gateway.go:499" prefix=gateway
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Receiving config.Message{Text:"Forwarded from mahdi: ", Channel:"#abc", Username:"mahdi (telegram) » ", UserID:"123", Avatar:"", Account:"telegram.mytelegram", Event:"", Protocol:"telegram", Gateway:"gateway5", ParentID:"", Timestamp:time.Date(2024, time.January, 28, 22, 15, 30, 184248020, time.Local), ID:"", Extra:map[string][]interface {}{"file":[]interface {}{config.FileInfo{Name:"osm.png", Data:(*[]uint8)(0xc0009ae2e8), Comment:"", URL:"", Size:0, Avatar:false, SHA:"", NativeID:""}}}}" func=Send file="bridge/irc/irc.go:146" prefix=irc
time="2024-01-28T22:15:30+01:00" level=debug msg="=> Send from telegram.mytelegram (-123) to irc.myirc (#abc) took 183.555µs" func=func1 file="gateway/gateway.go:508" prefix=gateway
time="2024-01-28T22:15:30+01:00" level=debug msg="Sending to channel #abc" func=doSend file="bridge/irc/irc.go:262" prefix=irc
time="2024-01-28T22:15:30+01:00" level=debug msg="== Receiving event: &gomatrix.Event{StateKey:(*string)(nil), Sender:"@bot_matrix_osmcz:matrix.org", Type:"m.room.message", Timestamp:1706476530774, ID:"$XYZ", RoomID:"!XYZ", Redacts:"", Unsigned:map[string]interface {}{"age":115, "transaction_id":"go1706476530739237356"}, Content:map[string]interface {}{"body":"osm.png", "info":map[string]interface {}{"thumbnail_info":map[string]interface {}{}}, "msgtype":"m.image", "url":"mxc://matrix.org/ExKjdjSYePXUzcbUIxgqpxnu"}, PrevContent:map[string]interface {}(nil)}" func=handleEvent file="bridge/matrix/matrix.go:484" prefix=matrix
time="2024-01-28T22:16:07+01:00" level=debug msg=PING func=func1 file="bridge/xmpp/xmpp.go:265" prefix=xmpp