changeset 2584:f8e4d855001e

plugin XEP-0045: display a note when no configuration is available on the room
author Goffi <goffi@goffi.org>
date Fri, 11 May 2018 18:18:06 +0200 (2018-05-11)
parents 8378806a70fe
children 0112c1f7dcf0
files sat/plugins/plugin_xep_0045.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0045.py	Fri May 11 17:24:37 2018 +0200
+++ b/sat/plugins/plugin_xep_0045.py	Fri May 11 18:18:06 2018 +0200
@@ -280,6 +280,9 @@
             return defer.fail(exceptions.DataError)
 
         def xmluiReceived(xmlui):
+            if not xmlui:
+                msg = D_(u"No configuration available for this room")
+                return {"xmlui": xml_tools.note(msg).toXml()}
             return {"xmlui": xmlui.toXml()}
         return self.configureRoom(client, room_jid).addCallback(xmluiReceived)