aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-08-25 19:34:12 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-08-25 19:45:18 +0200
commit1579546c4eaed2ff782cf7844b30bd73ce463c30 (patch)
tree2ea715c059f77175ea2542482f5a1d0ad53a4448 /wee_slack.py
parent6f9339bed1b2a2bb9503428c0a0845eff45588a2 (diff)
downloadwee-slack-1579546c4eaed2ff782cf7844b30bd73ce463c30.tar.gz
Don't list dms and mpdms in /slack channels
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 811b0ca..0cb575c 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3812,6 +3812,7 @@ def command_channels(data, current_buffer, args):
List the channels in the current team.
"""
team = EVENTROUTER.weechat_controller.buffers[current_buffer].team
+ channels = [channel for channel in team.channels.values() if channel.type not in ['im', 'mpim']]
def extra_info_function(channel):
if channel.active:
return "member"
@@ -3819,7 +3820,7 @@ def command_channels(data, current_buffer, args):
return "archived"
else:
return "not a member"
- return print_team_items_info(team, "Channels", team.channels.values(), extra_info_function)
+ return print_team_items_info(team, "Channels", channels, extra_info_function)
@slack_buffer_required