added useChannelMetadata and support kind 41

This commit is contained in:
Ren Amamiya
2023-04-19 09:33:46 +07:00
parent 697caca77b
commit b84c0ff0d6
3 changed files with 65 additions and 5 deletions

View File

@@ -127,6 +127,12 @@ export async function createChannel(event_id: string, metadata: string, created_
]);
}
// update channel metadata
export async function updateChannelMetadata(event_id: string, value: string) {
const db = await connect();
return await db.execute(`UPDATE channels SET metadata = "${value}" WHERE event_id = "${event_id}";`);
}
// get all chats
export async function getChats(account_id: number) {
const db = await connect();