[Bug 41789] Expose Facebook ids into Facebook Chat contacts’

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 31 17:37:21 CET 2011


https://bugs.freedesktop.org/show_bug.cgi?id=41789

--- Comment #2 from Will Thompson <will.thompson at collabora.co.uk> 2011-10-31 09:37:21 PDT ---
+    contact_info = [(u'x-facebook-id', [], [u'test']),]

+        {handle: {cs.CONN_IFACE_CONTACT_INFO + '/info': contact_info,
+                  'org.freedesktop.Telepathy.Connection/contact-id':
'test at chat.facebook.com'}},

Do you really intend to leave the leading '-' on the Facebook IDs? JIDs on
Facebook look like -1407062450 at chat.facebook.com; this will yield
'x-facebook-id': '-1407062450' in the contact info. The test case should
definitely use something formatted like a real Facebook Chat JID.

The first patch is kind of a PITA to review because it's actually two patches:
one preserving the context for the vCard callback, and the other inserting the
Facebook stuff…

 } VCardField;
+typedef struct {

There should be a space in between the two definitions.


+   if (username && tp_strdiff (server, "chat.facebook.com") == 0)

username != NULL; and tp_strdiff returns a gboolean, so you should use
!tp_strdiff (server, "chat.facebook.com"). But in fact, I think I would be
happier if there was a flag on the connection to say whether or not we're on
Facebook (see
http://cgit.collabora.com/git/user/wjt/telepathy-gabble-wjt.git/commit/?h=facebook-url
for my WIP for the same feature); then _insert_server_specific_info() could
just early-return if we're not on Facebook, rather than decomposing every
single JID on every other connection.


+      VCardRequestInfo *request_info = g_new (VCardRequestInfo, 1);

Use g_slice_new(). I would be happier if there were new and free functions for
VCardRequestInfo.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list