Separate chats for different resources, also enable multiple resouces in the roster

Bug #150360 reported by sander
16
Affects Status Importance Assigned to Milestone
Coccinella
In Progress
Medium
buzzdee

Bug Description

When you receive chat messages from the same contact but from different resources of this contact, separate chat windows/tabs should be opened for both resources.

sander (s-devrieze)
Changed in coccinella:
assignee: nobody → matsben
importance: Undecided → Medium
Revision history for this message
Mats (matsben) wrote :

What does XMPP say about this? It seems that if we allow multi threads per JID we also get separate tabs if there is a thread attribute:

    # Shall we allow multiple chast threads (and dialogs) per JID?
    variable allowMultiThreadPerJID 0

    # We must follow the thread...
    # There are several cases to deal with: Have thread page, have dialog?
    if {[info exists argsA(-thread)] && $allowMultiThreadPerJID} {
 set threadID $argsA(-thread)
 set chattoken [GetTokenFrom chat threadid $threadID]

Will put the allowMultiThreadPerJID in config()

Changed in coccinella:
status: New → Confirmed
Revision history for this message
Kevin "Zukero" POCHAT (kpochat) wrote :

This gets worse when you receive chat message from the same account as the one connected in coccinella, with a different resource.
Say <email address hidden>/MyOwnClient tries to send a message to <email address hidden>/Coccinella, coccinella plays the "new chat" sound, but does not open a chat window.
I also tried to open a chat window from a MUC room in coccinella with the other same-JID-different-resource user, and still no chat window.
Seen on Coccinella 0.96.12 on Windows XP.

buzzdee (sebastia)
Changed in coccinella:
milestone: none → 0.96.18
assignee: Mats (matsben) → buzzdee (sebastia)
status: Confirmed → In Progress
summary: - Separate chats for different resources
+ Separate chats for different resources, also enable multiple resouces in
+ the roster
Revision history for this message
buzzdee (sebastia) wrote :

This adds a preference to allow the user to choose to see multiple resources for the same contact in the roster.

When enabled, and then outgoing messages now can be selectively sent to a given resource, when a chat window is open for both, then answers are correctly shown in the given thread.

Incoming messages when no chat window is open yet, they are still shown in the same thread, still needs to be fixed.

The patch also still contains a lot of additional debug output that needs to be cleaned up when everything is fine.

Revision history for this message
buzzdee (sebastia) wrote :

The duplicate of this patch describes fairly the same "problem", therefore I merged those two.

Revision history for this message
buzzdee (sebastia) wrote :

This patch is a step forward and obsoletes the old patch, and now also handles incoming messages well.

In case the multiple resources in the roster are enabled, then incoming messages from different resources are opened in different threads.

In the roster, when multiple resources are enabled and online, then the chat submenu is disabled. Chat sessions are always directed directly to the full jid.
With the multiple resources disabled, then the chat submenu behaves as before, in case there is only one resource of a contact online, then there is no submenu, if there are more then one online, then the submenu is shown.

Also an exception with the multiple resources enabled that happened when having groups in the roster, was fixed.
However, the fix was just a commenting out of some sorting, because I did not yet figured out what the actual problem is.

Revision history for this message
buzzdee (sebastia) wrote :

another update of the last patches, obsoleting the old ones.

Now, in case there are more than one resource per contact online, the roster shows the contact, and the available resources are shown in the tree below which can be collapsed.

When one of the available resources goes offline, only the remaining contact is shown, with no resources in the tree below, when it comes back online, then the tree below the contact is added again.

This still only works for chat yet, not for the whiteboard, filetransfer or voice calls.

Further only the RosterPlain.tcl is updated to do everything right, the other Roster styles still needs to be updated to handle it.

Revision history for this message
buzzdee (sebastia) wrote :

again updated.

all roster styles are now working without exception.

Still some minor issues:
 - The balloon help for resources shows the same for all
 - the chat icon on top in the roster is not active when a resource is selected
 - the context menu when clicking on people, still has issues, e.g. file transfer, because the jid2 is used there
 - still needs a cleanup, removing all the extra debug output
 - maybe more...

Feedback appreciated

Revision history for this message
buzzdee (sebastia) wrote :

again updated.

all roster styles are now working without exception.

Still some minor issues:
 - The balloon help for resources shows the same for all
This is fixed as its best, the mood/activity is not distinguishable between resources, due to the message comes from jid2
 - the chat icon on top in the roster is not active when a resource is selected
Works now
 - the context menu when clicking on people, still has issues, e.g. file transfer, because the jid2 is used there
should work now
 - still needs a cleanup, removing all the extra debug output
is removed
 - maybe more...
+ The roster is now reloaded on preferences changes

Feedback appreciated

Revision history for this message
sander (s-devrieze) wrote :

"Show online clients of a contact" option:
* When the patch is just enabled, this option is unchecked. However, the different resources *are* shown.
* I don't think there should be an option for this. At least not in the GUI. There may be a config file option. This feature should be enabled by default.

Contacts *always* should be collapsed; the resources should be hidden under a + sign after login.

There still seems to be an issue with presence. For instance, for one contact which is "busy", both resources show the "busy" icon whilst the bare JID icon shows the "available" icon. The balloon text also shows "available".

If a contact with 2 online resources, logs of 1 resource, there is only 1 subitem. It would be more clean to simply remove the + sign when only 1 resource is left.

I don't think the chat submenu is still needed in the RMB context menu.

I am not sure whether contact actions should be possible to set on resource level. This may cause usability issues. What do you think?

How do you sort the resources? I would suggest first sorting on presence status, then priority, and then alphabetically.

Not all styles seem to work very well. Is this still on your TODO list?

Not yet tested:
* sending and receiving messages
* file transfer
* whiteboard sessions
* partially tested: roster styles.

Revision history for this message
buzzdee (sebastia) wrote :

Thanks for the feedback, see my comments below:

> "Show online clients of a contact" option:
> * When the patch is just enabled, this option is unchecked. However, the different resources *are* shown.
> * I don't think there should be an option for this. At least not in the GUI. There may be a config file option. This feature should > be enabled by default.
Hrm, yes, I don't know where this again comes from... I had this working before.
Because it should be enabled by default, how about removing this as a configuration option at all?
I'd remove the configuration option from the GUI, and also in the code and always assume that there are probably multiple resources in the tree.
That would make the code much simpler to write, no need to distinguish. Its complicated enough ;)

