Fix warnings when uploading to non-E2E room

Fix these:

    <Unknown File>: media_crypt_dict is undefined.
    Adding an object with a undefined member does not create a role for it.
This commit is contained in:
miruka 2020-09-04 14:57:09 -04:00
parent 56f676e35d
commit acb1367f11
2 changed files with 3 additions and 1 deletions

View File

@ -1426,7 +1426,7 @@ class MatrixClient(nio.AsyncClient):
filesize = filesize, filesize = filesize,
) )
return UploadReturn(response.content_uri, mime, decryption_dict) return UploadReturn(response.content_uri, mime, decryption_dict or {})
async def set_avatar_from_file(self, path: Union[Path, str]) -> None: async def set_avatar_from_file(self, path: Union[Path, str]) -> None:

View File

@ -35,9 +35,11 @@ HLoader {
item[prop] = value item[prop] = value
recycled() recycled()
print("r")
} else { } else {
pageLoader.setSource(componentUrl, properties) pageLoader.setSource(componentUrl, properties)
window.uiState.page = componentUrl window.uiState.page = componentUrl
print("X")
} }
window.uiState.pageProperties = properties window.uiState.pageProperties = properties