2020-09-29 12:37:19 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2021-08-06 15:40:23 +00:00
|
|
|
option go_package = "./;protobuf";
|
2020-09-29 12:37:19 +00:00
|
|
|
package protobuf;
|
|
|
|
|
2020-09-29 12:38:52 +00:00
|
|
|
import "enums.proto";
|
2023-11-09 18:59:01 +00:00
|
|
|
import "profile_showcase.proto";
|
2020-09-29 12:38:52 +00:00
|
|
|
|
2020-09-29 12:51:35 +00:00
|
|
|
// ChatIdentity represents the user defined identity associated with their public chat key
|
2020-09-29 12:37:19 +00:00
|
|
|
message ChatIdentity {
|
2020-09-29 12:51:35 +00:00
|
|
|
// Lamport timestamp of the message
|
2020-09-29 12:37:19 +00:00
|
|
|
uint64 clock = 1;
|
|
|
|
|
|
|
|
// ens_name is the valid ENS name associated with the chat key
|
|
|
|
string ens_name = 2;
|
|
|
|
|
2020-09-29 14:51:09 +00:00
|
|
|
// images is a string indexed mapping of images associated with an identity
|
2020-09-29 12:37:19 +00:00
|
|
|
map<string, IdentityImage> images = 3;
|
2020-11-18 09:16:51 +00:00
|
|
|
|
2022-02-17 15:13:10 +00:00
|
|
|
// display name is the user set identity
|
2020-11-18 09:16:51 +00:00
|
|
|
string display_name = 4;
|
|
|
|
|
2022-08-02 12:56:26 +00:00
|
|
|
// description is the user set description
|
2020-11-18 09:16:51 +00:00
|
|
|
string description = 5;
|
|
|
|
|
|
|
|
string color = 6;
|
2021-10-04 13:02:25 +00:00
|
|
|
|
|
|
|
string emoji = 7;
|
2022-08-02 12:56:26 +00:00
|
|
|
|
2024-05-24 08:35:34 +00:00
|
|
|
repeated SocialLink social_links = 8 [deprecated = true];
|
2022-09-02 08:36:07 +00:00
|
|
|
|
|
|
|
// first known message timestamp in seconds (valid only for community chats for now)
|
|
|
|
// 0 - unknown
|
|
|
|
// 1 - no messages
|
|
|
|
uint32 first_message_timestamp = 9;
|
2023-11-09 18:59:01 +00:00
|
|
|
|
|
|
|
ProfileShowcase profile_showcase = 10;
|
2024-05-24 08:35:34 +00:00
|
|
|
|
|
|
|
uint32 customization_color = 11;
|
2020-09-29 12:37:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ProfileImage represents data associated with a user's profile image
|
|
|
|
message IdentityImage {
|
|
|
|
|
|
|
|
// payload is a context based payload for the profile image data,
|
|
|
|
// context is determined by the `source_type`
|
|
|
|
bytes payload = 1;
|
|
|
|
|
|
|
|
// source_type signals the image payload source
|
|
|
|
SourceType source_type = 2;
|
|
|
|
|
2024-01-24 20:09:28 +00:00
|
|
|
// image_format signals the image format and method of parsing the payload
|
|
|
|
ImageFormat image_format = 3;
|
2021-02-09 13:52:21 +00:00
|
|
|
|
|
|
|
// encryption_keys is a list of encrypted keys that can be used to decrypted an encrypted payload
|
|
|
|
repeated bytes encryption_keys = 4;
|
2020-09-29 12:37:19 +00:00
|
|
|
|
2021-02-11 17:07:11 +00:00
|
|
|
// encrypted signals the encryption state of the payload, default is false.
|
|
|
|
bool encrypted = 5;
|
|
|
|
|
2020-09-29 12:37:19 +00:00
|
|
|
// SourceType are the predefined types of image source allowed
|
|
|
|
enum SourceType {
|
|
|
|
UNKNOWN_SOURCE_TYPE = 0;
|
|
|
|
|
|
|
|
// RAW_PAYLOAD image byte data
|
|
|
|
RAW_PAYLOAD = 1;
|
|
|
|
|
|
|
|
// ENS_AVATAR uses the ENS record's resolver get-text-data.avatar data
|
|
|
|
// The `payload` field will be ignored if ENS_AVATAR is selected
|
2020-09-29 12:51:35 +00:00
|
|
|
// The application will read and parse the ENS avatar data as image payload data, URLs will be ignored
|
2020-09-29 12:37:19 +00:00
|
|
|
// The parent `ChatMessageIdentity` must have a valid `ens_name` set
|
|
|
|
ENS_AVATAR = 2;
|
|
|
|
}
|
|
|
|
}
|
2022-08-02 12:56:26 +00:00
|
|
|
|
|
|
|
// SocialLinks represents social link assosiated with given chat identity (personal/community)
|
|
|
|
message SocialLink {
|
|
|
|
string text = 1;
|
|
|
|
string url = 2;
|
|
|
|
}
|