Add compatibility with client that doesn't implements the XEP-0070
This commit is contained in:
parent
247b7a1135
commit
a33d734411
|
|
@ -56,6 +56,15 @@ func mainXMPP() {
|
|||
client := WaitMessageAnswers[confirm.Id]
|
||||
delete(WaitMessageAnswers, confirm.Id)
|
||||
processConfirm(v, client)
|
||||
} else {
|
||||
// If body is the confirmation id, it will be considerated as accepted.
|
||||
// In order to be compatible with all clients.
|
||||
client := WaitMessageAnswers[v.Body]
|
||||
jidFrom, _ := xmpp.ParseJID(v.From)
|
||||
if client != nil && client.JID == jidFrom.Bare() {
|
||||
delete(WaitMessageAnswers, v.Body)
|
||||
processConfirm(v, client)
|
||||
}
|
||||
}
|
||||
|
||||
case *xmpp.Iq:
|
||||
|
|
|
|||
Loading…
Reference in New Issue