From 722224807a5d42eaee2d1523ef361e19e1d82107 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sun, 5 Mar 2017 13:05:09 -0800 Subject: [PATCH] do not create/join inactive channels, issue #4 --- appservice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appservice.py b/appservice.py index f98f668..e6a0a46 100644 --- a/appservice.py +++ b/appservice.py @@ -96,6 +96,9 @@ def query_alias(alias): cdata = json.loads(r.text)['data'] if cdata['type'] != 'io.pnut.core.chat': abort(404) + if 'is_active' in cdata: + if not cdata['is_active']: + abort(404) raw = cdata['raw'] for item in raw: if item['type'] == 'io.pnut.core.chat-settings':