test sanitizing

This commit is contained in:
shoopea 2020-04-22 13:31:51 +08:00
parent 8e8abe0fb1
commit f871f68a25

11
main.go
View File

@ -381,11 +381,14 @@ func ListenGuild(c *tdlib.Client) {
updateMsg := (*msg).(*tdlib.UpdateNewMessage) updateMsg := (*msg).(*tdlib.UpdateNewMessage)
m := updateMsg.Message m := updateMsg.Message
chatID := m.ChatID chatID := m.ChatID
msgType := m.Content.GetMessageContentEnum() if m.Content != nil {
// senderUserID := updateMsg.Message.SenderUserID msgType := m.Content.GetMessageContentEnum()
if chatID == chat_guild && msgType == tdlib.MessageTextType { // senderUserID := updateMsg.Message.SenderUserID
return true if chatID == chat_guild && msgType == tdlib.MessageTextType {
return true
}
} }
return false return false
} }