[Telepathy-commits] [telepathy-gabble/master] Change presence to unknown for all muc members when leaving the muc

Sjoerd Simons sjoerd at luon.net
Tue Aug 19 10:54:08 PDT 2008


20080721145949-93b9a-6ec116e988fabdf00e27c7423316fa814975a98f.gz
---
 src/muc-channel.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/muc-channel.c b/src/muc-channel.c
index 05fbe1f..2ed13d2 100644
--- a/src/muc-channel.c
+++ b/src/muc-channel.c
@@ -44,6 +44,7 @@
 #include "presence.h"
 #include "namespaces.h"
 #include "util.h"
+#include "presence-cache.h"
 
 #define DEFAULT_JOIN_TIMEOUT (180 * 1000)
 #define MAX_NICK_RETRIES 3
@@ -1326,6 +1327,7 @@ close_channel (GabbleMucChannel *chan, const gchar *reason,
 {
   GabbleMucChannelPrivate *priv;
   TpIntSet *set;
+  GArray *handles;
 
   g_assert (GABBLE_IS_MUC_CHANNEL (chan));
 
@@ -1353,6 +1355,13 @@ close_channel (GabbleMucChannel *chan, const gchar *reason,
       send_leave_message (chan, reason);
     }
 
+  handles = tp_handle_set_to_array (chan->group.members);
+
+  gabble_presence_cache_update_many (priv->conn->presence_cache, handles,
+    NULL, GABBLE_PRESENCE_UNKNOWN, NULL, 0);
+
+  g_array_free (handles, TRUE);
+
   /* Update state and emit Closed signal */
   g_object_set (chan, "state", MUC_STATE_ENDED, NULL);
 
-- 
1.5.6.3




More information about the Telepathy-commits mailing list