[Bug 20768] Support more ways to be invisible (XEP-0186, maybe XEP-0126, maybe whatever Google does)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 10 13:24:23 CEST 2010


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

--- Comment #17 from Will Thompson <will.thompson at collabora.co.uk> 2010-05-10 04:24:22 PDT ---
(In reply to comment #14)
> General comments on the tests: could you add some comments to the tests
> explaining what's going on?

I added some docs to the tests a bit.

> Reading <http://xmpp.org/extensions/xep-0186.html#visible>, this test should
> check that Gabble sends a non-unavailable <presence/> stanza after sending
> visible. Currently it only checks that it sends <visible/>, and that it claims
> at the Telepathy level to be away.

Fixed, and found a bug (which I fixed) in the process.

> src/connection.c:
> 
> +/**
> + * connection_initial_presence_cb
> + *
> + * Stage 4 of connecting, this function is called by after presence is
> properly
> + * set. This is required when sending more than simple <presence/> stanzas,
> and
> + * asynchronous results are needed.
> + *
> + */
> 
> Please update _gabble_connection_connect()'s comment to reflect there being a
> fourth stage.

Fixed in my branch.

> I'm inclined that the fallbacks should be in
> conn_presence_set_initial_presence_async(), rather than relying on the callback
> to repeatedly call it. So then connection.c would just call it once, and get
> called back, and in the callback either it's worked, or it's failed really
> severely so we should give up the connection.

I have a work-in-progress patch that actually removes the fallback between
methods, with the rationale that if the server advertises a feature but turns
out to be broken... then our server is broken.

> conn-presence:
> 
> conn_presence_set_initial_presence_finished() would more conventionally be
> called _finish().

Fixed.

> toggle_presence_visibility_async(): you shouldn't call g_s_a_r_complete() from
> the _async() function, you should use _complete_in_idle(). There's a
> poorly-documented[1] API contract that the callback should never be called
> directly from the _async() function.
> 
> In fact it seems like all the functions toggle_p_v_a() call also return
> synchronously if _gabble_connection_send_with_reply() returns an error
> immediately.

Fixed.

Remaining issues, as described in the WIP patch at the top of my branch:


    This patch is WIP because it breaks invisible_fallbacks.py (given that
    it deletes the fallbacks that patch checks), because we should also have
    tests for setting ourselves to invisible failing once the connection is
    up and running (checking that Gabble reverts you to either your previous
    presence, or DND, as we wish), and because we need to look up existing
    privacy lists to fix this case:

    • Gabble #1 signs in
    • Gabble #1 creates a list called 'invisible', and activates it.
    • Gabble #2 also signs in
    • Gabble #2 tries to create a list called 'invisible', but it fails
      because you can't replace privacy lists that are in use, so it gives
      up on invisibility.

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


More information about the telepathy-bugs mailing list