display channel members

This commit is contained in:
Ren Amamiya
2023-06-17 14:25:20 +07:00
parent c9f7d942a0
commit c51eb0cf1d
4 changed files with 33 additions and 11 deletions

View File

@@ -328,6 +328,14 @@ export async function getChannelMessages(channel_id: string) {
);
}
// get channel users
export async function getChannelUsers(channel_id: string) {
const db = await connect();
return await db.select(
`SELECT DISTINCT pubkey FROM channel_messages WHERE channel_id = "${channel_id}";`,
);
}
// get all chats by pubkey
export async function getChatsByPubkey(pubkey: string) {
const db = await connect();