Bug 22369 - Gabble should send messages to the resource that most recently replied
Summary: Gabble should send messages to the resource that most recently replied
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/wj...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2009-06-19 09:43 UTC by Will Thompson
Modified: 2009-06-25 04:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2009-06-19 09:43:31 UTC
PRECONDITIONS:
Log into account A on two different machines (make sure they have "Resource"
set to different things; "pidgin" and "telepathy" for instance); let's call
these A1 and A2.

Log into account B.

STEPS LEADING TO PROBLEM:
1. Send a message from account B to account A (message appears on both machine 1 and 2)
2. Send a message from A1 to B.
3. Send a message from B to A

EXPECTED OUTCOME:
The message should only show up on A1 (Gabble on B should
record the JID of the client that replies, and only reply to that one). 
Likewise, if A2 is later used to send a message to B, the reply from B should
only be sent to A2.

ACTUAL OUTCOME:
The message shows up on both A1 and A2.
Comment 1 Will Thompson 2009-06-19 10:03:04 UTC
Fixed in 'reply-to-active-resource'; I introduced this regression while Messages-ifying Gabble.

I'm a little bit suspicious of this, though. What happens if A1 messages B, then signs off? We'll keep getting send errors, which the user can only escape by closing and reopening the channel.

* Perhaps we should strip off the resource again on encountering a send error? But this will annoy the user, who has to re-send their message for it to go through.
* Perhaps we should strip off the resource when we get <gone/>? But this won't go well when talking to a peer who keeps closing the conversation window.
* Maybe we should also strip off the resource if the current full jid goes from an online status to an offline one? But this might go badly when talking to a contact who often goes invisible.
Comment 2 Will Thompson 2009-06-19 10:18:52 UTC
(In reply to comment #1)
> * Perhaps we should strip off the resource again on encountering a send error?
> But this will annoy the user, who has to re-send their message for it to go
> through.

I added this to my branch: it's less annoying than inexplicably having to close and open the conversation window.
Comment 3 Guillaume Desmottes 2009-06-22 06:50:06 UTC
Your branch looks good.
Comment 4 Simon McVittie 2009-06-22 08:02:44 UTC
This is better than the status quo, so ++.

A better solution would be nice - maybe on send errors to one resource, we should auto-retry to another, but only once, or something?
Comment 5 Will Thompson 2009-06-25 04:11:12 UTC
Merged, will be in 0.7.30. Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.