[JDEV] jabber:x:expire question
DJ Adams
dj.adams at pobox.com
Fri Jun 28 06:14:17 CDT 2002
On Fri, Jun 28, 2002 at 11:58:27AM +0200, Andreas Ames wrote:
> Hi,
>
> having read the relevant parts of DJ Adams' very useful book, I've
> been wondering whether it's possible for the *sender* to prohibit
> delivery of offline stored messages through the use of
>
> <message ...>
> ...
> <x xmlns='jabber:x:expire' seconds='0'/>
> </message>.
>
> Is my assumption correct?
Yup. If you look at the code in jsm/modules/mod_offline.c, you'll see a
simple calculation:
expire = j_atoi(xmlnode_get_attrib(x,"seconds"),0); stored = j_atoi(xmlnode_get_attrib(x,"stored"),now);
diff = now - stored;
if(diff >= expire)
{
log_debug(ZONE,"dropping expired message %s",xmlnode2str(cur));
xmlnode_hide(cur);
continue;
}
So in this case, the JSM will drop the message rather than deliver
it when the recipient comes online.
dj
>
>
> cheers,
>
> Andreas
> _______________________________________________
> jdev mailing list
> jdev at jabber.org
> http://mailman.jabber.org/listinfo/jdev
More information about the JDev
mailing list