From 9baef079ecf14fa58fdcbd1ab48d86f9d4dbe609 Mon Sep 17 00:00:00 2001 From: Orakaro Date: Thu, 21 Nov 2019 19:24:46 +0900 Subject: [PATCH] Fix miliseconds --- rainbowstream/draw.py | 3 +-- rainbowstream/rainbow.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rainbowstream/draw.py b/rainbowstream/draw.py index 215bfb3..2fcdeb4 100644 --- a/rainbowstream/draw.py +++ b/rainbowstream/draw.py @@ -487,8 +487,7 @@ def print_right_message(m): printNicely(screen_line) printNicely(dotline) # Format clock - date = parser.parse(m['created_at']) - date = arrow.get(date).to('local').datetime + date = arrow.get(int(m['created_at'])/1000).to('local').datetime # Read Unixtime in miliseconds clock_format = '%Y/%m/%d %H:%M:%S' try: clock_format = c['FORMAT']['MESSAGE']['CLOCK_FORMAT'] diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index c42437b..822f3bb 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -839,7 +839,7 @@ def inbox(): messages = t.direct_messages.events.list()['events'] messages = list(map(map_message, messages)) inbox = list(filter(inboxFilter, messages)) - sent = list(filter(inboxFilter, messages)) + sent = list(filter(sentFilter, messages)) d = {} uniq_inbox = list(set( -- 2.25.1