mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 18:20:28 +03:00
Feature: invite/disinvite from profile viewer
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
e25dc46863
commit
8711658e75
2 changed files with 50 additions and 10 deletions
|
|
@ -188,12 +188,15 @@ async function create(opts) {
|
|||
async function invite(roomId, userId) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
|
||||
try {
|
||||
const result = await mx.invite(roomId, userId);
|
||||
return result;
|
||||
} catch (e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
const result = await mx.invite(roomId, userId);
|
||||
return result;
|
||||
}
|
||||
|
||||
async function kick(roomId, userId) {
|
||||
const mx = initMatrix.matrixClient;
|
||||
|
||||
const result = await mx.kick(roomId, userId);
|
||||
return result;
|
||||
}
|
||||
|
||||
function createSpaceShortcut(roomId) {
|
||||
|
|
@ -212,6 +215,6 @@ function deleteSpaceShortcut(roomId) {
|
|||
|
||||
export {
|
||||
join, leave,
|
||||
create, invite,
|
||||
create, invite, kick,
|
||||
createSpaceShortcut, deleteSpaceShortcut,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue