about summary refs log tree commit diff stats
path: root/src/room_chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/room_chat.c')
-rw-r--r--src/room_chat.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/room_chat.c b/src/room_chat.c
index 6b560bbf..82f997f7 100644
--- a/src/room_chat.c
+++ b/src/room_chat.c
@@ -29,6 +29,7 @@ typedef struct _muc_room_t {
     char *jid;
     char *nick;
     GSList *roster;
+    gboolean roster_received;
 } muc_room;
 
 GHashTable *rooms = NULL;
@@ -47,6 +48,7 @@ room_join(const char * const jid, const char * const nick)
     new_room->jid = strdup(jid);
     new_room->nick = strdup(nick);
     new_room->roster = NULL;
+    new_room->roster_received = FALSE;
 
     g_hash_table_insert(rooms, strdup(jid), new_room);
 }
@@ -131,6 +133,28 @@ room_get_roster(const char * const jid)
     }
 }
 
+void
+room_set_roster_received(const char * const jid)
+{
+    muc_room *room = g_hash_table_lookup(rooms, jid);
+
+    if (room != NULL) {
+        room->roster_received = TRUE;
+    }
+}
+
+gboolean
+room_get_roster_received(const char * const jid)
+{
+    muc_room *room = g_hash_table_lookup(rooms, jid);
+
+    if (room != NULL) {
+        return room->roster_received;
+    } else {
+        return FALSE;
+    }
+}
+
 static void
 _room_free(muc_room *room)
 {