tigase / Martin

(M) Martin - XMPP client library for Swift
Other
69 stars 27 forks source link

XEP-0077 requests addressed to client full JID #16

Closed mwild1 closed 2 years ago

mwild1 commented 2 years ago

Describe the bug In IBR removal, XEP-0077 states:

If the entity cancels its registration with its "home" server (i.e., the server at which it has maintained its XMPP account), then the entity SHOULD NOT include a 'from' or 'to' address in the remove request

However tigase-swift defaults to using the client's full JID: https://github.com/tigase/tigase-swift/blob/34f4d5a1bf6451aee53dc972c3a604c2026acddc/Sources/TigaseSwift/modules/InBandRegistrationModule.swift#L187

This causes the stanza to be routed back to the client itself, which then responds with an error. Account removal fails.

Expected behavior Send the stanza with no 'to' JID per XEP-0077.

mwild1 commented 2 years ago

P.S. It would be great if this fix could be backported to the stable branch :)

hantu85 commented 2 years ago

The issue was fixed. For stable version, please use branch stable or tagged commit 2.1.3.