qxmpp (server): Route message to specific resource

179 Views Asked by At

I'm writing a small xmpp server using the qxmpp library. Now I want to do the routing of messages myself: If I understand the server's implementation correct, the server forwards a message with a bare JID (contact@myxmpp) in the 'to' attribute to all connected resources for this bare JID. I want to create an implementation that takes care of the priority and sends the message only to the "most available" resource.

The only way to achieve this with QXmppServer seems to be to change the to field to a full JID, but this is prohibited by RFC for this case. (RFC 6121, 8.5.2.1.1 last paragraph: "In all cases, the server MUST NOT rewrite the 'to' attribute".

Is there a trick I didn't see or is it impossible to achieve this with the current version 0.8.0 and I have to open an issue / create a patch for qxmpp?

0

There are 0 best solutions below