0.0.8-fixes
This commit is contained in:
@@ -2,7 +2,7 @@ import redis
|
||||
from tgbot.storage.profile import Profile as ProfileObj
|
||||
from tgbot.config import REDIS_URL
|
||||
|
||||
# сохраняет сессии и пересылаемые сообщения между перезагрузками
|
||||
# сохраняет сессии, айди кнопок в чатах для удаления и пересылаемые сообщения между перезагрузками
|
||||
storage = redis.from_url(REDIS_URL)
|
||||
|
||||
# хранение необходимой информации о пользователях
|
||||
|
@@ -9,7 +9,6 @@ class Profile:
|
||||
def create(self, member_id, msg=None):
|
||||
s = {
|
||||
"id": member_id,
|
||||
"request_msg_id": 0,
|
||||
"parents": [],
|
||||
"children": [],
|
||||
"chats": []
|
||||
@@ -38,7 +37,3 @@ class Profile:
|
||||
else:
|
||||
r = json.loads(data)
|
||||
return r
|
||||
|
||||
def leaving(self, s):
|
||||
if len(s['parents']) == 0:
|
||||
self.storage.delete(f'usr-{s["id"]}')
|
||||
|
Reference in New Issue
Block a user