> Contacts *always* should be collapsed; the resources should be hidden under a + sign after login.
OK, this I have done now in my working tree, the next patch will default to collapsed.
When there are already resources listed, and the tree is open, and another resource comes online, it will stay open.

> There still seems to be an issue with presence. For instance, for one contact which is "busy", both resources show the "busy" > icon whilst the bare JID icon shows the "available" icon. The balloon text also shows "available".
I need to figure out why this happens, and how to prevent that. No idea yet.

> If a contact with 2 online resources, logs of 1 resource, there is only 1 subitem. It would be more clean to simply remove the + > sign when only 1 resource is left.
I thought I do this already, but somehow after a bit of rework, it seems to not do this anymore, will take a look, as I fully agree and also planned to do so.

> I don't think the chat submenu is still needed in the RMB context menu.
OK, I can remove it entirely, when clicking on a contact, then chat is always stated to the jid2, when clicking on a resource, then to a jid2 as it is right now when you click the chat button on top or double click (with chat opens instead of a new message)

> I am not sure whether contact actions should be possible to set on resource level. This may cause usability issues. What do you think?
Good point, I did not thought about that yet. So only enable the menu entry on a contact. You mean when clicking on a resource it should be disabled?
Should be possible.

> How do you sort the resources? I would suggest first sorting on presence status, then priority, and then alphabetically.
Not yet actually ;) I need to figure out an easy way to do so, I'll keep the order you propose in mind.

> Not all styles seem to work very well. Is this still on your TODO list?
I only wanted to put multiple resources of a contact in the tree below the contact for the Plain and TwoLines styles, the others are rather flat, so just putting the multiple contacts flat next to each other.
Or also introducing the tree there? I think that would not look very nice.

Not yet tested:
* sending and receiving messages
* file transfer
* whiteboard sessions
* partially tested: roster styles.

Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 150360] Re: Separate chats for different resources, also enable multiple resouces in the roster

>> "Show online clients of a contact" option:
> Because it should be enabled by default, how about removing this as a configuration option at all?

Yes, that's exactly what I am saying. :-)

>> Not all styles seem to work very well. Is this still on your TODO list?
> I only wanted to put multiple resources of a contact in the tree below the contact for the Plain and TwoLines styles, the others are rather flat, so just putting the multiple contacts flat next to each other.
> Or also introducing the tree there? I think that would not look very nice.

Maybe it can work like an iPhone-like interface: if you click a
contact name with an arrow at the right side (indicates there are
multiple resources), all contacts disappear and only the resources of
this contact are shown. See http://davidcann.com/iphone/ for a
Javascript example.

Revision history for this message
buzzdee (sebastia) wrote :

first need to take a look to fix bug #507360 actual state of affairs is appended to not get it lost.

buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.18 → 0.96.20
buzzdee (sebastia)
Changed in coccinella:
milestone: 0.96.20 → 0.96.22
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.