Roster troubles

— basic setup —

I have two smack clients running: joe and sue.

Each has the roster set to SUBSCRIPTION_ACCEPT_ALL.

Each starts with an empty roster.

The client is designed to automatically create a roster when a new chat is started with someone not in the roster. So when joe starts a chat with sue, joe’‘s roster gets sue added. Then when sue receives that chat from joe, joe is added to sue’'s roster.

A roster listener is set up to notify the client when a user of the other user’'s presence.

— what I expect —

What I expect to happen is that when joe first starts a chat with sue, and sue gets that chat, each of them will have a roster entry for the other. Then any presence changes will be shown to each client.

— what I get —

What I get is that when joe first starts a chat with sue, and sue gets that chat, joe gets notified of sues presence but sue does not see joe’'s presence at all.

Looking in the db, JIVEROSTER gets two entries when joe starts the chat (before sue gets it). Then when sue gets the chat, JIVEROSTER still shows the same entries.

— questions –

Is JIVEROSTER supposed to get two entries like that?

If JIVEROSTER has both entries, why would sue not get presence notification?

What do the fields mean in JIVEROSTER? Is NICK important (one becomes null)? Do the other fields affect who gets notifications?

Hope this is clear enough, Thanks in advance.

,Chris

Are you sure sue is explicitly adding joe when she recieves the chat from him?

Alex

Hi Alex,

Yes. I can see it in my debugger at least. JIVEROSTER does not change, though.

This app actually has a user list already, not using Smack. That’‘s why I have all this automatic roster entry management stuff. I also have code to remove unknown entries. When that’'s in place, the very first time sue gets a chat from anyone, sue is supposed to remove all roster entries, then add joe (for example). That works but the remove entry actually removes the one that joe made too.

What I described in the first post was what happens when the remove entry part is disabled.

Thanks,

Chris