refactor(community): add invite function (#158)

This commit is contained in:
Jonathan Rainville 2022-01-10 10:07:00 -05:00 committed by saledjenic
parent 0f84fd2621
commit 240c7a3650
1 changed files with 7 additions and 1 deletions

View File

@ -220,4 +220,10 @@ proc banUserFromCommunity*(communityId: string, pubKey: string): RpcResponse[Jso
}])
proc setCommunityMuted*(communityId: string, muted: bool): RpcResponse[JsonNode] {.raises: [Exception].} =
return callPrivateRPC("setCommunityMuted".prefix, %*[communityId, muted])
return callPrivateRPC("setCommunityMuted".prefix, %*[communityId, muted])
proc inviteUsersToCommunity*(communityId: string, pubKeys: seq[string]): RpcResponse[JsonNode] {.raises: [Exception].} =
return callPrivateRPC("inviteUsersToCommunity".prefix, %*[{
"communityId": communityId,
"users": pubKeys
}])