forked from lug/matterbridge
		
	Fix panic (telegram). Closes #410
This commit is contained in:
		@@ -154,11 +154,11 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		// set the ID's from the channel or group message
 | 
							// set the ID's from the channel or group message
 | 
				
			||||||
		rmsg.ID = strconv.Itoa(message.MessageID)
 | 
							rmsg.ID = strconv.Itoa(message.MessageID)
 | 
				
			||||||
		rmsg.UserID = strconv.Itoa(message.From.ID)
 | 
					 | 
				
			||||||
		rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10)
 | 
							rmsg.Channel = strconv.FormatInt(message.Chat.ID, 10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// handle username
 | 
							// handle username
 | 
				
			||||||
		if message.From != nil {
 | 
							if message.From != nil {
 | 
				
			||||||
 | 
								rmsg.UserID = strconv.Itoa(message.From.ID)
 | 
				
			||||||
			if b.GetBool("UseFirstName") {
 | 
								if b.GetBool("UseFirstName") {
 | 
				
			||||||
				rmsg.Username = message.From.FirstName
 | 
									rmsg.Username = message.From.FirstName
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user