added join channel function

This commit is contained in:
Ren Amamiya
2023-04-11 14:46:00 +07:00
parent 4729250550
commit ac5e78a6b8
5 changed files with 112 additions and 7 deletions

View File

@@ -48,6 +48,10 @@ export function createChannel(data: CreateChannelData) {
return invoke<Channel>('create_channel', { data });
}
export function updateChannel(data: UpdateChannelData) {
return invoke<Channel>('update_channel', { data });
}
export function getChannels(data: GetChannelData) {
return invoke<Channel[]>('get_channels', { data });
}
@@ -96,6 +100,7 @@ export type GetChatData = { account_id: number };
export type GetChannelData = { limit: number; offset: number };
export type CreateChannelData = { event_id: string; content: string; account_id: number };
export type GetPlebPubkeyData = { pubkey: string };
export type UpdateChannelData = { event_id: string; active: boolean };
export type GetActiveChannelData = { active: boolean };
export type GetPlebData = { account_id: number };
export type CreateAccountData = { pubkey: string; privkey: string; metadata: string };