mirror of
https://github.com/status-im/status-go.git
synced 2025-01-23 13:11:11 +00:00
89251e8416
* Added community sync protobuf * Updated community sync send logic * Integrated syncCommunity handling * Added synced_at field and tidied up some other logic * persistence testing * Added testing and join functionality * Fixed issue with empty scan params * Finshed persistence tests for new db funcs * Midway debug of description not persisting after sync * Resolved final issues and tidied up * Polish * delint * Fix error not handled on SetPrivateKey * fix infinite loop, again * Added muted option and test fix * Added Muted to syncing functions, not just in persistence * Fix bug introduced with Muted property * Added a couple of notes for future devs * Added most of the sync RequestToJoin functionality Tests need to be completed and tests are giving some errors * Finished tests for getJoinedAndPending * Added note * Resolving lint * Fix of protobuf gen bug * Fixes to community sync tests * Fixes to test * Continued fix of e2e * Final fix to e2e testing * Updated migration position * resolve missing import * Apparently the linter spellchecks * Fix bug from #2276 merge * Bug fix for leaving quirkiness * Addressed superfluous MessengerResponse field * Addressed feedback * VERSION bump
82 lines
1.8 KiB
Protocol Buffer
82 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "./;protobuf";
|
|
import "chat_identity.proto";
|
|
|
|
package protobuf;
|
|
|
|
message Grant {
|
|
bytes community_id = 1;
|
|
bytes member_id = 2;
|
|
string chat_id = 3;
|
|
uint64 clock = 4;
|
|
}
|
|
|
|
message CommunityMember {
|
|
enum Roles {
|
|
UNKNOWN_ROLE = 0;
|
|
ROLE_ALL = 1;
|
|
ROLE_MANAGE_USERS = 2;
|
|
}
|
|
repeated Roles roles = 1;
|
|
}
|
|
|
|
message CommunityPermissions {
|
|
enum Access {
|
|
UNKNOWN_ACCESS = 0;
|
|
NO_MEMBERSHIP = 1;
|
|
INVITATION_ONLY = 2;
|
|
ON_REQUEST = 3;
|
|
}
|
|
|
|
bool ens_only = 1;
|
|
// https://gitlab.matrix.org/matrix-org/olm/blob/master/docs/megolm.md is a candidate for the algorithm to be used in case we want to have private communityal chats, lighter than pairwise encryption using the DR, less secure, but more efficient for large number of participants
|
|
bool private = 2;
|
|
Access access = 3;
|
|
}
|
|
|
|
message CommunityDescription {
|
|
uint64 clock = 1;
|
|
map<string,CommunityMember> members = 2;
|
|
CommunityPermissions permissions = 3;
|
|
ChatIdentity identity = 5;
|
|
map<string,CommunityChat> chats = 6;
|
|
repeated string ban_list = 7;
|
|
map<string,CommunityCategory> categories = 8;
|
|
}
|
|
|
|
message CommunityChat {
|
|
map<string,CommunityMember> members = 1;
|
|
CommunityPermissions permissions = 2;
|
|
ChatIdentity identity = 3;
|
|
string category_id = 4;
|
|
int32 position = 5;
|
|
}
|
|
|
|
message CommunityCategory {
|
|
string category_id = 1;
|
|
string name = 2;
|
|
int32 position = 3;
|
|
}
|
|
|
|
message CommunityInvitation {
|
|
bytes community_description = 1;
|
|
bytes grant = 2;
|
|
string chat_id = 3;
|
|
bytes public_key = 4;
|
|
}
|
|
|
|
message CommunityRequestToJoin {
|
|
uint64 clock = 1;
|
|
string ens_name = 2;
|
|
string chat_id = 3;
|
|
bytes community_id = 4;
|
|
}
|
|
|
|
message CommunityRequestToJoinResponse {
|
|
uint64 clock = 1;
|
|
CommunityDescription community = 2;
|
|
bool accepted = 3;
|
|
bytes grant = 4;
|
|
}
|