aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2016-07-15 07:35:03 -0700
committerGitHub <noreply@github.com>2016-07-15 07:35:03 -0700
commit6c864500ef506fbd33cd3cffa8214741e176f371 (patch)
tree1eaec0314bf72caf55a9048221247557de3411f5
parent4f3e9142f4f4fbc460a3b1459c4182bce7c50734 (diff)
parentf1bc04f928b7eb16495b11572dc094e4e7dbd379 (diff)
downloadwee-slack-6c864500ef506fbd33cd3cffa8214741e176f371.tar.gz
Merge pull request #234 from brimstone/fix-new-querys
Open new queries
-rw-r--r--wee_slack.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 5098748..5cc841c 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1083,16 +1083,16 @@ def command_talk(current_buffer, args):
server = servers.find(current_domain_name())
if server:
channel = server.channels.find(args)
- if not channel:
- channel.open()
- else:
+ if channel is None:
user = server.users.find(args)
if user:
user.create_dm_channel()
else:
server.buffer_prnt("User or channel {} not found.".format(args))
- if w.config_get_plugin('switch_buffer_on_join') != '0':
- w.buffer_set(channel.channel_buffer, "display", "1")
+ else:
+ channel.open()
+ if w.config_get_plugin('switch_buffer_on_join') != '0':
+ w.buffer_set(channel.channel_buffer, "display", "1")
return True
else:
return False