Fix Telegram -> Matrix image bridging
This commit is contained in:
@@ -112,7 +112,7 @@ class TelegramFile(Base):
|
||||
mxc = Column(String)
|
||||
mime_type = Column(String)
|
||||
was_converted = Column(Boolean)
|
||||
timestamp = Column(BigInteger, primary_key=True)
|
||||
timestamp = Column(BigInteger)
|
||||
|
||||
|
||||
def init(db_session):
|
||||
|
||||
@@ -44,7 +44,7 @@ def _convert_webp(file, to="png"):
|
||||
async def transfer_file_to_matrix(db, client, intent, location):
|
||||
if isinstance(location, (Document, InputDocumentFileLocation)):
|
||||
id = f"{location.id}-{location.version}"
|
||||
elif not isinstance(location, (FileLocation, InputFileLocation)):
|
||||
elif isinstance(location, (FileLocation, InputFileLocation)):
|
||||
id = f"{location.volume_id}-{location.local_id}"
|
||||
else:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user