|
@@ -796,7 +796,10 @@ class Portal(DBPortal, BasePortal):
|
|
|
upload_file_name = None
|
|
|
|
|
|
mxc = await intent.upload_media(
|
|
|
- data, mime_type=upload_mime_type, filename=upload_file_name
|
|
|
+ data,
|
|
|
+ mime_type=upload_mime_type,
|
|
|
+ filename=upload_file_name,
|
|
|
+ async_upload=self.config["homeserver.async_media"],
|
|
|
)
|
|
|
|
|
|
if decryption_info:
|
|
@@ -1388,6 +1391,11 @@ class Portal(DBPortal, BasePortal):
|
|
|
exc_info=True,
|
|
|
)
|
|
|
|
|
|
+ async def get_dm_puppet(self) -> pu.Puppet | None:
|
|
|
+ if not self.is_direct:
|
|
|
+ return None
|
|
|
+ return await pu.Puppet.get_by_pk(self.other_user_pk)
|
|
|
+
|
|
|
# endregion
|
|
|
# region Backfilling
|
|
|
|