forked from qxmpp-project/qxmpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added possibility to QXmppServer to route a stanza to a specific reso…
…urce without the need to add the resource to the stanza's JID. Closes qxmpp-project#7
- Loading branch information
Showing
2 changed files
with
18 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0ebce1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I agree with this change, it makes it possible to route stanzas inconsistently. If routing decisions need to be taken, shouldn't that be straight in "routeData"?
0ebce1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this would make it possible to route a stanza to another resource than specified in the "to" attribute.
If I didn't misinterpret the code, routeData does not have a clue about the client connections' message priorities and thus cannot do the decision.
Would it be OK if I changed the code to only accept a resource when the "to" element is a bare JID and reject sending (return false) when "to" is a fullJID and a resource has been specified?
Edit: Or do you mean I shall pass the destination resource into routeData(...) and there do the check whether "to" is a bare or a full JID?