From e215ea2fbc454158661aeed6d386f83d3604bc8a Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 20 Jun 2020 23:50:12 +0200 Subject: 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. --- wee_slack.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit