[JDEV] mod_mymod.c
Dennis Noordsij
dennis.noordsij at wiral.com
Sun Dec 10 07:34:19 CST 2000
> > Encapsulate the message into jabber:x:offline ?
>
> well, i dont really see what you mean ...
> but you can send directly your message to the offline storage ...
Oops, I am sorry, let me try to explain a bit more clearly :-) I have a
mod_mymod that notifies an external instance of any sessions created and
destroyed, then, when I log out of jabber via for example gabber, this
external instance will register a session on my behalf (so I am still
"present"), and messages sent to this session should be stored in the offline
storage and the instance will send me a notification via other means, perhaps
email or something similar.
This already works beautifully - except for the bit where the message gets
storend in the default offline storage.
In addition, this has to be done by the instance, not by the original
mod_mymod module, all that does it notify the instance of sessions (in an
intelligent way, ie how many resources does the user have online, which ones
were created by the instance and which ones weren't, etc).
For example, my instance receives a <message to='' from=''> -- </message>.
1 - It replies to the sender with an autoreply message (Hi, I have been
notified of your message and will respond a.s.a.p). Works beautifully.
2 - It sends out the notifitication (user so-and-so sent you a message) via
email, sms, or whatever. Also works fine.
3 - It stores the original message in the default offline storage.
The only way for the instance to do no. 3 is to send out the proper XML
packet to jabber (it is not part of the jabber code, also not written in C
yet and therefore can not use the default functions available, it has to
create the proper XML packet itself).
My question is, what does that XML packet look like?
Kind regards and thanks so much for helping
Dennis
More information about the JDev
mailing list