aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2016-03-28 21:22:57 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2016-03-28 21:25:19 +0200
commit3c4a7f0fcd64aabb3a2400108963035dfe7a0740 (patch)
treea609a04e2183ecc6ddd34b93e2942d7e3ab0c4f4
parentc2ea5f4ed4c8bc5caae73ead6c90f51c6565e5cf (diff)
downloadwee-slack-3c4a7f0fcd64aabb3a2400108963035dfe7a0740.tar.gz
Set server localvar to team name
Instead of setting the buffer localvar server to the domain ($team.slack.com), set it to only the team name. This makes it more like what the irc plugin sets, which is the server name.
-rw-r--r--wee_slack.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 11430f7..f2f49c2 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -132,6 +132,7 @@ class SlackServer(object):
def __init__(self, token):
self.nick = None
self.name = None
+ self.team = None
self.domain = None
self.server_buffer_name = None
self.login_data = None
@@ -213,6 +214,7 @@ class SlackServer(object):
def connected_to_slack(self, login_data):
if login_data["ok"]:
+ self.team = login_data["team"]["domain"]
self.domain = login_data["team"]["domain"] + ".slack.com"
dbg("connected to {}".format(self.domain))
self.identifier = self.domain
@@ -420,7 +422,7 @@ class Channel(object):
else:
w.buffer_set(self.channel_buffer, "localvar_set_type", 'channel')
w.buffer_set(self.channel_buffer, "localvar_set_channel", self.name)
- w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.server_buffer_name)
+ w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.team)
w.buffer_set(self.channel_buffer, "short_name", self.name)
buffer_list_update_next()