From 555f4b737ee26d57122eb446fd077172cb587f39 Mon Sep 17 00:00:00 2001 From: quadrismegistus Date: Sat, 19 Sep 2020 16:04:12 +0100 Subject: [PATCH] komrade update! --- komrade/backend/komrades.py | 18 ++++++++++++++++++ komrade/cli/cli.py | 2 -- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/komrade/backend/komrades.py b/komrade/backend/komrades.py index 116ff3b..aa53b09 100644 --- a/komrade/backend/komrades.py +++ b/komrade/backend/komrades.py @@ -245,6 +245,24 @@ class KomradeX(Caller): logfunc(f'Congratulations. Welcome, {self}.',pause=True,clear=True) # self.help() + + ## + # last minute: get posts + if 'res_posts' in resp_msg_d and resp_msg_d['res_posts'].get('success'): + id2post=resp_msg_d.get('res_posts').get('posts',{}) + if id2post: + self.log('found starter posts:',list(id2post.keys())) + self.save_posts(id2post) + resp_msg_d['status']+=f' You\'ve got {len(id2post)} new posts and 0 new messages.' + + return resp_msg_d + + + ### + + + + return resp_msg_d diff --git a/komrade/cli/cli.py b/komrade/cli/cli.py index 9b89c65..53e2753 100644 --- a/komrade/cli/cli.py +++ b/komrade/cli/cli.py @@ -126,8 +126,6 @@ class CLI(Logger): clear_screen() self.boot() - border = '-'*(40) - if not self.logged_in: