Improve handling of disappearing photos and files

Fixes #508
This commit is contained in:
Tulir Asokan
2022-01-31 15:43:39 +02:00
parent ebd2a38e56
commit 6bf3d10e29
6 changed files with 135 additions and 12 deletions
+13 -1
View File
@@ -16,6 +16,7 @@
from mautrix.util.async_db import Database
from .bot_chat import BotChat
from .disappearing_message import DisappearingMessage
from .message import Message
from .portal import Portal
from .puppet import Puppet
@@ -27,7 +28,17 @@ from .user import User
def init(db: Database) -> None:
for table in (Portal, Message, Reaction, User, Puppet, TelegramFile, BotChat, PgSession):
for table in (
Portal,
Message,
Reaction,
User,
Puppet,
TelegramFile,
BotChat,
PgSession,
DisappearingMessage,
):
table.db = db
@@ -42,4 +53,5 @@ __all__ = [
"TelegramFile",
"BotChat",
"PgSession",
"DisappearingMessage",
]