aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-08-24 17:00:13 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-08-25 19:42:02 +0200
commit21d0548b64672c84db8e364d7004912bf714fe28 (patch)
tree64b57d270db30250585eb88e6fb5cfe1a2454503
parente8a4b7bec7575a8d240f32ffad9c8b0bf81c0207 (diff)
downloadwee-slack-21d0548b64672c84db8e364d7004912bf714fe28.tar.gz
Show member status in /slack channels command
-rw-r--r--wee_slack.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 7c59e7b..861a4ae 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3737,7 +3737,13 @@ def command_channels(data, current_buffer, args):
team.buffer_prnt("Channels:")
for channel in team.channels.values():
- team.buffer_prnt(" {}".format(channel.name))
+ if channel.active:
+ status = "member"
+ elif getattr(channel, "is_archived", None):
+ status = "archived"
+ else:
+ status = "not a member"
+ team.buffer_prnt(" {:<40}({})".format(channel.name, status))
return w.WEECHAT_RC_OK_EAT