diff options
author | Eric Wang <gnawrice@gmail.com> | 2018-10-31 12:57:43 -0700 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-10-31 20:57:43 +0100 |
commit | 584f9e6c5af3ed1be4f9f04cef6f7cec6d845363 (patch) | |
tree | 22626572a07011d3e21c75c95ac22b3c5dcedfd6 /wee_slack.py | |
parent | 00cf876691ef40b0975abd5b94675aaf1a59fd68 (diff) | |
download | wee-slack-584f9e6c5af3ed1be4f9f04cef6f7cec6d845363.tar.gz |
Fix typing and completion errors in core buffer (#638)
* Fix typing and completion errors in core buffer
Typing more than 8 characters or hitting tab after a non-space character
in the core buffer causes errors because the buffer is a SlackTeam
object instead of a SlackChannel.
* Add `type` attribute to SlackTeam
* Add `members` property to SlackTeam and fix `type` value
* Return dict_keys for SlackTeam.members
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index d1a526b..c0e220a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1072,6 +1072,7 @@ class SlackTeam(object): # This highlight step must happen after we have set related server self.set_highlight_words(kwargs.get('highlight_words', "")) self.load_emoji_completions() + self.type = "team" def __repr__(self): return "domain={} nick={}".format(self.subdomain, self.nick) @@ -1082,6 +1083,10 @@ class SlackTeam(object): else: return False + @property + def members(self): + return self.users.viewkeys() + def load_emoji_completions(self): self.emoji_completions = list(EMOJI) if self.emoji_completions: |