status-go/protocol/protobuf/application_metadata_messag...

100 lines
3.2 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
option go_package = "./;protobuf";
package protobuf;
message ApplicationMetadataMessage {
// Signature of the payload field
bytes signature = 1;
// This is the encoded protobuf of the application level message, i.e ChatMessage
bytes payload = 2;
// The type of protobuf message sent
Type type = 3;
enum Type {
reserved 14;
reserved "SYNC_INSTALLATION_PUBLIC_CHAT";
UNKNOWN = 0;
CHAT_MESSAGE = 1;
CONTACT_UPDATE = 2;
MEMBERSHIP_UPDATE_MESSAGE = 3;
SYNC_PAIR_INSTALLATION = 4;
DEPRECATED_SYNC_INSTALLATION = 5 [deprecated=true];
REQUEST_ADDRESS_FOR_TRANSACTION = 6;
ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION = 7;
DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION = 8;
REQUEST_TRANSACTION = 9;
SEND_TRANSACTION = 10;
DECLINE_REQUEST_TRANSACTION = 11;
SYNC_INSTALLATION_CONTACT_V2 = 12;
SYNC_INSTALLATION_ACCOUNT = 13;
2020-07-03 08:26:35 +00:00
CONTACT_CODE_ADVERTISEMENT = 15;
PUSH_NOTIFICATION_REGISTRATION = 16;
PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17;
2020-06-30 07:50:59 +00:00
PUSH_NOTIFICATION_QUERY = 18;
2020-07-03 08:26:35 +00:00
PUSH_NOTIFICATION_QUERY_RESPONSE = 19;
PUSH_NOTIFICATION_REQUEST = 20;
PUSH_NOTIFICATION_RESPONSE = 21;
EMOJI_REACTION = 22;
2020-08-07 13:49:37 +00:00
GROUP_CHAT_INVITATION = 23;
CHAT_IDENTITY = 24;
COMMUNITY_DESCRIPTION = 25;
2023-08-03 19:23:38 +00:00
COMMUNITY_INVITATION = 26 [deprecated=true];
2021-01-11 10:32:51 +00:00
COMMUNITY_REQUEST_TO_JOIN = 27;
PIN_MESSAGE = 28;
2021-06-07 08:31:27 +00:00
EDIT_MESSAGE = 29;
STATUS_UPDATE = 30;
DELETE_MESSAGE = 31;
SYNC_INSTALLATION_COMMUNITY = 32;
Anon Metrics Broadcast (#2198) * Protobufs and adapters * Added basic anon metric service and config init * Added fibonacci interval incrementer * Added basic Client.Start func and integrated interval incrementer * Added new processed field to app metrics table * Added id column to app metrics table * Added migration clean up * Added appmetrics GetUnprocessed and SetToProcessedByIDs and tests There was a wierd bug where metrics in the db that did not explicitly insert a value would be NULL, so could not be found by . In addition I've added a new primary id field to the app_metrics table so that updates could be done against very specific metric rows. * Updated adaptors and db to handle proto_id I need a way to distinguish individual metric items from each other so that I can ignore the ones that have been seen before. * Moved incrementer into dedicated file * Resolve incrementer test fail * Finalised the main loop functionality * Implemented delete loop framework * Updated adaptors file name * Added delete loop delay and quit, and tweak on RawMessage gen * Completed delete loop logic * Added DBLock to prevent deletion during mainLoop * Added postgres DB connection, integrated into anonmetrics.Server * Removed proto_id from SQL migration and model * Integrated postgres with Server and updated adaptors * Function name update * Added sample config files for client and server * Fixes and testing for low level e2e * make generate * Fix lint * Fix for receiving an anonMetricBatch not in server mode * Postgres test fixes * Tidy up, make vendor and make generate * delinting * Fixing database tests * Attempted fix of does: cannot open `does' (No such file or directory) not: cannot open `not' (No such file or directory) exist: cannot open `exist' (No such file or directory) error on sql resource loas * Moved all anon metric postgres migration logic and sources into a the protocol/anonmetrics package or sub packages. I don't know if this will fix the does: cannot open `does' (No such file or directory) not: cannot open `not' (No such file or directory) exist: cannot open `exist' (No such file or directory) error that happens in Jenkins but this could work * Lint for the lint god * Why doesn't the linter list all its problems at once? * test tweaks * Fix for wakuV2 change * DB reset change * Fix for postgres db migrations fails * More robust implementation of postgres test setup and teardown * Added block for anon metrics functionality * Version Bump to 0.84.0 * Added test to check anon metrics broadcast is deactivated * Protobufs and adapters * Added basic anon metric service and config init * Added new processed field to app metrics table * Added id column to app metrics table * Added migration clean up * Added appmetrics GetUnprocessed and SetToProcessedByIDs and tests There was a wierd bug where metrics in the db that did not explicitly insert a value would be NULL, so could not be found by . In addition I've added a new primary id field to the app_metrics table so that updates could be done against very specific metric rows. * Updated adaptors and db to handle proto_id I need a way to distinguish individual metric items from each other so that I can ignore the ones that have been seen before. * Added postgres DB connection, integrated into anonmetrics.Server * Removed proto_id from SQL migration and model * Integrated postgres with Server and updated adaptors * Added sample config files for client and server * Fix lint * Fix for receiving an anonMetricBatch not in server mode * Postgres test fixes * Tidy up, make vendor and make generate * Moved all anon metric postgres migration logic and sources into a the protocol/anonmetrics package or sub packages. I don't know if this will fix the does: cannot open `does' (No such file or directory) not: cannot open `not' (No such file or directory) exist: cannot open `exist' (No such file or directory) error that happens in Jenkins but this could work
2021-09-01 12:02:18 +00:00
ANONYMOUS_METRIC_BATCH = 33;
2021-10-05 17:26:02 +00:00
SYNC_CHAT_REMOVED = 34;
2021-10-12 10:33:32 +00:00
SYNC_CHAT_MESSAGES_READ = 35;
BACKUP = 36;
SYNC_ACTIVITY_CENTER_READ = 37;
SYNC_ACTIVITY_CENTER_ACCEPTED = 38;
SYNC_ACTIVITY_CENTER_DISMISSED = 39;
2022-01-17 03:42:11 +00:00
SYNC_BOOKMARK = 40;
2022-02-10 10:00:59 +00:00
SYNC_CLEAR_HISTORY = 41;
Sync Settings (#2478) * Sync Settings * Added valueHandlers and Database singleton Some issues remain, need a way to comparing incoming sql.DB to check if the connection is to a different file or not. Maybe make singleton instance per filename * Added functionality to check the sqlite filename * Refactor of Database.SaveSyncSettings to be used as a handler * Implemented inteface for setting sync protobuf factories * Refactored and completed adhoc send setting sync * Tidying up * Immutability refactor * Refactor settings into dedicated package * Breakout structs * Tidy up * Refactor of bulk settings sync * Bug fixes * Addressing feedback * Fix code dropped during rebase * Fix for db closed * Fix for node config related crashes * Provisional fix for type assertion - issue 2 * Adding robust type assertion checks * Partial fix for null literal db storage and json encoding * Fix for passively handling nil sql.DB, and checking if elem has len and if len is 0 * Added test for preferred name behaviour * Adding saved sync settings to MessengerResponse * Completed granular initial sync and clock from network on save * add Settings to isEmpty * Refactor of protobufs, partially done * Added syncSetting receiver handling, some bug fixes * Fix for sticker packs * Implement inactive flag on sync protobuf factory * Refactor of types and structs * Added SettingField.CanSync functionality * Addressing rebase artifact * Refactor of Setting SELECT queries * Refactor of string return queries * VERSION bump and migration index bump * Deactiveate Sync Settings * Deactiveated preferred_name and send_status_updates Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-03-23 18:47:00 +00:00
SYNC_SETTING = 42;
COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK = 43;
SYNC_PROFILE_PICTURES = 44;
SYNC_ACCOUNT = 45;
ACCEPT_CONTACT_REQUEST = 46;
RETRACT_CONTACT_REQUEST = 47;
COMMUNITY_REQUEST_TO_JOIN_RESPONSE = 48;
SYNC_COMMUNITY_SETTINGS = 49;
REQUEST_CONTACT_VERIFICATION = 50;
ACCEPT_CONTACT_VERIFICATION = 51;
DECLINE_CONTACT_VERIFICATION = 52;
SYNC_TRUSTED_USER = 53;
SYNC_VERIFICATION_REQUEST = 54;
2022-08-07 14:25:03 +00:00
SYNC_CONTACT_REQUEST_DECISION = 56;
COMMUNITY_REQUEST_TO_LEAVE = 57;
2022-09-28 11:42:17 +00:00
SYNC_DELETE_FOR_ME_MESSAGE = 58;
SYNC_SAVED_ADDRESS = 59;
COMMUNITY_CANCEL_REQUEST_TO_JOIN = 60;
CANCEL_CONTACT_VERIFICATION = 61;
SYNC_KEYPAIR = 62;
SYNC_SOCIAL_LINKS = 63;
SYNC_ENS_USERNAME_DETAIL = 64;
reserved 65;
reserved "SYNC_ACTIVITY_CENTER_NOTIFICATIONS";
2023-11-02 15:07:03 +00:00
// No need to sync AC state now since we allow exist different number of ACs between paired devices
// Also we will update AC state after sync AC decision
reserved 66;
reserved "SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE";
COMMUNITY_EVENTS_MESSAGE = 67;
COMMUNITY_EDIT_SHARED_ADDRESSES = 68;
SYNC_ACCOUNT_CUSTOMIZATION_COLOR = 69;
SYNC_ACCOUNTS_POSITIONS = 70;
COMMUNITY_EVENTS_MESSAGE_REJECTED = 71;
COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE = 72;
COMMUNITY_SHARD_KEY = 73;
SYNC_CHAT = 74;
SYNC_ACTIVITY_CENTER_DELETED = 75;
SYNC_ACTIVITY_CENTER_UNREAD = 76;
SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION = 77;
}
}