Re: GossipChatroomContact must die ?
Martyn Russell <[email protected]> Thu, 14 Dec 2006 14:19:55 +0000
| Newsgroups | gmane.comp.gnome.gossip.devel |
|---|---|
| Message-ID | <[email protected]> |
Xavier Claessens wrote: > Hello, Hi, > With telepathy a contact can be in the roster and in a chatroom at the > same time, it doesn't make any difference for avatar/presence/alias/etc. > In libgossip we make the difference between GossipContact and > GossipChatroomContact because there are 2 more properties: affiliation > and role. I think I agree here though, sub-classing the GossipContact because of the Jabber protocol is not really going to work here for Telepathy and it doesn't really make sense either to me. > I discussed that with Martyn we see only 2 solutions: > > 1) We move affiliation/role properties to GossipContact and remove > GossipChatrooContact class. Hmm, this is interesting. You would have to have a list here anyway - say you are in 6 chat rooms and have different affiliations/roles for each? > 2) Store a contact list into GossipChatroom to map for each contact a > small struct containing his affiliation/role in this chatroom. This have > the advantage that the same GossipContact object can be added to more > than one chatroom with different role/affiliation. I think this logically makes sense and is probably the better way to do it. In the recent browse chatrooms work I did, I can get a list of contacts which are in the rooms but I don't actually do anything with it at the moment in the Jabber backend because I would have to create contacts and remember them in the backend somehow (even though I might not be joining that room). It would be easier to store a list of contacts with the Chatroom in that case. -- Regards, Martyn