[Bug 33054] New: Doesn't respect Google Shared Status status-max

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 13 13:36:10 CET 2011


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

           Summary: Doesn't respect Google Shared Status status-max
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: gabble
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


Google Talk's Shared Status extension
<http://code.google.com/apis/talk/jep_extensions/shared_status.html> allows the
server to specify a maximum length for status messages. Gabble currently
ignores this. This means that setting our status can fail.

Unfortunately, Gabble still signals PresencesChanged for the new status.

Here's what happens (I truncated my extraordinarily long status message to
"aoeuaoeu..." for legibility):

gabble/connection-DEBUG: 13/01/11 12:28:36.965871: set_shared_status: shared
status invisibility is available
wocky-DEBUG: 13/01/11 12:28:36.966175: _write_node_tree: Serializing tree:
* iq xmlns='jabber:client' type='set' to='resiak at gmail.com' id='962323966003'
    * query xmlns='google:shared-status' version='2'
        * status
            "aoeuaoeu..."
        * show
            "default"
        * status-list show='dnd'
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
        * status-list show='default'
            * status
                "aoeuaoeu..."
        * invisible value='false'

* iq xmlns='jabber:client' type='error' to='resiak at gmail.com/QueegF9AC7535'
id='962323966003' from='resiak at gmail.com'
    * query xmlns='google:shared-status' version='2'
        * status
            "aoeuaoeu..."
        * show
            "default"
        * status-list show='dnd'
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
            * status
                "☕"
        * status-list show='default'
            * status
                "aoeuaoeu..."
        * invisible value='false'
    * error code='400' type='modify'
        * bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
        * text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'
            "Status text too long."
gabble/connection-DEBUG: 13/01/11 12:28:37.148663:
set_shared_status_presence_cb:  
gabble/connection-DEBUG: 13/01/11 12:28:37.148726:
set_shared_status_presence_cb: Error setting shared status error setting Google
shared status: WOCKY_XMPP_ERROR_BAD_REQUEST (#3): Status text too long.

And yet we still emit PresencesChanged for the new status:

static void
set_shared_status_presence_cb (GObject *source_object,
    GAsyncResult *res,
    gpointer user_data)
{
  GabbleConnection *self = GABBLE_CONNECTION (source_object);
  GError *error = NULL;

  DEBUG (" ");
  if (!set_shared_status_finish (self, res, &error))
    {
      DEBUG ("Error setting shared status %s",
          error->message);

      g_error_free (error);
      error = NULL;
    }

  emit_presences_changed_for_self (self);
}

because the caller of set_shared_status_async() does this:


  if (gabble_presence_update (conn->self_presence, resource, i,
          message_str, prio))
    {
      //...
      else if (priv->shared_statuses != NULL)
        {
          set_shared_status_async (conn, set_shared_status_presence_cb, NULL);
      //...

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