From 59673b97d4317619f9fa9ca46ab4db1c79802988 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Thu, 2 Oct 2014 14:23:51 -0700 Subject: use float time for timestamps --- wee_slack.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index eaa5d9b..7229c06 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -343,7 +343,7 @@ def slack_never_away_cb(data, remaining): ### Slack specific requests def slack_mark_channel_read(channel_id): - t = int(time.time()) + t = time.time() + 1 if channel_id.startswith('C'): reply = async_slack_api_request("channels.mark", {"channel":channel_id,"ts":t}) elif channel_id.startswith('D'): @@ -352,7 +352,7 @@ def slack_mark_channel_read(channel_id): def connect_to_slack(): global login_data, nick, connected, general_buffer_ptr, nick_ptr, name, domain data = {} - t = int(time.time()) + t = time.time() request = "rtm.start?t=%s" % t data["token"] = slack_api_token data = urllib.urlencode(data) @@ -399,7 +399,7 @@ def create_slack_websocket(data): #NOTE: switched to async/curl because sync slowed down the UI def async_slack_api_request(request, data): - t = int(time.time()) + t = time.time() request += "?t=%s" % t data["token"] = slack_api_token data = urllib.urlencode(data) @@ -408,7 +408,7 @@ def async_slack_api_request(request, data): return True def slack_api_request(request, data): - t = int(time.time()) + t = time.time() request += "?t=%s" % t data["token"] = slack_api_token data = urllib.urlencode(data) -- cgit