powered by Jive Software

Jabber❌delay Extension

Has anyone added an extension to XIFF for the jabber:x:delay namespace? This extension is used to provided additional information about store-and-forward chat room messages … in particular, the original time and date that the message was sent (as opposed to current time). As nearly as I can tell, there isn’'t one available in the baseline code … is that conclusion correct?

Bill

I just recently updated from the XIFF 3.0 repository and although only a small number of files were updated, I did see a reference in the log to adding support for jabber:x:delay. Can someone verify that support has been implemented fully? And if so, give a quick and dirty explanation of how to use the new functionality? Thanks.

Chances are it’ll be changing some as I get used to xiff’s structure (I probably should put it in its own file for example, instead of in Message), but currently you can simply use the ‘time’ property on Message to get an ActionScript Date of when the message was sent.

Thanks, David. Can I assume you are the most recent inheritor of this code base? You may see another not so flattering forum entry from me asking if XIFF is dead. Until this response, it appeared that the XIFF code had been abandoned … it had been so long since I saw any activity to indicate that it was till being maintained and enhanced. I have found a number of what I think are bugs and some other things that could be called enhancements. Are the right person to communicate such things to?

Sure, ping me on IM and I’ll be happy to talk about stuff. Bug fixes & improvements are always welcome

The email notification I got for this forum posting said I could just reply to the email … and I did … several times. But I don’t see any of the content of my replies posted here so I think something doesn’t work the way I thought it did.

David,

I sent you an email directly with a list of the problems I found so far. I figured I’d let you read through the list before we discuss.

Also, I tried what you suggested … i.e. using the Message.time field … and I do get a date, but it is off by one month. I looked at the code and it appears that the format in the replayed messages uses months from 01 to 12, but setUTCMonth expects 0 to 11. So the month is always one month too late … e.g. messages I sent today replay with a date of Sep 21. I can fix, but I’d rather it get fixed in the baseline code so my code doesn’t diverge further than it already has. Can you fix this any time soon? Or should I just suck it up and make the change in my copy? Thanks.

Bill

Not sure what’s up with the email; post on jive lounge about it.

Got the email, will look over it in a bit.

Off by one should be fixed now, let me know if it’s not.

It works. I do have one other suggestion, though it is not critical. Since the message now has the time field, it might be nice to have XIFF always populate this field with an appropriate time and data … e.g. for new public and private messages, automatically set it to the date and time the message was received. I am doing this now in my own code, but it would be cleaner and more consistent if you could just always display msg.time rather than testing msg.time for null every time and create a new Date object if the time isn’t provided. Just a thought.

My intention was that a null time would indicate that it wasn’t a historical message; For example, when joining a group chat I intend to buffer all the incoming history and display it in a chunk to avoid lag.