handle larger messages (#531)

* p

* u

* f

* u

* c
This commit is contained in:
Felicio Mununga 2024-03-15 11:04:03 +09:00 committed by GitHub
parent 3dba75d8aa
commit 22e727ee73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 482 additions and 114 deletions

View File

@ -0,0 +1,5 @@
---
'@status-im/js': patch
---
set MAX_DATA_LENGTH

View File

@ -10,39 +10,94 @@ message ApplicationMetadataMessage {
Type type = 3;
enum Type {
TYPE_UNKNOWN_UNSPECIFIED = 0;
TYPE_CHAT_MESSAGE = 1;
TYPE_CONTACT_UPDATE = 2;
TYPE_MEMBERSHIP_UPDATE_MESSAGE = 3;
TYPE_PAIR_INSTALLATION = 4;
TYPE_SYNC_INSTALLATION = 5;
TYPE_REQUEST_ADDRESS_FOR_TRANSACTION = 6;
TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION = 7;
TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION = 8;
TYPE_REQUEST_TRANSACTION = 9;
TYPE_SEND_TRANSACTION = 10;
TYPE_DECLINE_REQUEST_TRANSACTION = 11;
TYPE_SYNC_INSTALLATION_CONTACT = 12;
TYPE_SYNC_INSTALLATION_ACCOUNT = 13;
TYPE_SYNC_INSTALLATION_PUBLIC_CHAT = 14;
TYPE_CONTACT_CODE_ADVERTISEMENT = 15;
TYPE_PUSH_NOTIFICATION_REGISTRATION = 16;
TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17;
TYPE_PUSH_NOTIFICATION_QUERY = 18;
TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE = 19;
TYPE_PUSH_NOTIFICATION_REQUEST = 20;
TYPE_PUSH_NOTIFICATION_RESPONSE = 21;
TYPE_EMOJI_REACTION = 22;
TYPE_GROUP_CHAT_INVITATION = 23;
TYPE_CHAT_IDENTITY = 24;
TYPE_COMMUNITY_DESCRIPTION = 25;
TYPE_COMMUNITY_INVITATION = 26;
TYPE_COMMUNITY_REQUEST_TO_JOIN = 27;
TYPE_PIN_MESSAGE = 28;
TYPE_EDIT_MESSAGE = 29;
TYPE_STATUS_UPDATE = 30;
TYPE_DELETE_MESSAGE = 31;
TYPE_SYNC_INSTALLATION_COMMUNITY = 32;
TYPE_ANONYMOUS_METRIC_BATCH = 33;
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;
CONTACT_CODE_ADVERTISEMENT = 15;
PUSH_NOTIFICATION_REGISTRATION = 16;
PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17;
PUSH_NOTIFICATION_QUERY = 18;
PUSH_NOTIFICATION_QUERY_RESPONSE = 19;
PUSH_NOTIFICATION_REQUEST = 20;
PUSH_NOTIFICATION_RESPONSE = 21;
EMOJI_REACTION = 22;
GROUP_CHAT_INVITATION = 23;
CHAT_IDENTITY = 24;
COMMUNITY_DESCRIPTION = 25;
COMMUNITY_INVITATION = 26 [deprecated=true];
COMMUNITY_REQUEST_TO_JOIN = 27;
PIN_MESSAGE = 28;
EDIT_MESSAGE = 29;
STATUS_UPDATE = 30;
DELETE_MESSAGE = 31;
SYNC_INSTALLATION_COMMUNITY = 32;
ANONYMOUS_METRIC_BATCH = 33;
SYNC_CHAT_REMOVED = 34;
SYNC_CHAT_MESSAGES_READ = 35;
BACKUP = 36;
SYNC_ACTIVITY_CENTER_READ = 37;
SYNC_ACTIVITY_CENTER_ACCEPTED = 38;
SYNC_ACTIVITY_CENTER_DISMISSED = 39;
SYNC_BOOKMARK = 40;
SYNC_CLEAR_HISTORY = 41;
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;
SYNC_CONTACT_REQUEST_DECISION = 56;
COMMUNITY_REQUEST_TO_LEAVE = 57;
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";
// 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;
SYNC_TOKEN_PREFERENCES = 78;
COMMUNITY_PUBLIC_SHARD_INFO = 79;
SYNC_COLLECTIBLE_PREFERENCES = 80;
COMMUNITY_USER_KICKED = 81;
SYNC_PROFILE_SHOWCASE_PREFERENCES = 82;
COMMUNITY_PUBLIC_STORENODES_INFO = 83;
COMMUNITY_REEVALUATE_PERMISSIONS_REQUEST = 84;
}
}

View File

@ -36,7 +36,7 @@ export class ApplicationMetadataMessage extends Message<ApplicationMetadataMessa
*
* @generated from field: ApplicationMetadataMessage.Type type = 3;
*/
type = ApplicationMetadataMessage_Type.UNKNOWN_UNSPECIFIED
type = ApplicationMetadataMessage_Type.UNKNOWN
constructor(data?: PartialMessage<ApplicationMetadataMessage>) {
super()
@ -96,213 +96,497 @@ export class ApplicationMetadataMessage extends Message<ApplicationMetadataMessa
*/
export enum ApplicationMetadataMessage_Type {
/**
* @generated from enum value: TYPE_UNKNOWN_UNSPECIFIED = 0;
* @generated from enum value: UNKNOWN = 0;
*/
UNKNOWN_UNSPECIFIED = 0,
UNKNOWN = 0,
/**
* @generated from enum value: TYPE_CHAT_MESSAGE = 1;
* @generated from enum value: CHAT_MESSAGE = 1;
*/
CHAT_MESSAGE = 1,
/**
* @generated from enum value: TYPE_CONTACT_UPDATE = 2;
* @generated from enum value: CONTACT_UPDATE = 2;
*/
CONTACT_UPDATE = 2,
/**
* @generated from enum value: TYPE_MEMBERSHIP_UPDATE_MESSAGE = 3;
* @generated from enum value: MEMBERSHIP_UPDATE_MESSAGE = 3;
*/
MEMBERSHIP_UPDATE_MESSAGE = 3,
/**
* @generated from enum value: TYPE_PAIR_INSTALLATION = 4;
* @generated from enum value: SYNC_PAIR_INSTALLATION = 4;
*/
PAIR_INSTALLATION = 4,
SYNC_PAIR_INSTALLATION = 4,
/**
* @generated from enum value: TYPE_SYNC_INSTALLATION = 5;
* @generated from enum value: DEPRECATED_SYNC_INSTALLATION = 5 [deprecated = true];
* @deprecated
*/
SYNC_INSTALLATION = 5,
DEPRECATED_SYNC_INSTALLATION = 5,
/**
* @generated from enum value: TYPE_REQUEST_ADDRESS_FOR_TRANSACTION = 6;
* @generated from enum value: REQUEST_ADDRESS_FOR_TRANSACTION = 6;
*/
REQUEST_ADDRESS_FOR_TRANSACTION = 6,
/**
* @generated from enum value: TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION = 7;
* @generated from enum value: ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION = 7;
*/
ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION = 7,
/**
* @generated from enum value: TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION = 8;
* @generated from enum value: DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION = 8;
*/
DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION = 8,
/**
* @generated from enum value: TYPE_REQUEST_TRANSACTION = 9;
* @generated from enum value: REQUEST_TRANSACTION = 9;
*/
REQUEST_TRANSACTION = 9,
/**
* @generated from enum value: TYPE_SEND_TRANSACTION = 10;
* @generated from enum value: SEND_TRANSACTION = 10;
*/
SEND_TRANSACTION = 10,
/**
* @generated from enum value: TYPE_DECLINE_REQUEST_TRANSACTION = 11;
* @generated from enum value: DECLINE_REQUEST_TRANSACTION = 11;
*/
DECLINE_REQUEST_TRANSACTION = 11,
/**
* @generated from enum value: TYPE_SYNC_INSTALLATION_CONTACT = 12;
* @generated from enum value: SYNC_INSTALLATION_CONTACT_V2 = 12;
*/
SYNC_INSTALLATION_CONTACT = 12,
SYNC_INSTALLATION_CONTACT_V2 = 12,
/**
* @generated from enum value: TYPE_SYNC_INSTALLATION_ACCOUNT = 13;
* @generated from enum value: SYNC_INSTALLATION_ACCOUNT = 13;
*/
SYNC_INSTALLATION_ACCOUNT = 13,
/**
* @generated from enum value: TYPE_SYNC_INSTALLATION_PUBLIC_CHAT = 14;
*/
SYNC_INSTALLATION_PUBLIC_CHAT = 14,
/**
* @generated from enum value: TYPE_CONTACT_CODE_ADVERTISEMENT = 15;
* @generated from enum value: CONTACT_CODE_ADVERTISEMENT = 15;
*/
CONTACT_CODE_ADVERTISEMENT = 15,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_REGISTRATION = 16;
* @generated from enum value: PUSH_NOTIFICATION_REGISTRATION = 16;
*/
PUSH_NOTIFICATION_REGISTRATION = 16,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17;
* @generated from enum value: PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17;
*/
PUSH_NOTIFICATION_REGISTRATION_RESPONSE = 17,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_QUERY = 18;
* @generated from enum value: PUSH_NOTIFICATION_QUERY = 18;
*/
PUSH_NOTIFICATION_QUERY = 18,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE = 19;
* @generated from enum value: PUSH_NOTIFICATION_QUERY_RESPONSE = 19;
*/
PUSH_NOTIFICATION_QUERY_RESPONSE = 19,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_REQUEST = 20;
* @generated from enum value: PUSH_NOTIFICATION_REQUEST = 20;
*/
PUSH_NOTIFICATION_REQUEST = 20,
/**
* @generated from enum value: TYPE_PUSH_NOTIFICATION_RESPONSE = 21;
* @generated from enum value: PUSH_NOTIFICATION_RESPONSE = 21;
*/
PUSH_NOTIFICATION_RESPONSE = 21,
/**
* @generated from enum value: TYPE_EMOJI_REACTION = 22;
* @generated from enum value: EMOJI_REACTION = 22;
*/
EMOJI_REACTION = 22,
/**
* @generated from enum value: TYPE_GROUP_CHAT_INVITATION = 23;
* @generated from enum value: GROUP_CHAT_INVITATION = 23;
*/
GROUP_CHAT_INVITATION = 23,
/**
* @generated from enum value: TYPE_CHAT_IDENTITY = 24;
* @generated from enum value: CHAT_IDENTITY = 24;
*/
CHAT_IDENTITY = 24,
/**
* @generated from enum value: TYPE_COMMUNITY_DESCRIPTION = 25;
* @generated from enum value: COMMUNITY_DESCRIPTION = 25;
*/
COMMUNITY_DESCRIPTION = 25,
/**
* @generated from enum value: TYPE_COMMUNITY_INVITATION = 26;
* @generated from enum value: COMMUNITY_INVITATION = 26 [deprecated = true];
* @deprecated
*/
COMMUNITY_INVITATION = 26,
/**
* @generated from enum value: TYPE_COMMUNITY_REQUEST_TO_JOIN = 27;
* @generated from enum value: COMMUNITY_REQUEST_TO_JOIN = 27;
*/
COMMUNITY_REQUEST_TO_JOIN = 27,
/**
* @generated from enum value: TYPE_PIN_MESSAGE = 28;
* @generated from enum value: PIN_MESSAGE = 28;
*/
PIN_MESSAGE = 28,
/**
* @generated from enum value: TYPE_EDIT_MESSAGE = 29;
* @generated from enum value: EDIT_MESSAGE = 29;
*/
EDIT_MESSAGE = 29,
/**
* @generated from enum value: TYPE_STATUS_UPDATE = 30;
* @generated from enum value: STATUS_UPDATE = 30;
*/
STATUS_UPDATE = 30,
/**
* @generated from enum value: TYPE_DELETE_MESSAGE = 31;
* @generated from enum value: DELETE_MESSAGE = 31;
*/
DELETE_MESSAGE = 31,
/**
* @generated from enum value: TYPE_SYNC_INSTALLATION_COMMUNITY = 32;
* @generated from enum value: SYNC_INSTALLATION_COMMUNITY = 32;
*/
SYNC_INSTALLATION_COMMUNITY = 32,
/**
* @generated from enum value: TYPE_ANONYMOUS_METRIC_BATCH = 33;
* @generated from enum value: ANONYMOUS_METRIC_BATCH = 33;
*/
ANONYMOUS_METRIC_BATCH = 33,
/**
* @generated from enum value: SYNC_CHAT_REMOVED = 34;
*/
SYNC_CHAT_REMOVED = 34,
/**
* @generated from enum value: SYNC_CHAT_MESSAGES_READ = 35;
*/
SYNC_CHAT_MESSAGES_READ = 35,
/**
* @generated from enum value: BACKUP = 36;
*/
BACKUP = 36,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_READ = 37;
*/
SYNC_ACTIVITY_CENTER_READ = 37,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_ACCEPTED = 38;
*/
SYNC_ACTIVITY_CENTER_ACCEPTED = 38,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_DISMISSED = 39;
*/
SYNC_ACTIVITY_CENTER_DISMISSED = 39,
/**
* @generated from enum value: SYNC_BOOKMARK = 40;
*/
SYNC_BOOKMARK = 40,
/**
* @generated from enum value: SYNC_CLEAR_HISTORY = 41;
*/
SYNC_CLEAR_HISTORY = 41,
/**
* @generated from enum value: SYNC_SETTING = 42;
*/
SYNC_SETTING = 42,
/**
* @generated from enum value: COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK = 43;
*/
COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK = 43,
/**
* @generated from enum value: SYNC_PROFILE_PICTURES = 44;
*/
SYNC_PROFILE_PICTURES = 44,
/**
* @generated from enum value: SYNC_ACCOUNT = 45;
*/
SYNC_ACCOUNT = 45,
/**
* @generated from enum value: ACCEPT_CONTACT_REQUEST = 46;
*/
ACCEPT_CONTACT_REQUEST = 46,
/**
* @generated from enum value: RETRACT_CONTACT_REQUEST = 47;
*/
RETRACT_CONTACT_REQUEST = 47,
/**
* @generated from enum value: COMMUNITY_REQUEST_TO_JOIN_RESPONSE = 48;
*/
COMMUNITY_REQUEST_TO_JOIN_RESPONSE = 48,
/**
* @generated from enum value: SYNC_COMMUNITY_SETTINGS = 49;
*/
SYNC_COMMUNITY_SETTINGS = 49,
/**
* @generated from enum value: REQUEST_CONTACT_VERIFICATION = 50;
*/
REQUEST_CONTACT_VERIFICATION = 50,
/**
* @generated from enum value: ACCEPT_CONTACT_VERIFICATION = 51;
*/
ACCEPT_CONTACT_VERIFICATION = 51,
/**
* @generated from enum value: DECLINE_CONTACT_VERIFICATION = 52;
*/
DECLINE_CONTACT_VERIFICATION = 52,
/**
* @generated from enum value: SYNC_TRUSTED_USER = 53;
*/
SYNC_TRUSTED_USER = 53,
/**
* @generated from enum value: SYNC_VERIFICATION_REQUEST = 54;
*/
SYNC_VERIFICATION_REQUEST = 54,
/**
* @generated from enum value: SYNC_CONTACT_REQUEST_DECISION = 56;
*/
SYNC_CONTACT_REQUEST_DECISION = 56,
/**
* @generated from enum value: COMMUNITY_REQUEST_TO_LEAVE = 57;
*/
COMMUNITY_REQUEST_TO_LEAVE = 57,
/**
* @generated from enum value: SYNC_DELETE_FOR_ME_MESSAGE = 58;
*/
SYNC_DELETE_FOR_ME_MESSAGE = 58,
/**
* @generated from enum value: SYNC_SAVED_ADDRESS = 59;
*/
SYNC_SAVED_ADDRESS = 59,
/**
* @generated from enum value: COMMUNITY_CANCEL_REQUEST_TO_JOIN = 60;
*/
COMMUNITY_CANCEL_REQUEST_TO_JOIN = 60,
/**
* @generated from enum value: CANCEL_CONTACT_VERIFICATION = 61;
*/
CANCEL_CONTACT_VERIFICATION = 61,
/**
* @generated from enum value: SYNC_KEYPAIR = 62;
*/
SYNC_KEYPAIR = 62,
/**
* @generated from enum value: SYNC_SOCIAL_LINKS = 63;
*/
SYNC_SOCIAL_LINKS = 63,
/**
* @generated from enum value: SYNC_ENS_USERNAME_DETAIL = 64;
*/
SYNC_ENS_USERNAME_DETAIL = 64,
/**
* @generated from enum value: COMMUNITY_EVENTS_MESSAGE = 67;
*/
COMMUNITY_EVENTS_MESSAGE = 67,
/**
* @generated from enum value: COMMUNITY_EDIT_SHARED_ADDRESSES = 68;
*/
COMMUNITY_EDIT_SHARED_ADDRESSES = 68,
/**
* @generated from enum value: SYNC_ACCOUNT_CUSTOMIZATION_COLOR = 69;
*/
SYNC_ACCOUNT_CUSTOMIZATION_COLOR = 69,
/**
* @generated from enum value: SYNC_ACCOUNTS_POSITIONS = 70;
*/
SYNC_ACCOUNTS_POSITIONS = 70,
/**
* @generated from enum value: COMMUNITY_EVENTS_MESSAGE_REJECTED = 71;
*/
COMMUNITY_EVENTS_MESSAGE_REJECTED = 71,
/**
* @generated from enum value: COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE = 72;
*/
COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE = 72,
/**
* @generated from enum value: COMMUNITY_SHARD_KEY = 73;
*/
COMMUNITY_SHARD_KEY = 73,
/**
* @generated from enum value: SYNC_CHAT = 74;
*/
SYNC_CHAT = 74,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_DELETED = 75;
*/
SYNC_ACTIVITY_CENTER_DELETED = 75,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_UNREAD = 76;
*/
SYNC_ACTIVITY_CENTER_UNREAD = 76,
/**
* @generated from enum value: SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION = 77;
*/
SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION = 77,
/**
* @generated from enum value: SYNC_TOKEN_PREFERENCES = 78;
*/
SYNC_TOKEN_PREFERENCES = 78,
/**
* @generated from enum value: COMMUNITY_PUBLIC_SHARD_INFO = 79;
*/
COMMUNITY_PUBLIC_SHARD_INFO = 79,
/**
* @generated from enum value: SYNC_COLLECTIBLE_PREFERENCES = 80;
*/
SYNC_COLLECTIBLE_PREFERENCES = 80,
/**
* @generated from enum value: COMMUNITY_USER_KICKED = 81;
*/
COMMUNITY_USER_KICKED = 81,
/**
* @generated from enum value: SYNC_PROFILE_SHOWCASE_PREFERENCES = 82;
*/
SYNC_PROFILE_SHOWCASE_PREFERENCES = 82,
/**
* @generated from enum value: COMMUNITY_PUBLIC_STORENODES_INFO = 83;
*/
COMMUNITY_PUBLIC_STORENODES_INFO = 83,
/**
* @generated from enum value: COMMUNITY_REEVALUATE_PERMISSIONS_REQUEST = 84;
*/
COMMUNITY_REEVALUATE_PERMISSIONS_REQUEST = 84,
}
// Retrieve enum metadata with: proto3.getEnumType(ApplicationMetadataMessage_Type)
proto3.util.setEnumType(
ApplicationMetadataMessage_Type,
'ApplicationMetadataMessage.Type',
[
{ no: 0, name: 'TYPE_UNKNOWN_UNSPECIFIED' },
{ no: 1, name: 'TYPE_CHAT_MESSAGE' },
{ no: 2, name: 'TYPE_CONTACT_UPDATE' },
{ no: 3, name: 'TYPE_MEMBERSHIP_UPDATE_MESSAGE' },
{ no: 4, name: 'TYPE_PAIR_INSTALLATION' },
{ no: 5, name: 'TYPE_SYNC_INSTALLATION' },
{ no: 6, name: 'TYPE_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 7, name: 'TYPE_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 8, name: 'TYPE_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 9, name: 'TYPE_REQUEST_TRANSACTION' },
{ no: 10, name: 'TYPE_SEND_TRANSACTION' },
{ no: 11, name: 'TYPE_DECLINE_REQUEST_TRANSACTION' },
{ no: 12, name: 'TYPE_SYNC_INSTALLATION_CONTACT' },
{ no: 13, name: 'TYPE_SYNC_INSTALLATION_ACCOUNT' },
{ no: 14, name: 'TYPE_SYNC_INSTALLATION_PUBLIC_CHAT' },
{ no: 15, name: 'TYPE_CONTACT_CODE_ADVERTISEMENT' },
{ no: 16, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION' },
{ no: 17, name: 'TYPE_PUSH_NOTIFICATION_REGISTRATION_RESPONSE' },
{ no: 18, name: 'TYPE_PUSH_NOTIFICATION_QUERY' },
{ no: 19, name: 'TYPE_PUSH_NOTIFICATION_QUERY_RESPONSE' },
{ no: 20, name: 'TYPE_PUSH_NOTIFICATION_REQUEST' },
{ no: 21, name: 'TYPE_PUSH_NOTIFICATION_RESPONSE' },
{ no: 22, name: 'TYPE_EMOJI_REACTION' },
{ no: 23, name: 'TYPE_GROUP_CHAT_INVITATION' },
{ no: 24, name: 'TYPE_CHAT_IDENTITY' },
{ no: 25, name: 'TYPE_COMMUNITY_DESCRIPTION' },
{ no: 26, name: 'TYPE_COMMUNITY_INVITATION' },
{ no: 27, name: 'TYPE_COMMUNITY_REQUEST_TO_JOIN' },
{ no: 28, name: 'TYPE_PIN_MESSAGE' },
{ no: 29, name: 'TYPE_EDIT_MESSAGE' },
{ no: 30, name: 'TYPE_STATUS_UPDATE' },
{ no: 31, name: 'TYPE_DELETE_MESSAGE' },
{ no: 32, name: 'TYPE_SYNC_INSTALLATION_COMMUNITY' },
{ no: 33, name: 'TYPE_ANONYMOUS_METRIC_BATCH' },
{ no: 0, name: 'UNKNOWN' },
{ no: 1, name: 'CHAT_MESSAGE' },
{ no: 2, name: 'CONTACT_UPDATE' },
{ no: 3, name: 'MEMBERSHIP_UPDATE_MESSAGE' },
{ no: 4, name: 'SYNC_PAIR_INSTALLATION' },
{ no: 5, name: 'DEPRECATED_SYNC_INSTALLATION' },
{ no: 6, name: 'REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 7, name: 'ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 8, name: 'DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION' },
{ no: 9, name: 'REQUEST_TRANSACTION' },
{ no: 10, name: 'SEND_TRANSACTION' },
{ no: 11, name: 'DECLINE_REQUEST_TRANSACTION' },
{ no: 12, name: 'SYNC_INSTALLATION_CONTACT_V2' },
{ no: 13, name: 'SYNC_INSTALLATION_ACCOUNT' },
{ no: 15, name: 'CONTACT_CODE_ADVERTISEMENT' },
{ no: 16, name: 'PUSH_NOTIFICATION_REGISTRATION' },
{ no: 17, name: 'PUSH_NOTIFICATION_REGISTRATION_RESPONSE' },
{ no: 18, name: 'PUSH_NOTIFICATION_QUERY' },
{ no: 19, name: 'PUSH_NOTIFICATION_QUERY_RESPONSE' },
{ no: 20, name: 'PUSH_NOTIFICATION_REQUEST' },
{ no: 21, name: 'PUSH_NOTIFICATION_RESPONSE' },
{ no: 22, name: 'EMOJI_REACTION' },
{ no: 23, name: 'GROUP_CHAT_INVITATION' },
{ no: 24, name: 'CHAT_IDENTITY' },
{ no: 25, name: 'COMMUNITY_DESCRIPTION' },
{ no: 26, name: 'COMMUNITY_INVITATION' },
{ no: 27, name: 'COMMUNITY_REQUEST_TO_JOIN' },
{ no: 28, name: 'PIN_MESSAGE' },
{ no: 29, name: 'EDIT_MESSAGE' },
{ no: 30, name: 'STATUS_UPDATE' },
{ no: 31, name: 'DELETE_MESSAGE' },
{ no: 32, name: 'SYNC_INSTALLATION_COMMUNITY' },
{ no: 33, name: 'ANONYMOUS_METRIC_BATCH' },
{ no: 34, name: 'SYNC_CHAT_REMOVED' },
{ no: 35, name: 'SYNC_CHAT_MESSAGES_READ' },
{ no: 36, name: 'BACKUP' },
{ no: 37, name: 'SYNC_ACTIVITY_CENTER_READ' },
{ no: 38, name: 'SYNC_ACTIVITY_CENTER_ACCEPTED' },
{ no: 39, name: 'SYNC_ACTIVITY_CENTER_DISMISSED' },
{ no: 40, name: 'SYNC_BOOKMARK' },
{ no: 41, name: 'SYNC_CLEAR_HISTORY' },
{ no: 42, name: 'SYNC_SETTING' },
{ no: 43, name: 'COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK' },
{ no: 44, name: 'SYNC_PROFILE_PICTURES' },
{ no: 45, name: 'SYNC_ACCOUNT' },
{ no: 46, name: 'ACCEPT_CONTACT_REQUEST' },
{ no: 47, name: 'RETRACT_CONTACT_REQUEST' },
{ no: 48, name: 'COMMUNITY_REQUEST_TO_JOIN_RESPONSE' },
{ no: 49, name: 'SYNC_COMMUNITY_SETTINGS' },
{ no: 50, name: 'REQUEST_CONTACT_VERIFICATION' },
{ no: 51, name: 'ACCEPT_CONTACT_VERIFICATION' },
{ no: 52, name: 'DECLINE_CONTACT_VERIFICATION' },
{ no: 53, name: 'SYNC_TRUSTED_USER' },
{ no: 54, name: 'SYNC_VERIFICATION_REQUEST' },
{ no: 56, name: 'SYNC_CONTACT_REQUEST_DECISION' },
{ no: 57, name: 'COMMUNITY_REQUEST_TO_LEAVE' },
{ no: 58, name: 'SYNC_DELETE_FOR_ME_MESSAGE' },
{ no: 59, name: 'SYNC_SAVED_ADDRESS' },
{ no: 60, name: 'COMMUNITY_CANCEL_REQUEST_TO_JOIN' },
{ no: 61, name: 'CANCEL_CONTACT_VERIFICATION' },
{ no: 62, name: 'SYNC_KEYPAIR' },
{ no: 63, name: 'SYNC_SOCIAL_LINKS' },
{ no: 64, name: 'SYNC_ENS_USERNAME_DETAIL' },
{ no: 67, name: 'COMMUNITY_EVENTS_MESSAGE' },
{ no: 68, name: 'COMMUNITY_EDIT_SHARED_ADDRESSES' },
{ no: 69, name: 'SYNC_ACCOUNT_CUSTOMIZATION_COLOR' },
{ no: 70, name: 'SYNC_ACCOUNTS_POSITIONS' },
{ no: 71, name: 'COMMUNITY_EVENTS_MESSAGE_REJECTED' },
{ no: 72, name: 'COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE' },
{ no: 73, name: 'COMMUNITY_SHARD_KEY' },
{ no: 74, name: 'SYNC_CHAT' },
{ no: 75, name: 'SYNC_ACTIVITY_CENTER_DELETED' },
{ no: 76, name: 'SYNC_ACTIVITY_CENTER_UNREAD' },
{ no: 77, name: 'SYNC_ACTIVITY_CENTER_COMMUNITY_REQUEST_DECISION' },
{ no: 78, name: 'SYNC_TOKEN_PREFERENCES' },
{ no: 79, name: 'COMMUNITY_PUBLIC_SHARD_INFO' },
{ no: 80, name: 'SYNC_COLLECTIBLE_PREFERENCES' },
{ no: 81, name: 'COMMUNITY_USER_KICKED' },
{ no: 82, name: 'SYNC_PROFILE_SHOWCASE_PREFERENCES' },
{ no: 83, name: 'COMMUNITY_PUBLIC_STORENODES_INFO' },
{ no: 84, name: 'COMMUNITY_REEVALUATE_PERMISSIONS_REQUEST' },
]
)

View File

@ -307,9 +307,18 @@ class RequestClient {
// eslint-disable-next-line no-empty
}
const decodedMetadata =
ApplicationMetadataMessage.fromBinary(messageToDecode)
if (!decodedMetadata.payload) {
let decodedMetadata
try {
decodedMetadata = ApplicationMetadataMessage.fromBinary(messageToDecode)
} catch {
return
}
if (
!decodedMetadata ||
!decodedMetadata.payload ||
!decodedMetadata.signature.length
) {
return
}

View File

@ -0,0 +1,15 @@
diff --git a/node_modules/it-length-prefixed/dist/src/decode.js b/node_modules/it-length-prefixed/dist/src/decode.js
index 313fdff..9f2a618 100644
--- a/node_modules/it-length-prefixed/dist/src/decode.js
+++ b/node_modules/it-length-prefixed/dist/src/decode.js
@@ -6,7 +6,9 @@ import { isAsyncIterable } from './utils.js';
// Maximum length of the length section of the message
export const MAX_LENGTH_LENGTH = 8; // Varint.encode(Number.MAX_SAFE_INTEGER).length
// Maximum length of the data section of the message
-export const MAX_DATA_LENGTH = 1024 * 1024 * 4;
+// export const MAX_DATA_LENGTH = 1024 * 1024 * 4;
+// note: https://github.com/status-im/status-go/blob/afd72ace28ed6629297820af73053cea3e73e63b/waku/common/const.go#L43C33-L43C49
+export const MAX_DATA_LENGTH = 10 * 1024 * 1024;
var ReadMode;
(function (ReadMode) {
ReadMode[ReadMode["LENGTH"] = 0] = "LENGTH";