forked from lug/matterbridge
		
	Fix Telegram channel title in forwards (#1753)
Forward from channels requires different handling than forward from the regular users. This patch fixes the issue: it prints channel title instead of "forwarded from unknown".
This commit is contained in:
		| @@ -57,6 +57,11 @@ func (b *Btelegram) handleForwarded(rmsg *config.Message, message *tgbotapi.Mess | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if message.ForwardFromChat != nil && message.ForwardFrom == nil { | ||||||
|  | 		rmsg.Text = "Forwarded from " + message.ForwardFromChat.Title + ": " + rmsg.Text | ||||||
|  | 		return | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if message.ForwardFrom == nil { | 	if message.ForwardFrom == nil { | ||||||
| 		rmsg.Text = "Forwarded from " + unknownUser + ": " + rmsg.Text | 		rmsg.Text = "Forwarded from " + unknownUser + ": " + rmsg.Text | ||||||
| 		return | 		return | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ValdikSS
					ValdikSS