Make the TpTest CM emit alias and presence updates.
authorTravis Reitter <travis.reitter@collabora.co.uk>
Tue, 5 Oct 2010 23:55:13 +0000 (16:55 -0700)
committerTravis Reitter <travis.reitter@collabora.co.uk>
Wed, 6 Oct 2010 00:00:01 +0000 (17:00 -0700)
tests/lib/telepathy/contactlist/contact-list-manager.c

index 6564791..b24c8fc 100644 (file)
@@ -1036,6 +1036,8 @@ send_updated_roster (TpTestContactListManager *self,
     }
   else
     {
+      TpHandle handle;
+
       g_message ("Transmitting new state of contact %s to server", identifier);
       g_message ("\talias = %s", d->alias);
       g_message ("\tcan see our presence = %s",
@@ -1063,6 +1065,15 @@ send_updated_roster (TpTestContactListManager *self,
                   tp_handle_inspect (self->priv->group_repo, member));
             }
         }
+
+      handle = tp_handle_ensure (self->priv->contact_repo, d->id, NULL, NULL);
+      /* XXX: ideally, we'd only do this if thse specific details really
+       * changed, but it's not terribly unrealistic to think some servers or CMs
+       * would make this mistake as well. */
+      g_signal_emit (self, signals[ALIAS_UPDATED], 0, handle);
+      g_signal_emit (self, signals[PRESENCE_UPDATED], 0, handle);
+
+      tp_handle_unref (self->priv->contact_repo, handle);
     }
 }