aboutsummaryrefslogtreecommitdiffstats
path: root/ejabberdrpc.py
diff options
context:
space:
mode:
Diffstat (limited to 'ejabberdrpc.py')
-rwxr-xr-xejabberdrpc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ejabberdrpc.py b/ejabberdrpc.py
index b2cc908..cee769b 100755
--- a/ejabberdrpc.py
+++ b/ejabberdrpc.py
@@ -109,7 +109,11 @@ class EjabberdMetrics():
def fetch_muc(self, vhost=None):
host = "global"
if vhost is not None:
- host = "conference." + vhost
+ version = self._cmd("status", {})
+ if "19.09" in version:
+ host = "conference." + vhost
+ else:
+ host = vhost
result = self._cmd("muc_online_rooms", {"host": host})
if "rooms" in result:
return len(result["rooms"])