Move rejection of info messages to "Accepts" method of botcommand

master
Hugo Thunnissen 4 years ago
parent dbad923c2d
commit 1f895db149

@ -30,7 +30,9 @@ func (b *WhappBridge) Accepts(c *deltachat.Chat, m *deltachat.Message) bool {
return false
}
return chatJID != nil
// Only forward messages for known groups,
// Don't forward info messages like "group name changed" etc.
return chatJID != nil && !m.IsInfo()
}
func (b *WhappBridge) Execute(
@ -51,10 +53,6 @@ func (b *WhappBridge) Execute(
return
}
if m.IsInfo() {
return
}
text := whatsapp.TextMessage{
Info: whatsapp.MessageInfo{
RemoteJid: *JID,

Loading…
Cancel
Save