diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-20 23:50:12 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-20 23:58:22 +0200 |
commit | e215ea2fbc454158661aeed6d386f83d3604bc8a (patch) | |
tree | 419d5c6ea74176dfe6a179899079673f3204a070 | |
parent | 1c5883f1dedcf70edcc140712d7008038ed2ffa2 (diff) | |
download | wee-slack-e215ea2fbc454158661aeed6d386f83d3604bc8a.tar.gz |
Support showing buflist presence when short_name is overridden
When you set a short name, the prefix wee-slack sets (# for channels,
+ for dms with present users etc.) is normally dropped so the short name
is exactly how the user wants it. However that makes it impossible to
see presence in the buflist when short name is set (unless you set it
with /label which keeps the prefix). Therefore, if the short name is set
to a name starting with a space, replace the space with + if the user is
present. This gives the same prefix behavior and characters as when
short name is not set.
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index b615545..c2d93a7 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1851,6 +1851,8 @@ class SlackChannel(SlackChannelCommon): if self.label_short_drop_prefix: if show_typing: name = prepend + name[1:] + elif self.type == "im" and present and config.show_buflist_presence and name[0] == " ": + name = prepend + name[1:] else: name = prepend + name |