From db678ed227bce3ca498aa1a52c1601efb044bcb9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 16 Jan 2022 03:04:31 +0200 Subject: [PATCH] bbb --- files/classes/user.py | 5 +++-- files/routes/users.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/files/classes/user.py b/files/classes/user.py index 9e74ac286..349475011 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -522,13 +522,14 @@ class User(Base): self.bannerurl = None def ban(self, admin=None, reason=None, days=0): - if days: self.unban_utc = int(time.time()) + (days * 86400) + if days: + self.unban_utc = int(time.time()) + (days * 86400) + g.db.add(self) elif self.discord_id: remove_user(self) self.is_banned = admin.id if admin else AUTOJANNY_ID if reason: self.ban_reason = reason - g.db.add(self) @property diff --git a/files/routes/users.py b/files/routes/users.py index 9eb57394c..1aeb28d77 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -436,7 +436,7 @@ def message2(v, username): beams_client.publish_to_interests( - interests=[f'{request.host}{parent.author.id}'], + interests=[str(user.id)], publish_body={ 'web': { 'notification': {