mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 18:50:29 +03:00
added msg deletion support
This commit is contained in:
parent
80d4a2b242
commit
3453451df9
3 changed files with 40 additions and 5 deletions
|
|
@ -189,6 +189,19 @@ async function invite(roomId, userId) {
|
|||
}
|
||||
}
|
||||
|
||||
async function redact(roomId, eventId, reason) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
|
||||
try {
|
||||
await mx.redactEvent(roomId, eventId, undefined, typeof reason === 'undefined' ? undefined : { reason });
|
||||
return true;
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
join, leave, create, invite,
|
||||
join, leave,
|
||||
create, invite,
|
||||
redact,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue