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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Nov 17 16:15:43 CET 2011


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

--- Comment #7 from Andre Moreira Magalhaes <andrunko at gmail.com> 2011-11-17 07:15:43 PST ---
(In reply to comment #5)
> > @@ -223,6 +223,28 @@ gabble_parse_vcard_address (const gchar *vcard_field,
> 
> This seems to be taking a JID and converting it into a Facebook ID. I'm pretty
> sure that's wrong: it should be expecting an unsigned ASCII integer (e.g.
> 12345) and returning -12345 at chat.facebook.com, or raising an error if the vCard
> field value isn't an unsigned ASCII integer.
> 
> Now that I look at that function again: is it meant to return a JID, or a
> normalized value for that vCard field? For x-jabber they're equivalent, but for
> x-facebook-id they're not! You'll need to split it into "normalize", "to_jid",
> "jid_to", as for URIs.
> 
> Here are some high-level things that we want to be true:
> 
>     NormalizeVCardAddress("x-facebook-id", "12345") -> "12345"
>     NormalizeVCardAddress("x-facebook-id", "not a number") -> error
>     NormalizeVCardAddress("x-facebook-id", "-12345") -> error
>     NormalizeVCardAddress("x-facebook-id", "-12345 at chat.facebook.com") -> error
>     NormalizeVCardAddress("x-jabber", "-12345 at CHAT.FaceBook.com")
>         -> "-12345 at chat.facebook.com")
> 
>     GetContactsByVCardField("x-facebook-id", ["12345"], [])
>         -> details of the contact with JID "-12345 at chat.facebook.com"
>     GetContactsByVCardField("x-facebook-id", [x], [])
>         -> no result for any x that produced an error above
> 
>     "/addresses" attr of "-12345 at chat.facebook.com"
>         -> { "x-jabber": "-12345 at chat.facebook.com", "x-facebook-id": "12345" }
>     "/addresses" attr of "dave at example.com"
>         -> { "x-jabber": "dave at example.com" }
Tnx for the review, I've updated the branch with the suggested changes and also
rebased it on top of the changes in bug #30296.

-- 
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