From 240c7a36502bb35e863a5872e3020c841af65328 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Mon, 10 Jan 2022 10:07:00 -0500 Subject: [PATCH] refactor(community): add invite function (#158) --- status/statusgo_backend_new/communities.nim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/status/statusgo_backend_new/communities.nim b/status/statusgo_backend_new/communities.nim index 6d25563..8a06d47 100644 --- a/status/statusgo_backend_new/communities.nim +++ b/status/statusgo_backend_new/communities.nim @@ -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]) \ No newline at end of file + 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 + }]) \ No newline at end of file