Don't allow multiple chats with same contact

Bug #145185 reported by sander
2
Affects Status Importance Assigned to Milestone
Coccinella
Fix Released
Low
Mats

Bug Description

1) A user already has an open chat window or tab with a contact
2) The user tries to open a new chat with this contact.
3) Coccinella should open the exiting window or tab instead of opening a new window or tab. (Focus should move to this window or tab)

See also: http://coccinella.im/comment/reply/102

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

You mean when on the initiator side? Because by default, the Chat code is configured to keep a single chat window for any thread from a particular bare JID:

    if {[info exists argsA(-thread)] && $config(chat,allow-multi-thread-per-jid)} {
 set threadID $argsA(-thread)
 set chattoken [GetTokenFrom chat threadid $threadID]
    } else {

 # Try to find a reasonable fallback for clients that fail here (Psi).
 # Find if we have registered any chat for this jid 2/3.
 set chattoken [GetTokenFrom chat jid [jlib::ESC $mjid2]*]

which is also confirmed:
RECV: <message <email address hidden>/Coccinella@hp' to='d\<email address hidden>' xml:lang='sv' id='1' type='chat'>
          <thread>912ef4a-7e348f97</thread><body>dsssasasasa</body></message>
RECV: <message <email address hidden>/Coccinella@hp' to='d\<email address hidden>' xml:lang='sv' id='2' type='chat'>
          <thread>9e05a2c-2cbf433c</thread><body>dsadsdaaaaaaaaaaaaaaaaaaaaaa</body></message>

which inputs text in the same tab.

Changed in coccinella:
status: New → In Progress
Revision history for this message
sander (s-devrieze) wrote : Re: [Bug 145185] Re: Don't allow multiple chats with same contact

yes

Revision history for this message
Mats (matsben) wrote :

It should work now. Some testing made and seems OK.

Changed in coccinella:
status: In Progress → Fix Committed
Revision history for this message
sander (s-devrieze) wrote :

2007/10/11, Mats <email address hidden>:
> It should work now. Some testing made and seems OK.

Bugs:
* When the contact is logged on with 2 clients using the same account,
you see 2 entries in your roster. When clicking on these entries, one
of them vanishes.
* When the contact is logged on with 2 clients using the same account,
the message should be send to the bare JID. Instead, Coccinella sends
it to the resource of the resource that is still visible in the
roster; this may be the wrong resource!

Revision history for this message
Mats (matsben) wrote :

On 10/11/07, sander <email address hidden> wrote:
> 2007/10/11, Mats <email address hidden>:
> > It should work now. Some testing made and seems OK.
>
> Bugs:
> * When the contact is logged on with 2 clients using the same account,
> you see 2 entries in your roster. When clicking on these entries, one
> of them vanishes.

I'm aware of issues with multiple resources and there is a separate
bug entry for this I think.
The vanishing happens after an Edit, but since I haven't paid
attention to this the code
is "hanging in the air"

> * When the contact is logged on with 2 clients using the same account,
> the message should be send to the bare JID. Instead, Coccinella sends
> it to the resource of the resource that is still visible in the
> roster; this may be the wrong resource!
>

Both messages and Chats are initiated to the bare JID:
SEND: <message <email address hidden>'><subject>cvdcdd</subject><body>dcdssdsd</body></message>
SEND: <message <email address hidden>' id='1' type='chat'><x
xmlns='jabber:x:event'><composing/></x><active
xmlns='http://jabber.org/protocol/chatstates'/><thread>6b718bfd-487b6134</thread><body>dsasdsadsdsa</body></message>

And I have also noted this in the code:
# Chat::StartThread --
#
# According to XMPP def sect. 4.1, we should use user@domain when
# initiating a new chat or sending a new message that is not a reply.

sander (s-devrieze)
Changed in coccinella:
milestone: none → 0.96.4
sander (s-devrieze)
Changed in coccinella:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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