about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 6d6a4092..a447031b 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1589,6 +1589,28 @@ _ui_room_message(const char * const room_jid, const char * const nick,
 }
 
 static void
+_ui_room_requires_config(const char * const room_jid)
+{
+    ProfWin *window = wins_get_by_recipient(room_jid);
+    if (window == NULL) {
+        log_error("Received room config request, but no window open for %s.", room_jid);
+    } else {
+        int num = wins_get_num(window);
+
+        win_save_vprint(window, '!', NULL, 0, COLOUR_ROOMINFO, "", "Room requires configuration, use '/room config accept' or '/room config cancel'");
+
+        // currently in groupchat window
+        if (wins_is_current(window)) {
+            status_bar_active(num);
+
+        // not currenlty on groupchat window
+        } else {
+            status_bar_new(num);
+        }
+    }
+}
+
+static void
 _ui_room_subject(const char * const room_jid, const char * const subject)
 {
     ProfWin *window = wins_get_by_recipient(room_jid);
@@ -2063,4 +2085,5 @@ ui_init_module(void)
     ui_handle_room_join_error = _ui_handle_room_join_error;
     ui_swap_wins = _ui_swap_wins;
     ui_update = _ui_update;
+    ui_room_requires_config = _ui_room_requires_config;
 }