mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
baa0767c26
This commit does a few things: 1) Handle membership updates using protobuf and adds the relevant endpoints. 2) Store in memory a map of chats + contacts for faster lookups, which are then flushed to disk on each update 3) Validate incoming messages Sorry for the large pr, but you know, v1 :)
23 lines
471 B
Protocol Buffer
23 lines
471 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
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 {
|
|
UNKNOWN = 0;
|
|
CHAT_MESSAGE = 1;
|
|
CONTACT_REQUEST = 2;
|
|
MEMBERSHIP_UPDATE_MESSAGE = 3;
|
|
PAIR_INSTALLATION = 4;
|
|
SYNC_INSTALLATION = 5;
|
|
}
|
|
}
|