mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2025-01-20 19:32:00 +01:00
Don't send typing notifications if Matrix room hasn't been created
This commit is contained in:
parent
8dbb67a49c
commit
f84bb162ca
1 changed files with 5 additions and 3 deletions
2
user.go
2
user.go
|
@ -1221,11 +1221,13 @@ func (user *User) HandlePresence(info whatsapp.PresenceEvent) {
|
|||
}
|
||||
_, _ = puppet.IntentFor(portal).UserTyping(puppet.typingIn, false, 0)
|
||||
}
|
||||
if len(portal.MXID) > 0 {
|
||||
puppet.typingIn = portal.MXID
|
||||
puppet.typingAt = time.Now().Unix()
|
||||
_, _ = puppet.IntentFor(portal).UserTyping(portal.MXID, true, 15*1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (user *User) HandleMsgInfo(info whatsapp.JSONMsgInfo) {
|
||||
if (info.Command == whatsapp.MsgInfoCommandAck || info.Command == whatsapp.MsgInfoCommandAcks) && info.Acknowledgement == whatsapp.AckMessageRead {
|
||||
|
|
Loading…
Add table
Reference in a new issue