feat(dashboard): send room messages from web (#33)
This commit is contained in:
@@ -161,3 +161,14 @@ export async function runScheduledTaskAction(
|
||||
action,
|
||||
});
|
||||
}
|
||||
|
||||
export async function sendRoomMessage(
|
||||
roomJid: string,
|
||||
text: string,
|
||||
requestId: string,
|
||||
): Promise<{ ok: true; id: string; queued: boolean }> {
|
||||
return postJson(`/api/rooms/${encodeURIComponent(roomJid)}/messages`, {
|
||||
requestId,
|
||||
text,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user