From be265520d4e95ee902d37ae0ee4157c7a728f380 Mon Sep 17 00:00:00 2001 From: Konstantin Ivanov <54908981+konstantiniiv@users.noreply.github.com> Date: Tue, 20 May 2025 13:51:31 +0200 Subject: [PATCH] DROID-3674 Protocol | Integrate 0.41.0-rc5mobile (#2415) --- gradle/libs.versions.toml | 2 +- protocol/src/main/proto/commands.proto | 41 ++++++++++++++++++++++---- protocol/src/main/proto/models.proto | 10 ++++--- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index dae31d7279..a1558abaa2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -middlewareVersion = "v0.41.0-rc3mobile" +middlewareVersion = "v0.41.0-rc5mobile" kotlinVersion = '2.0.21' kspVersion = "2.0.21-1.0.25" diff --git a/protocol/src/main/proto/commands.proto b/protocol/src/main/proto/commands.proto index bc1c7fe82b..5ccb85e395 100644 --- a/protocol/src/main/proto/commands.proto +++ b/protocol/src/main/proto/commands.proto @@ -148,20 +148,46 @@ message Rpc { } } + message InviteChange { + message Request { + string spaceId = 1; + model.ParticipantPermissions permissions = 2; + } + + message Response { + Error error = 1; + + message Error { + Code code = 1; + string description = 2; + + enum Code { + NULL = 0; + UNKNOWN_ERROR = 1; + BAD_INPUT = 2; + + NO_SUCH_SPACE = 101; + SPACE_IS_DELETED = 102; + REQUEST_FAILED = 103; + INCORRECT_PERMISSIONS = 105; + } + } + } + } + message InviteGenerate { message Request { string spaceId = 1; - InviteType inviteType = 2; - enum InviteType { - Member = 0; - Guest = 1; - } + model.InviteType inviteType = 2; + model.ParticipantPermissions permissions = 3; } message Response { Error error = 1; string inviteCid = 2; string inviteFileKey = 3; + model.InviteType inviteType = 4; + model.ParticipantPermissions permissions = 5; message Error { Code code = 1; @@ -217,6 +243,8 @@ message Rpc { Error error = 1; string inviteCid = 2; string inviteFileKey = 3; + model.InviteType inviteType = 4; + model.ParticipantPermissions permissions = 5; message Error { Code code = 1; @@ -298,7 +326,8 @@ message Rpc { string spaceName = 3; string spaceIconCid = 4; string creatorName = 5; - bool isGuestUserInvite = 6; + bool isGuestUserInvite = 6; // deprecated, use inviteType + model.InviteType inviteType = 7; message Error { Code code = 1; diff --git a/protocol/src/main/proto/models.proto b/protocol/src/main/proto/models.proto index 92874651fb..b10480e812 100644 --- a/protocol/src/main/proto/models.proto +++ b/protocol/src/main/proto/models.proto @@ -1006,6 +1006,12 @@ enum ParticipantPermissions { NoPermissions = 3; } +enum InviteType { + Member = 0; // aclKey contains the key to sign the ACL record + Guest = 1; // guestKey contains the privateKey of the guest user + WithoutApprove = 2; // aclKey contains the key to sign the ACL record, but no approval needed +} + enum ParticipantStatus { Joining = 0; Active = 1; @@ -1204,10 +1210,6 @@ message InvitePayload { InviteType inviteType = 8; bytes guestKey = 9; - enum InviteType { - JoinAsMember = 0; // aclKey contains the key to sign the ACL record - JoinAsGuest = 1; // guestKey contains the privateKey of the guest user - } } message IdentityProfile {