Bug 38497

Summary: Logger should not file logs under the "conversation room" id
Product: Telepathy Reporter: Frederic Peters <fpeters>
Component: loggerAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED NOTOURBUG QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: nicolas, pochu27
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Frederic Peters 2011-06-20 06:51:41 UTC
If I initiate a conversation from an open chatroom in empathy, clicking on a contact in its embedded participants list, it will be against "room@conference.example.net/fred", not "fred@im.example.net", and I'll have trouble finding logs afterwards.

Would it be possible for telepathy-logger to store logs with the "real" contact id?
Comment 1 Nicolas Dufresne 2011-06-20 06:57:05 UTC
I never notice that detail, I would have expected the real ID to be used to. I'll have a look, but it might be something we will have to change on the client side. Which connection manager was used ?
Comment 2 Frederic Peters 2011-06-20 07:03:24 UTC
That's with gabble 0.13.
Comment 3 Guillaume Desmottes 2011-06-20 07:10:48 UTC
Gabble uses room specific handles in muc (thanks XMPP...); it MAY be aware of the real handle as well (depends of the room configuration) in which case I think the logger should use it.
See http://telepathy.freedesktop.org/spec/Channel_Interface_Group.html#Property:HandleOwners
Comment 4 Emilio Pozuelo Monfort 2011-06-20 07:17:02 UTC
If I understood Fred correctly, he's talking of a 1-1 chat opened *from* a muc chat, e.g. in a muc room in Empathy, double-click on a contact in the room list to start a 1-1 chat.
Comment 5 Emilio Pozuelo Monfort 2011-06-20 07:19:06 UTC
Ok, I think I misunderstood it, forget what I said :)
Comment 6 Frederic Peters 2011-06-20 07:22:13 UTC
Emilio, this is exactly as you describe. (but then I didn't notice misunderstanding in the previous comments, probably because I am not totally sure of the exact words to be used in telepathy context).
Comment 7 Nicolas Dufresne 2011-06-20 07:43:16 UTC
What Guillaume explained (which I knew but I forgot) is that in XMPP, rooms participant has different IDs. While it's not always possible to know the real ID (e.g. someone not in your contact list), he means that the logger should at least try to convert using the specified API.

To me all this seems a little odd, also I don't see why the Client does not do this conversion as it would help displaying the users avatar (I think we can have different alias in room, but no avatar). Finally, having the logger to do this conversation may lead to side effect. As the Client uses the room ID to open the 1:1 chat, it means that a second 1:1 chat window can be opened (this time using the real ID) and both conversation would endup mixed together in the logger DB.
Comment 8 Simon McVittie 2011-06-20 08:08:10 UTC
(In reply to comment #7)
> What Guillaume explained (which I knew but I forgot) is that in XMPP, rooms
> participant has different IDs. While it's not always possible to know the real
> ID (e.g. someone not in your contact list)

That's not why it's not always possible: it's not always possible because the room administrator might not have allowed it. Whether the other guy is on your contact list has little to do with it (you can have a 1:1 chat with people not on your contact list, unless the server is one like GTalk that disallows that).

> Finally, having the logger to do
> this conversation may lead to side effect. As the Client uses the room ID to
> open the 1:1 chat, it means that a second 1:1 chat window can be opened (this
> time using the real ID)

Talking to the in-room JID is semantically different. Suppose I'm in a room with you (room@example.com, say) and my in-room JID is room@example.com/smcv.

If the room is configured to be "semi-anonymous", you can't see that I'm really simon.mcvittie@collabora.co.uk unless you're a room administrator. You can open a 1:1 chat with me anyway; if you do, your 1:1 messages are relayed by the room, preserving my anonymity. You can't necessarily even know that I'm the same smcv who was in the room yesterday; all you know is that the nickname smcv in the context of that room currently belongs to me. (So, similar to the guarantees you get from IRC.)

If you are a room administrator, or the room is configured to be non-anonymous, you can see my real JID ("handle owner" in the Telepathy D-Bus API) and can choose whether to have a 1:1 conversation with me via the room, or directly.

(Fully anonymous rooms also theoretically exist - in these, even room administrators can't see your real JID. In practice, nobody uses them.)

I think the logger is right to store logs as it does now, according to the JID from whom you received the message, but UIs (probably Empathy here) should prefer to open a 1:1 chat with the real JID (handle owner), if they know it.
Comment 9 Nicolas Dufresne 2011-06-20 12:05:10 UTC
This issue should be reported at bugs.gnome.org on Empathy then.

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.