Handle 400 init response and add ping command. Fixes #87

This commit is contained in:
Tulir Asokan
2019-08-24 22:39:12 +03:00
parent b9ce4d7ab4
commit 44a0fc65b8
4 changed files with 54 additions and 30 deletions

View File

@ -136,8 +136,8 @@ func (puppet *Puppet) stopSyncing() {
}
func (puppet *Puppet) ProcessResponse(resp *mautrix.RespSync, since string) error {
if !puppet.customUser.Connected {
puppet.log.Warnln("Skipping sync processing: custom user not connected to whatsapp")
if !puppet.customUser.IsConnected() {
puppet.log.Debugln("Skipping sync processing: custom user not connected to whatsapp")
return nil
}
for roomID, events := range resp.Rooms.Join {