Add redacting event via context menu

This commit is contained in:
vSLG
2020-03-26 17:31:57 -03:00
committed by miruka
parent 554f5d6013
commit b3f1075507
4 changed files with 58 additions and 0 deletions

View File

@@ -875,6 +875,18 @@ class MatrixClient(nio.AsyncClient):
return (successes, errors)
async def room_mass_redact(
self, room_id: str, reason: str, *event_ids: str,
):
"""Redact events from a room in parallel.
Returns a list of sucessful redacts.
"""
return await asyncio.gather(*[
self.room_redact(room_id, evt_id, reason)
for evt_id in event_ids
])
async def generate_thumbnail(
self, data: UploadData, is_svg: bool = False,