diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-13 00:26:49 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-08-07 19:18:06 +0200 |
commit | 8b7358ea453f59c7f8a18be8c775a00f45338480 (patch) | |
tree | 85147610373bc3e4f24bdd3c3aee04817b7bbbcb /wee_slack.py | |
parent | c10f41397abebde67111f6d773cbcf3615afd6a9 (diff) | |
download | wee-slack-8b7358ea453f59c7f8a18be8c775a00f45338480.tar.gz |
Add option to only use full names
Fixes #100
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index b4caec8..e1481d3 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3476,7 +3476,11 @@ def modify_last_print_time(buffer_pointer, ts_minor): def nick_from_profile(profile, username): - nick = profile.get('display_name') or profile.get('real_name') or username + full_name = profile.get('real_name') or username + if config.use_full_names: + nick = full_name + else: + nick = profile.get('display_name') or full_name return nick.replace(' ', '') @@ -4597,6 +4601,11 @@ class PluginConfig(object): desc='When activity occurs on a buffer, unhide it even if it was' ' previously hidden (whether by the user or by the' ' distracting_channels setting).'), + 'use_full_names': Setting( + default='false', + desc='Use full names as the nicks for all users. When this is' + ' false (the default), display names will be used if set, with a' + ' fallback to the full name if display name is not set.'), } # Set missing settings to their defaults. Load non-missing settings from |