Always use protobufs by reference & generate handlers

This commit is contained in:
Andrea Maria Piana 2023-08-18 12:39:59 +01:00
parent 9d782edb4d
commit 8dd1b66d69
2372 changed files with 131316 additions and 11510 deletions

View File

@ -274,7 +274,7 @@ install-xtools: ##@install Install Miscellaneous Go Tools
GO111MODULE=on go install golang.org/x/tools/go/packages/...@v0.1.5
generate: ##@other Regenerate assets and other auto-generated stuff
go generate ./static ./static/mailserver_db_migrations ./t ./multiaccounts/... ./appdatabase/... ./protocol/... ./walletdatabase/...
go generate ./static ./static/mailserver_db_migrations ./t ./multiaccounts/... ./appdatabase/... ./protocol/... ./walletdatabase/... ./_assets/generate_handlers
prepare-release: clean-release
mkdir -p $(RELEASE_DIR)
@ -319,7 +319,7 @@ test-unit: ##@tests Run unit and integration tests
for file in $(UNIT_TEST_PACKAGES); do \
set -e; \
path=$$(echo $$file | cut -d\/ -f 4-); \
go test -tags '$(BUILD_TAGS)' -timeout 20m -v -failfast $$file $(gotest_extraflags) | \
go test -tags '$(BUILD_TAGS)' -timeout 30m -v -failfast $$file $(gotest_extraflags) | \
go-junit-report -iocopy -out $${path}/report.xml; \
done

View File

@ -18,7 +18,7 @@ pipeline {
options {
/* Prevent Jenkins jobs from running forever */
timeout(time: 30, unit: 'MINUTES')
timeout(time: 40, unit: 'MINUTES')
disableConcurrentBuilds()
/* Go requires a certain directory structure */
checkoutToSubdirectory('src/github.com/status-im/status-go')

View File

@ -14,7 +14,7 @@ pipeline {
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 30, unit: 'MINUTES')
timeout(time: 40, unit: 'MINUTES')
disableConcurrentBuilds()
/* manage how many builds we keep */
buildDiscarder(logRotator(

View File

@ -0,0 +1,126 @@
//go:generate go run generate_handlers.go
package main
import (
"fmt"
"io/ioutil"
"os"
"regexp"
"strings"
"text/template"
)
// EnumType defines the type of the protobuf enum
type EnumType struct {
Name string
Values []string
}
// MethodInfo holds information about a method
type MethodInfo struct {
ProtobufName string
MethodName string
EnumValue string
ProcessRaw bool
SyncMessage bool
}
func main() {
inputFile := "../../protocol/protobuf/application_metadata_message.proto"
outputFile := "../../protocol/messenger_handlers.go"
templateFile := "./generate_handlers_template.txt"
enumName := "Type"
// Load the protobuf file
content, err := ioutil.ReadFile(inputFile)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
templateFileContent, err := os.ReadFile(templateFile)
if err != nil {
fmt.Println("Failed to read template:", err)
os.Exit(1)
}
// Extract enum values
enum := extractEnum(content, enumName)
// Prepare method information
var methodInfos []MethodInfo
for _, value := range enum.Values {
protobufName := toCamelCase(value)
if protobufName == "Unknown" || strings.HasPrefix(value, "DEPRECATED") {
continue
}
methodName := "handle" + protobufName + "Protobuf"
info := MethodInfo{MethodName: methodName, ProtobufName: protobufName, EnumValue: value}
if strings.HasPrefix(value, "SYNC_") {
info.SyncMessage = true
}
if protobufName == "PushNotificationRegistration" {
info.ProcessRaw = true
}
methodInfos = append(methodInfos, info)
}
// Generate code
templateCode := string(templateFileContent)
tmpl, err := template.New("handlers").Parse(templateCode)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
output, err := os.Create(outputFile)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
defer output.Close()
err = tmpl.Execute(output, methodInfos)
if err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
fmt.Printf("Generated handlers in %s for %s enum.\n", outputFile, enumName)
}
func extractEnum(content []byte, enumName string) EnumType {
enumPattern := fmt.Sprintf(`enum\s+%s\s*{([^}]+)}`, enumName)
re := regexp.MustCompile(enumPattern)
match := re.FindStringSubmatch(string(content))
if len(match) != 2 {
fmt.Println("Enum not found")
os.Exit(1)
}
valuesPattern := `(?m)^\s*([A-Z_0-9]+)\s*=\s*\d+;`
re = regexp.MustCompile(valuesPattern)
valueMatches := re.FindAllStringSubmatch(match[1], -1)
values := make([]string, len(valueMatches))
for i, match := range valueMatches {
values[i] = strings.TrimSpace(match[1])
}
return EnumType{Name: enumName, Values: values}
}
func toCamelCase(s string) string {
words := strings.Split(strings.ToLower(s), "_")
for i, word := range words {
words[i] = strings.Title(word)
}
return strings.Join(words, "")
}

View File

@ -0,0 +1,57 @@
//nolint
// Code generated by generate_handlers.go. DO NOT EDIT.
// source: geneate_handlers.go
package protocol
import (
"errors"
"github.com/golang/protobuf/proto"
"go.uber.org/zap"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/transport"
v1protocol "github.com/status-im/status-go/protocol/v1"
)
func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter) error {
switch msg.Type {
{{ range .}}
case protobuf.ApplicationMetadataMessage_{{.EnumValue}}:
return m.{{.MethodName}}(messageState, protoBytes, msg, filter)
{{ end }}
default:
m.logger.Info("protobuf type not found", zap.String("type", string(msg.Type)))
return errors.New("protobuf type not found")
}
return nil
}
{{ range . }}
func (m *Messenger) {{.MethodName}}(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter) error {
m.logger.Info("handling {{ .ProtobufName}}")
{{ if .SyncMessage }}
if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
m.logger.Warn("not coming from us, ignoring")
return nil
}
{{ end }}
{{ if .ProcessRaw }}
return m.Handle{{.ProtobufName}}(messageState, protoBytes, msg)
{{ else }}
p := &protobuf.{{.ProtobufName}}{}
err := proto.Unmarshal(protoBytes, p)
if err != nil {
return err
}
m.outputToCSV(msg.TransportMessage.Timestamp, msg.ID, messageState.CurrentMessageState.Contact.ID, filter.Topic, filter.ChatID, msg.Type, p)
return m.Handle{{.ProtobufName}}(messageState, p, msg)
{{ end }}
}
{{ end }}

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,6 @@ import (
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -73,7 +72,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
var buf bytes.Buffer
@ -81,7 +80,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
if clErr != nil {
return nil, err
@ -137,7 +136,7 @@ func _0001_appDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0001_app.down.sql", size: 356, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0001_app.down.sql", size: 356, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb5, 0x25, 0xa0, 0xf8, 0x7d, 0x2d, 0xd, 0xcf, 0x18, 0xe4, 0x73, 0xc3, 0x95, 0xf5, 0x24, 0x20, 0xa9, 0xe6, 0x9e, 0x1d, 0x93, 0xe5, 0xc5, 0xad, 0x93, 0x8f, 0x5e, 0x40, 0xb5, 0x30, 0xaa, 0x25}}
return a, nil
}
@ -157,7 +156,7 @@ func _0001_appUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0001_app.up.sql", size: 2967, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0001_app.up.sql", size: 2967, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf7, 0x3a, 0xa7, 0xf2, 0x8f, 0xfa, 0x82, 0x7c, 0xc5, 0x49, 0xac, 0xac, 0xf, 0xc, 0x77, 0xe2, 0xba, 0xe8, 0x4d, 0xe, 0x6f, 0x5d, 0x2c, 0x2c, 0x18, 0x80, 0xc2, 0x1d, 0xe, 0x25, 0xe, 0x18}}
return a, nil
}
@ -177,7 +176,7 @@ func _0002_tokensDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0002_tokens.down.sql", size: 19, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0002_tokens.down.sql", size: 19, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd1, 0x31, 0x2, 0xcc, 0x2f, 0x38, 0x90, 0xf7, 0x58, 0x37, 0x47, 0xf4, 0x18, 0xf7, 0x72, 0x74, 0x67, 0x14, 0x7e, 0xf3, 0xb1, 0xd6, 0x5f, 0xb0, 0xd5, 0xe7, 0x91, 0xf4, 0x26, 0x77, 0x8e, 0x68}}
return a, nil
}
@ -197,7 +196,7 @@ func _0002_tokensUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0002_tokens.up.sql", size: 248, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0002_tokens.up.sql", size: 248, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcc, 0xd6, 0xde, 0xd3, 0x7b, 0xee, 0x92, 0x11, 0x38, 0xa4, 0xeb, 0x84, 0xca, 0xcb, 0x37, 0x75, 0x5, 0x77, 0x7f, 0x14, 0x39, 0xee, 0xa1, 0x8b, 0xd4, 0x5c, 0x6e, 0x55, 0x6, 0x50, 0x16, 0xd4}}
return a, nil
}
@ -217,7 +216,7 @@ func _0003_settingsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0003_settings.down.sql", size: 118, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0003_settings.down.sql", size: 118, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe5, 0xa6, 0xf5, 0xc0, 0x60, 0x64, 0x77, 0xe2, 0xe7, 0x3c, 0x9b, 0xb1, 0x52, 0xa9, 0x95, 0x16, 0xf8, 0x60, 0x2f, 0xa5, 0xeb, 0x46, 0xb9, 0xb9, 0x8f, 0x4c, 0xf4, 0xfd, 0xbb, 0xe7, 0xe5, 0xe5}}
return a, nil
}
@ -237,7 +236,7 @@ func _0003_settingsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0003_settings.up.sql", size: 1311, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0003_settings.up.sql", size: 1311, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xea, 0x35, 0x0, 0xeb, 0xe2, 0x33, 0x68, 0xb9, 0xf4, 0xf6, 0x8e, 0x9e, 0x10, 0xe9, 0x58, 0x68, 0x28, 0xb, 0xcd, 0xec, 0x74, 0x71, 0xa7, 0x9a, 0x5a, 0x77, 0x59, 0xb1, 0x13, 0x1c, 0xa1, 0x5b}}
return a, nil
}
@ -257,7 +256,7 @@ func _0004_pending_stickersDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0004_pending_stickers.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0004_pending_stickers.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}}
return a, nil
}
@ -277,7 +276,7 @@ func _0004_pending_stickersUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0004_pending_stickers.up.sql", size: 61, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0004_pending_stickers.up.sql", size: 61, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3c, 0xed, 0x25, 0xdf, 0x75, 0x2, 0x6c, 0xf0, 0xa2, 0xa8, 0x37, 0x62, 0x65, 0xad, 0xfd, 0x98, 0xa0, 0x9d, 0x63, 0x94, 0xdf, 0x6b, 0x46, 0xe0, 0x68, 0xec, 0x9c, 0x7f, 0x77, 0xdd, 0xb3, 0x6}}
return a, nil
}
@ -297,7 +296,7 @@ func _0005_waku_modeDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0005_waku_mode.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0005_waku_mode.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}}
return a, nil
}
@ -317,7 +316,7 @@ func _0005_waku_modeUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0005_waku_mode.up.sql", size: 146, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0005_waku_mode.up.sql", size: 146, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa6, 0x91, 0xc, 0xd7, 0x89, 0x61, 0x2e, 0x4c, 0x5a, 0xb6, 0x67, 0xd1, 0xc1, 0x42, 0x24, 0x38, 0xd6, 0x1b, 0x75, 0x41, 0x9c, 0x23, 0xb0, 0xca, 0x5c, 0xf1, 0x5c, 0xd0, 0x13, 0x92, 0x3e, 0xe1}}
return a, nil
}
@ -337,7 +336,7 @@ func _0006_appearanceUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0006_appearance.up.sql", size: 67, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0006_appearance.up.sql", size: 67, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xae, 0x6, 0x25, 0x6c, 0xe4, 0x9d, 0xa7, 0x72, 0xe8, 0xbc, 0xe4, 0x1f, 0x1e, 0x2d, 0x7c, 0xb7, 0xf6, 0xa3, 0xec, 0x3b, 0x4e, 0x93, 0x2e, 0xa4, 0xec, 0x6f, 0xe5, 0x95, 0x94, 0xe8, 0x4, 0xfb}}
return a, nil
}
@ -357,7 +356,7 @@ func _0007_enable_waku_defaultUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0007_enable_waku_default.up.sql", size: 38, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0007_enable_waku_default.up.sql", size: 38, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd4, 0x42, 0xb6, 0xe5, 0x48, 0x41, 0xeb, 0xc0, 0x7e, 0x3b, 0xe6, 0x8e, 0x96, 0x33, 0x20, 0x92, 0x24, 0x5a, 0x60, 0xfa, 0xa0, 0x3, 0x5e, 0x76, 0x4b, 0x89, 0xaa, 0x37, 0x66, 0xbc, 0x26, 0x11}}
return a, nil
}
@ -377,7 +376,7 @@ func _0008_add_push_notificationsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0008_add_push_notifications.up.sql", size: 349, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0008_add_push_notifications.up.sql", size: 349, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x5a, 0x0, 0xbf, 0xd0, 0xdd, 0xcd, 0x73, 0xe0, 0x7c, 0x56, 0xef, 0xdc, 0x57, 0x61, 0x94, 0x64, 0x70, 0xb9, 0xfa, 0xa1, 0x2a, 0x36, 0xc, 0x2f, 0xf8, 0x95, 0xa, 0x57, 0x3e, 0x7a, 0xd7, 0x12}}
return a, nil
}
@ -397,7 +396,7 @@ func _0009_enable_sending_push_notificationsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0009_enable_sending_push_notifications.down.sql", size: 49, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0009_enable_sending_push_notifications.down.sql", size: 49, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe9, 0xae, 0x1b, 0x41, 0xcb, 0x9c, 0x2c, 0x93, 0xc6, 0x2a, 0x77, 0x3, 0xb9, 0x51, 0xe0, 0x68, 0x68, 0x0, 0xf7, 0x5b, 0xb3, 0x1e, 0x94, 0x44, 0xba, 0x9c, 0xd0, 0x3b, 0x80, 0x21, 0x6f, 0xb5}}
return a, nil
}
@ -417,7 +416,7 @@ func _0009_enable_sending_push_notificationsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0009_enable_sending_push_notifications.up.sql", size: 49, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0009_enable_sending_push_notifications.up.sql", size: 49, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1b, 0x80, 0xe4, 0x9c, 0xc8, 0xb8, 0xd5, 0xef, 0xce, 0x74, 0x9b, 0x7b, 0xdd, 0xa, 0x99, 0x1e, 0xef, 0x7f, 0xb8, 0x99, 0x84, 0x4, 0x0, 0x6b, 0x1d, 0x2c, 0xa, 0xf8, 0x2c, 0x4f, 0xb5, 0x44}}
return a, nil
}
@ -437,7 +436,7 @@ func _0010_add_block_mentionsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0010_add_block_mentions.down.sql", size: 83, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0010_add_block_mentions.down.sql", size: 83, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6d, 0x9e, 0x27, 0x1e, 0xba, 0x9f, 0xca, 0xae, 0x98, 0x2e, 0x6e, 0xe3, 0xdd, 0xac, 0x73, 0x34, 0x4e, 0x69, 0x92, 0xb5, 0xf6, 0x9, 0xab, 0x50, 0x35, 0xd, 0xee, 0xeb, 0x3e, 0xcc, 0x7e, 0xce}}
return a, nil
}
@ -457,7 +456,7 @@ func _0010_add_block_mentionsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0010_add_block_mentions.up.sql", size: 89, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0010_add_block_mentions.up.sql", size: 89, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd7, 0x23, 0x85, 0xa2, 0xb5, 0xb6, 0xb4, 0x3f, 0xdc, 0x4e, 0xff, 0xe2, 0x6b, 0x66, 0x68, 0x5e, 0xb2, 0xb4, 0x14, 0xb2, 0x1b, 0x4d, 0xb1, 0xce, 0xf7, 0x6, 0x58, 0xa7, 0xaf, 0x93, 0x3f, 0x25}}
return a, nil
}
@ -477,7 +476,7 @@ func _0011_allow_webview_permission_requestsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0011_allow_webview_permission_requests.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0011_allow_webview_permission_requests.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}}
return a, nil
}
@ -497,7 +496,7 @@ func _0011_allow_webview_permission_requestsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0011_allow_webview_permission_requests.up.sql", size: 88, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0011_allow_webview_permission_requests.up.sql", size: 88, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x43, 0x5f, 0x22, 0x4c, 0x98, 0x1d, 0xc6, 0xf4, 0x89, 0xaf, 0xf4, 0x44, 0xba, 0xf8, 0x28, 0xa7, 0xb5, 0xb9, 0xf0, 0xf2, 0xcb, 0x5, 0x59, 0x7a, 0xc, 0xdf, 0xd3, 0x38, 0xa4, 0xb8, 0x98, 0xc2}}
return a, nil
}
@ -517,7 +516,7 @@ func _0012_pending_transactionsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0012_pending_transactions.down.sql", size: 33, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0012_pending_transactions.down.sql", size: 33, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7e, 0x41, 0xfe, 0x5c, 0xd8, 0xc3, 0x29, 0xfd, 0x31, 0x78, 0x99, 0x7a, 0xeb, 0x17, 0x62, 0x88, 0x41, 0xb3, 0xe7, 0xb5, 0x5, 0x0, 0x90, 0xa1, 0x7, 0x1a, 0x23, 0x88, 0x81, 0xba, 0x56, 0x9d}}
return a, nil
}
@ -537,7 +536,7 @@ func _0012_pending_transactionsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0012_pending_transactions.up.sql", size: 321, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0012_pending_transactions.up.sql", size: 321, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd, 0x17, 0xff, 0xd7, 0xa7, 0x49, 0x1e, 0x7b, 0x34, 0x63, 0x7c, 0x53, 0xaa, 0x6b, 0x2d, 0xc8, 0xe0, 0x82, 0x21, 0x90, 0x3a, 0x94, 0xf1, 0xa6, 0xe4, 0x70, 0xe5, 0x85, 0x1a, 0x48, 0x25, 0xb}}
return a, nil
}
@ -557,7 +556,7 @@ func _0013_favouritesDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0013_favourites.down.sql", size: 23, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0013_favourites.down.sql", size: 23, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x32, 0xf8, 0x55, 0x13, 0x4f, 0x4a, 0x19, 0x83, 0x9c, 0xda, 0x34, 0xb8, 0x3, 0x54, 0x82, 0x1e, 0x99, 0x36, 0x6b, 0x42, 0x3, 0xf6, 0x43, 0xde, 0xe6, 0x32, 0xb6, 0xdf, 0xe2, 0x59, 0x8c, 0x84}}
return a, nil
}
@ -577,7 +576,7 @@ func _0013_favouritesUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0013_favourites.up.sql", size: 132, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0013_favourites.up.sql", size: 132, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbe, 0x1, 0x27, 0x38, 0x76, 0xf5, 0xcb, 0x61, 0xda, 0x5b, 0xce, 0xd9, 0x8b, 0x18, 0x77, 0x61, 0x84, 0xe7, 0x22, 0xe2, 0x13, 0x99, 0xab, 0x32, 0xbc, 0xbe, 0xed, 0x1f, 0x2f, 0xb0, 0xe4, 0x8d}}
return a, nil
}
@ -597,7 +596,7 @@ func _0014_add_use_mailserversDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0014_add_use_mailservers.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0014_add_use_mailservers.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}}
return a, nil
}
@ -617,7 +616,7 @@ func _0014_add_use_mailserversUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0014_add_use_mailservers.up.sql", size: 111, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0014_add_use_mailservers.up.sql", size: 111, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0xba, 0x65, 0xbf, 0x1b, 0xc9, 0x6d, 0x45, 0xf2, 0xf5, 0x30, 0x7c, 0xc1, 0xde, 0xb8, 0xe3, 0x3f, 0xa9, 0x2f, 0x9f, 0xea, 0x1, 0x29, 0x29, 0x65, 0xe7, 0x38, 0xab, 0xa4, 0x62, 0xf, 0xd0}}
return a, nil
}
@ -637,7 +636,7 @@ func _0015_link_previewsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0015_link_previews.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0015_link_previews.down.sql", size: 0, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24, 0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55}}
return a, nil
}
@ -657,7 +656,7 @@ func _0015_link_previewsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0015_link_previews.up.sql", size: 203, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0015_link_previews.up.sql", size: 203, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb1, 0xf7, 0x38, 0x25, 0xa6, 0xfc, 0x6b, 0x9, 0xe4, 0xd9, 0xbf, 0x58, 0x7b, 0x80, 0xd8, 0x48, 0x63, 0xde, 0xa5, 0x5e, 0x30, 0xa3, 0xeb, 0x68, 0x8e, 0x6a, 0x9f, 0xfd, 0xf4, 0x46, 0x41, 0x34}}
return a, nil
}
@ -677,7 +676,7 @@ func _0016_local_notifications_preferencesDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0016_local_notifications_preferences.down.sql", size: 43, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0016_local_notifications_preferences.down.sql", size: 43, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe0, 0x50, 0xc7, 0xdd, 0x53, 0x9c, 0x5d, 0x1e, 0xb5, 0x71, 0x25, 0x50, 0x58, 0xcf, 0x6d, 0xbe, 0x5a, 0x8, 0x12, 0xc9, 0x13, 0xd, 0x9a, 0x3d, 0x4b, 0x7a, 0x2f, 0x1b, 0xe5, 0x23, 0x52, 0x78}}
return a, nil
}
@ -697,7 +696,7 @@ func _0016_local_notifications_preferencesUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0016_local_notifications_preferences.up.sql", size: 204, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0016_local_notifications_preferences.up.sql", size: 204, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x3f, 0x3a, 0x16, 0x25, 0xdf, 0xba, 0x62, 0xd3, 0x81, 0x73, 0xc, 0x10, 0x85, 0xbc, 0x8d, 0xe, 0x1d, 0x62, 0xcb, 0xb, 0x6d, 0x8c, 0x4f, 0x63, 0x5f, 0xe2, 0xd, 0xc5, 0x46, 0xa8, 0x35, 0x5b}}
return a, nil
}
@ -717,7 +716,7 @@ func _0017_bookmarksDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0017_bookmarks.down.sql", size: 22, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0017_bookmarks.down.sql", size: 22, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9a, 0x13, 0x2a, 0x44, 0xb0, 0x3, 0x18, 0x63, 0xb8, 0x33, 0xda, 0x3a, 0xeb, 0xb8, 0xcb, 0xd1, 0x98, 0x29, 0xa7, 0xf0, 0x6, 0x9d, 0xc9, 0x62, 0xe7, 0x89, 0x7f, 0x77, 0xaf, 0xec, 0x6b, 0x8f}}
return a, nil
}
@ -737,7 +736,7 @@ func _0017_bookmarksUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0017_bookmarks.up.sql", size: 147, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0017_bookmarks.up.sql", size: 147, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbc, 0x47, 0xe1, 0xe3, 0xd8, 0xc6, 0x4, 0x6d, 0x5f, 0x2f, 0xa, 0x51, 0xa6, 0x8c, 0x6a, 0xe0, 0x3d, 0x8c, 0x91, 0x47, 0xbc, 0x1, 0x75, 0x46, 0x92, 0x2, 0x18, 0x6e, 0xe3, 0x4f, 0x18, 0x57}}
return a, nil
}
@ -757,7 +756,7 @@ func _0018_profile_pictures_visibilityUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0018_profile_pictures_visibility.up.sql", size: 84, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0018_profile_pictures_visibility.up.sql", size: 84, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc9, 0xe3, 0xc5, 0xec, 0x83, 0x55, 0x45, 0x57, 0x7a, 0xaa, 0xd2, 0xa7, 0x59, 0xa7, 0x87, 0xef, 0x63, 0x19, 0x9c, 0x46, 0x9c, 0xc5, 0x32, 0x89, 0xa4, 0x68, 0x70, 0xd8, 0x83, 0x43, 0xa4, 0x72}}
return a, nil
}
@ -777,7 +776,7 @@ func _0019_blocks_ranges_extra_dataUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0019_blocks_ranges_extra_data.up.sql", size: 89, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0019_blocks_ranges_extra_data.up.sql", size: 89, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa3, 0x96, 0x32, 0x58, 0xf0, 0xb9, 0xe1, 0x70, 0x81, 0xca, 0x8d, 0x45, 0x57, 0x8a, 0x7, 0x5d, 0x9e, 0x2a, 0x30, 0xb, 0xad, 0x5f, 0xf8, 0xd4, 0x30, 0x94, 0x73, 0x37, 0x8d, 0xc1, 0x9a, 0xed}}
return a, nil
}
@ -797,7 +796,7 @@ func _0020_metricsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0020_metrics.up.sql", size: 235, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0020_metrics.up.sql", size: 235, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe8, 0x32, 0xbc, 0xb6, 0x9b, 0x5a, 0x8f, 0x9f, 0x4c, 0x90, 0x81, 0x3e, 0x2e, 0xd1, 0x23, 0xcd, 0xf1, 0x83, 0x35, 0xca, 0x66, 0x87, 0x52, 0x4e, 0x30, 0x3e, 0x4f, 0xa8, 0xfd, 0x30, 0x16, 0xbd}}
return a, nil
}
@ -817,7 +816,7 @@ func _0021_add_session_id_to_metricsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0021_add_session_id_to_metrics.up.sql", size: 55, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0021_add_session_id_to_metrics.up.sql", size: 55, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb7, 0x81, 0xfc, 0x97, 0xd1, 0x8b, 0xea, 0x8e, 0xd7, 0xc2, 0x53, 0x62, 0xe9, 0xbc, 0xf, 0x8c, 0x46, 0x41, 0x41, 0xb7, 0x6, 0x35, 0xf5, 0xba, 0xbb, 0x28, 0x50, 0x48, 0xbf, 0x36, 0x90, 0x5c}}
return a, nil
}
@ -837,7 +836,7 @@ func _0022_pending_transfersUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0022_pending_transfers.up.sql", size: 706, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0022_pending_transfers.up.sql", size: 706, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6a, 0x9, 0xe6, 0x6, 0xae, 0x60, 0xdd, 0xbb, 0x76, 0xac, 0xe0, 0x57, 0x30, 0x67, 0x37, 0x93, 0x40, 0x13, 0xec, 0xf2, 0x6e, 0x61, 0xa, 0x14, 0xb2, 0xb1, 0xbd, 0x91, 0xf8, 0x89, 0xb3, 0xe3}}
return a, nil
}
@ -857,7 +856,7 @@ func _1618237885_settings_anon_metrics_should_sendUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1618237885_settings_anon_metrics_should_send.up.sql", size: 80, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1618237885_settings_anon_metrics_should_send.up.sql", size: 80, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xea, 0x6c, 0x1d, 0x1f, 0x54, 0x62, 0x18, 0x22, 0x5c, 0xa7, 0x8c, 0x59, 0x24, 0xd3, 0x4d, 0x55, 0xc4, 0x2a, 0x9e, 0x4c, 0x37, 0x6b, 0xfd, 0xac, 0xec, 0xb7, 0x68, 0x21, 0x26, 0x26, 0xf3, 0x92}}
return a, nil
}
@ -877,7 +876,7 @@ func _1618395756_contacts_onlyUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1618395756_contacts_only.up.sql", size: 136, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1618395756_contacts_only.up.sql", size: 136, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1, 0xe3, 0xd0, 0xe7, 0xf2, 0x6e, 0xbf, 0x27, 0xf6, 0xe2, 0x2e, 0x16, 0x4b, 0x52, 0x3b, 0xcf, 0x63, 0x52, 0xfc, 0x1d, 0x43, 0xba, 0x42, 0xf9, 0x1e, 0x1e, 0x39, 0x40, 0xed, 0x0, 0x20, 0xa8}}
return a, nil
}
@ -897,7 +896,7 @@ func _1622184614_add_default_sync_periodUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1622184614_add_default_sync_period.up.sql", size: 125, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1622184614_add_default_sync_period.up.sql", size: 125, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x60, 0x39, 0xeb, 0x8f, 0xdc, 0x1, 0x56, 0xc1, 0x9b, 0xaa, 0xda, 0x44, 0xe0, 0xdb, 0xda, 0x2c, 0xe7, 0x71, 0x8d, 0xbc, 0xc1, 0x9a, 0x4f, 0x48, 0xe0, 0x5e, 0x81, 0x1e, 0x8e, 0x6a, 0x4d, 0x3}}
return a, nil
}
@ -917,7 +916,7 @@ func _1625872445_user_statusUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1625872445_user_status.up.sql", size: 351, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1625872445_user_status.up.sql", size: 351, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0xa, 0xfe, 0x7a, 0xcc, 0x9e, 0x35, 0x26, 0xb, 0xc8, 0xf2, 0x7d, 0xfa, 0x4b, 0xcf, 0x53, 0x20, 0x76, 0xc7, 0xd, 0xbc, 0x78, 0x4f, 0x74, 0x2d, 0x2e, 0x2e, 0x7e, 0x62, 0xae, 0x78, 0x1f}}
return a, nil
}
@ -937,7 +936,7 @@ func _1627983977_add_gif_to_settingsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1627983977_add_gif_to_settings.up.sql", size: 102, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1627983977_add_gif_to_settings.up.sql", size: 102, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x63, 0xe6, 0xe1, 0x97, 0x64, 0x4c, 0xe2, 0x14, 0xb1, 0x96, 0x3a, 0xb0, 0xb9, 0xb7, 0xb5, 0x78, 0x4a, 0x39, 0x69, 0x89, 0xb7, 0x89, 0x19, 0xb8, 0x89, 0x1, 0xc5, 0xc2, 0x85, 0x53, 0xe2, 0x83}}
return a, nil
}
@ -957,7 +956,7 @@ func _1628580203_add_hidden_accountUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1628580203_add_hidden_account.up.sql", size: 67, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1628580203_add_hidden_account.up.sql", size: 67, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xcb, 0x30, 0xf1, 0xd4, 0x60, 0xe2, 0x28, 0x14, 0xcb, 0x16, 0xb, 0x9, 0xea, 0x17, 0xa, 0x9e, 0x89, 0xa8, 0x32, 0x32, 0xf8, 0x4d, 0xa0, 0xe1, 0xe5, 0x79, 0xbd, 0x7d, 0x79, 0xe9, 0x4c, 0x9e}}
return a, nil
}
@ -977,7 +976,7 @@ func _1629123384_add_id_to_app_metricsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1629123384_add_id_to_app_metrics.up.sql", size: 589, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1629123384_add_id_to_app_metrics.up.sql", size: 589, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdf, 0x66, 0xc0, 0x69, 0xb, 0xad, 0x49, 0x7c, 0x8c, 0x67, 0xb8, 0xd6, 0x8d, 0x5d, 0x86, 0x1f, 0xa4, 0x53, 0xf5, 0x8, 0x1, 0xfd, 0x38, 0x49, 0xee, 0x84, 0xc0, 0xd8, 0x17, 0x72, 0x3, 0xb3}}
return a, nil
}
@ -997,7 +996,7 @@ func _1630401853_add_opensea_enabled_to_settingsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1630401853_add_opensea_enabled_to_settings.up.sql", size: 70, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1630401853_add_opensea_enabled_to_settings.up.sql", size: 70, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6, 0x91, 0x86, 0x15, 0xc8, 0x99, 0xe3, 0xae, 0xa, 0x6e, 0x94, 0x48, 0x51, 0x5b, 0x18, 0xe0, 0xbc, 0xaf, 0x34, 0x75, 0x55, 0x61, 0xd4, 0xc1, 0x85, 0xc7, 0x3d, 0x99, 0x9e, 0x1f, 0x37, 0x56}}
return a, nil
}
@ -1017,7 +1016,7 @@ func _1630464455_createSaved_addressesTableDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.down.sql", size: 28, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.down.sql", size: 28, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x23, 0x52, 0x39, 0xb5, 0x42, 0xac, 0xcb, 0xa1, 0x44, 0xb7, 0x94, 0x26, 0x24, 0xb2, 0x12, 0xc, 0xc5, 0xbf, 0x63, 0x13, 0x6f, 0x3c, 0x4, 0x7b, 0xf0, 0xd, 0xfa, 0x55, 0x9e, 0x51, 0xf9, 0x7a}}
return a, nil
}
@ -1037,7 +1036,7 @@ func _1630464455_createSaved_addressesTableUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.up.sql", size: 187, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1630464455_create-saved_addresses-table.up.sql", size: 187, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x32, 0xf, 0x56, 0x18, 0xeb, 0x4e, 0xac, 0xd8, 0xd6, 0x91, 0xae, 0x83, 0xcf, 0x91, 0x9e, 0x4, 0x4b, 0x2, 0x1f, 0x6d, 0xba, 0xf6, 0x3, 0xf2, 0x98, 0x72, 0xf6, 0x91, 0x29, 0x96, 0x0, 0x35}}
return a, nil
}
@ -1057,7 +1056,7 @@ func _1630485153_networksDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1630485153_networks.down.sql", size: 21, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1630485153_networks.down.sql", size: 21, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbb, 0x3e, 0x57, 0xb7, 0xf7, 0x8, 0xbd, 0xb5, 0xc2, 0xea, 0xc, 0x45, 0xb7, 0x7, 0x9, 0xca, 0xe7, 0x48, 0x7e, 0x56, 0x4e, 0x44, 0x78, 0x8e, 0xe3, 0x87, 0x63, 0xaf, 0x16, 0x3f, 0xf9, 0x71}}
return a, nil
}
@ -1077,7 +1076,7 @@ func _1630485153_networksUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1630485153_networks.up.sql", size: 394, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1630485153_networks.up.sql", size: 394, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xed, 0x9, 0x1d, 0x3, 0x86, 0xbd, 0xc5, 0xde, 0x3c, 0x1b, 0x40, 0x41, 0x7c, 0x61, 0x8, 0x80, 0x53, 0x87, 0x1b, 0x5a, 0x56, 0xd, 0x88, 0x1d, 0x60, 0x24, 0xce, 0x7b, 0x8f, 0xff, 0xaf, 0x36}}
return a, nil
}
@ -1097,7 +1096,7 @@ func _1632262444_profile_pictures_show_toUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1632262444_profile_pictures_show_to.up.sql", size: 81, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1632262444_profile_pictures_show_to.up.sql", size: 81, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc3, 0xa2, 0x5a, 0x94, 0xde, 0x86, 0x2a, 0x29, 0xf5, 0xb3, 0x36, 0xe7, 0x53, 0x81, 0x55, 0xc9, 0xb5, 0xc3, 0xf4, 0x8c, 0x65, 0x2c, 0x4c, 0x48, 0xfd, 0x3c, 0xb7, 0x14, 0xb4, 0xea, 0x7a, 0x13}}
return a, nil
}
@ -1117,7 +1116,7 @@ func _1635942153_add_telemetry_server_url_to_settingsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1635942153_add_telemetry_server_url_to_settings.up.sql", size: 128, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1635942153_add_telemetry_server_url_to_settings.up.sql", size: 128, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x6e, 0x9b, 0x1d, 0x39, 0x9c, 0x8d, 0x50, 0x86, 0xdf, 0xe5, 0x81, 0x55, 0xdc, 0x31, 0xcd, 0xb7, 0xc7, 0x5a, 0x67, 0x3b, 0x21, 0x99, 0xa5, 0x74, 0xb8, 0xd3, 0x58, 0xae, 0x29, 0x68, 0x2a, 0x8d}}
return a, nil
}
@ -1137,7 +1136,7 @@ func _1635942154_add_backup_settingUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1635942154_add_backup_setting.up.sql", size: 287, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1635942154_add_backup_setting.up.sql", size: 287, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb7, 0xe7, 0xfb, 0x70, 0x80, 0x5, 0xb4, 0x7b, 0x67, 0x8, 0x6e, 0x5f, 0x45, 0x17, 0xd9, 0x5f, 0x18, 0x66, 0x2f, 0x8a, 0x4f, 0xd4, 0x15, 0xe5, 0x2b, 0xbb, 0x25, 0x7a, 0x30, 0xad, 0x4c, 0x1a}}
return a, nil
}
@ -1157,7 +1156,7 @@ func _1637745568_add_auto_message_settingUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1637745568_add_auto_message_setting.up.sql", size: 122, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1637745568_add_auto_message_setting.up.sql", size: 122, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1d, 0xd8, 0xd2, 0xc2, 0x3a, 0xd7, 0xf1, 0x96, 0x6a, 0x35, 0xe5, 0x5c, 0xb9, 0xed, 0x4b, 0xf2, 0x5f, 0x80, 0x43, 0xca, 0x40, 0x57, 0x7e, 0xd7, 0x41, 0x9f, 0x70, 0x9f, 0xaf, 0x2a, 0xfc, 0x8f}}
return a, nil
}
@ -1177,7 +1176,7 @@ func _1640111208_nodeconfigUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1640111208_nodeconfig.up.sql", size: 7659, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1640111208_nodeconfig.up.sql", size: 7659, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8e, 0x5a, 0xc6, 0xed, 0x6, 0xcb, 0x51, 0x8b, 0x78, 0xe9, 0x10, 0x37, 0xd1, 0xad, 0x9b, 0x76, 0x9a, 0xb9, 0x72, 0x85, 0xe7, 0x8a, 0x7f, 0xf0, 0x81, 0xf8, 0x33, 0x59, 0x67, 0x8e, 0xeb, 0xb1}}
return a, nil
}
@ -1197,7 +1196,7 @@ func docGo() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "doc.go", size: 85, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "doc.go", size: 85, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xe5, 0xd2, 0xea, 0xc5, 0xd, 0xc4, 0x7f, 0x95, 0x8e, 0xd5, 0xf5, 0x96, 0xf2, 0x1b, 0xcb, 0xc7, 0xc2, 0x46, 0x1, 0x78, 0x1d, 0x5d, 0x59, 0x19, 0x99, 0xdd, 0x5b, 0xf5, 0x63, 0xa5, 0x25, 0xb8}}
return a, nil
}
@ -1293,124 +1292,76 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"0001_app.down.sql": _0001_appDownSql,
"0001_app.up.sql": _0001_appUpSql,
"0002_tokens.down.sql": _0002_tokensDownSql,
"0002_tokens.up.sql": _0002_tokensUpSql,
"0003_settings.down.sql": _0003_settingsDownSql,
"0003_settings.up.sql": _0003_settingsUpSql,
"0004_pending_stickers.down.sql": _0004_pending_stickersDownSql,
"0004_pending_stickers.up.sql": _0004_pending_stickersUpSql,
"0005_waku_mode.down.sql": _0005_waku_modeDownSql,
"0005_waku_mode.up.sql": _0005_waku_modeUpSql,
"0006_appearance.up.sql": _0006_appearanceUpSql,
"0007_enable_waku_default.up.sql": _0007_enable_waku_defaultUpSql,
"0008_add_push_notifications.up.sql": _0008_add_push_notificationsUpSql,
"0009_enable_sending_push_notifications.down.sql": _0009_enable_sending_push_notificationsDownSql,
"0009_enable_sending_push_notifications.up.sql": _0009_enable_sending_push_notificationsUpSql,
"0010_add_block_mentions.down.sql": _0010_add_block_mentionsDownSql,
"0010_add_block_mentions.up.sql": _0010_add_block_mentionsUpSql,
"0011_allow_webview_permission_requests.down.sql": _0011_allow_webview_permission_requestsDownSql,
"0011_allow_webview_permission_requests.up.sql": _0011_allow_webview_permission_requestsUpSql,
"0012_pending_transactions.down.sql": _0012_pending_transactionsDownSql,
"0012_pending_transactions.up.sql": _0012_pending_transactionsUpSql,
"0013_favourites.down.sql": _0013_favouritesDownSql,
"0013_favourites.up.sql": _0013_favouritesUpSql,
"0014_add_use_mailservers.down.sql": _0014_add_use_mailserversDownSql,
"0014_add_use_mailservers.up.sql": _0014_add_use_mailserversUpSql,
"0015_link_previews.down.sql": _0015_link_previewsDownSql,
"0015_link_previews.up.sql": _0015_link_previewsUpSql,
"0016_local_notifications_preferences.down.sql": _0016_local_notifications_preferencesDownSql,
"0016_local_notifications_preferences.up.sql": _0016_local_notifications_preferencesUpSql,
"0017_bookmarks.down.sql": _0017_bookmarksDownSql,
"0017_bookmarks.up.sql": _0017_bookmarksUpSql,
"0018_profile_pictures_visibility.up.sql": _0018_profile_pictures_visibilityUpSql,
"0019_blocks_ranges_extra_data.up.sql": _0019_blocks_ranges_extra_dataUpSql,
"0020_metrics.up.sql": _0020_metricsUpSql,
"0021_add_session_id_to_metrics.up.sql": _0021_add_session_id_to_metricsUpSql,
"0022_pending_transfers.up.sql": _0022_pending_transfersUpSql,
"1618237885_settings_anon_metrics_should_send.up.sql": _1618237885_settings_anon_metrics_should_sendUpSql,
"1618395756_contacts_only.up.sql": _1618395756_contacts_onlyUpSql,
"1622184614_add_default_sync_period.up.sql": _1622184614_add_default_sync_periodUpSql,
"1625872445_user_status.up.sql": _1625872445_user_statusUpSql,
"1627983977_add_gif_to_settings.up.sql": _1627983977_add_gif_to_settingsUpSql,
"1628580203_add_hidden_account.up.sql": _1628580203_add_hidden_accountUpSql,
"1629123384_add_id_to_app_metrics.up.sql": _1629123384_add_id_to_app_metricsUpSql,
"1630401853_add_opensea_enabled_to_settings.up.sql": _1630401853_add_opensea_enabled_to_settingsUpSql,
"1630464455_create-saved_addresses-table.down.sql": _1630464455_createSaved_addressesTableDownSql,
"1630464455_create-saved_addresses-table.up.sql": _1630464455_createSaved_addressesTableUpSql,
"1630485153_networks.down.sql": _1630485153_networksDownSql,
"1630485153_networks.up.sql": _1630485153_networksUpSql,
"1632262444_profile_pictures_show_to.up.sql": _1632262444_profile_pictures_show_toUpSql,
"0001_app.down.sql": _0001_appDownSql,
"0001_app.up.sql": _0001_appUpSql,
"0002_tokens.down.sql": _0002_tokensDownSql,
"0002_tokens.up.sql": _0002_tokensUpSql,
"0003_settings.down.sql": _0003_settingsDownSql,
"0003_settings.up.sql": _0003_settingsUpSql,
"0004_pending_stickers.down.sql": _0004_pending_stickersDownSql,
"0004_pending_stickers.up.sql": _0004_pending_stickersUpSql,
"0005_waku_mode.down.sql": _0005_waku_modeDownSql,
"0005_waku_mode.up.sql": _0005_waku_modeUpSql,
"0006_appearance.up.sql": _0006_appearanceUpSql,
"0007_enable_waku_default.up.sql": _0007_enable_waku_defaultUpSql,
"0008_add_push_notifications.up.sql": _0008_add_push_notificationsUpSql,
"0009_enable_sending_push_notifications.down.sql": _0009_enable_sending_push_notificationsDownSql,
"0009_enable_sending_push_notifications.up.sql": _0009_enable_sending_push_notificationsUpSql,
"0010_add_block_mentions.down.sql": _0010_add_block_mentionsDownSql,
"0010_add_block_mentions.up.sql": _0010_add_block_mentionsUpSql,
"0011_allow_webview_permission_requests.down.sql": _0011_allow_webview_permission_requestsDownSql,
"0011_allow_webview_permission_requests.up.sql": _0011_allow_webview_permission_requestsUpSql,
"0012_pending_transactions.down.sql": _0012_pending_transactionsDownSql,
"0012_pending_transactions.up.sql": _0012_pending_transactionsUpSql,
"0013_favourites.down.sql": _0013_favouritesDownSql,
"0013_favourites.up.sql": _0013_favouritesUpSql,
"0014_add_use_mailservers.down.sql": _0014_add_use_mailserversDownSql,
"0014_add_use_mailservers.up.sql": _0014_add_use_mailserversUpSql,
"0015_link_previews.down.sql": _0015_link_previewsDownSql,
"0015_link_previews.up.sql": _0015_link_previewsUpSql,
"0016_local_notifications_preferences.down.sql": _0016_local_notifications_preferencesDownSql,
"0016_local_notifications_preferences.up.sql": _0016_local_notifications_preferencesUpSql,
"0017_bookmarks.down.sql": _0017_bookmarksDownSql,
"0017_bookmarks.up.sql": _0017_bookmarksUpSql,
"0018_profile_pictures_visibility.up.sql": _0018_profile_pictures_visibilityUpSql,
"0019_blocks_ranges_extra_data.up.sql": _0019_blocks_ranges_extra_dataUpSql,
"0020_metrics.up.sql": _0020_metricsUpSql,
"0021_add_session_id_to_metrics.up.sql": _0021_add_session_id_to_metricsUpSql,
"0022_pending_transfers.up.sql": _0022_pending_transfersUpSql,
"1618237885_settings_anon_metrics_should_send.up.sql": _1618237885_settings_anon_metrics_should_sendUpSql,
"1618395756_contacts_only.up.sql": _1618395756_contacts_onlyUpSql,
"1622184614_add_default_sync_period.up.sql": _1622184614_add_default_sync_periodUpSql,
"1625872445_user_status.up.sql": _1625872445_user_statusUpSql,
"1627983977_add_gif_to_settings.up.sql": _1627983977_add_gif_to_settingsUpSql,
"1628580203_add_hidden_account.up.sql": _1628580203_add_hidden_accountUpSql,
"1629123384_add_id_to_app_metrics.up.sql": _1629123384_add_id_to_app_metricsUpSql,
"1630401853_add_opensea_enabled_to_settings.up.sql": _1630401853_add_opensea_enabled_to_settingsUpSql,
"1630464455_create-saved_addresses-table.down.sql": _1630464455_createSaved_addressesTableDownSql,
"1630464455_create-saved_addresses-table.up.sql": _1630464455_createSaved_addressesTableUpSql,
"1630485153_networks.down.sql": _1630485153_networksDownSql,
"1630485153_networks.up.sql": _1630485153_networksUpSql,
"1632262444_profile_pictures_show_to.up.sql": _1632262444_profile_pictures_show_toUpSql,
"1635942153_add_telemetry_server_url_to_settings.up.sql": _1635942153_add_telemetry_server_url_to_settingsUpSql,
"1635942154_add_backup_setting.up.sql": _1635942154_add_backup_settingUpSql,
"1637745568_add_auto_message_setting.up.sql": _1637745568_add_auto_message_settingUpSql,
"1640111208_nodeconfig.up.sql": _1640111208_nodeconfigUpSql,
"doc.go": docGo,
"1635942154_add_backup_setting.up.sql": _1635942154_add_backup_settingUpSql,
"1637745568_add_auto_message_setting.up.sql": _1637745568_add_auto_message_settingUpSql,
"1640111208_nodeconfig.up.sql": _1640111208_nodeconfigUpSql,
"doc.go": docGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
@ -1443,60 +1394,60 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"0001_app.down.sql": &bintree{_0001_appDownSql, map[string]*bintree{}},
"0001_app.up.sql": &bintree{_0001_appUpSql, map[string]*bintree{}},
"0002_tokens.down.sql": &bintree{_0002_tokensDownSql, map[string]*bintree{}},
"0002_tokens.up.sql": &bintree{_0002_tokensUpSql, map[string]*bintree{}},
"0003_settings.down.sql": &bintree{_0003_settingsDownSql, map[string]*bintree{}},
"0003_settings.up.sql": &bintree{_0003_settingsUpSql, map[string]*bintree{}},
"0004_pending_stickers.down.sql": &bintree{_0004_pending_stickersDownSql, map[string]*bintree{}},
"0004_pending_stickers.up.sql": &bintree{_0004_pending_stickersUpSql, map[string]*bintree{}},
"0005_waku_mode.down.sql": &bintree{_0005_waku_modeDownSql, map[string]*bintree{}},
"0005_waku_mode.up.sql": &bintree{_0005_waku_modeUpSql, map[string]*bintree{}},
"0006_appearance.up.sql": &bintree{_0006_appearanceUpSql, map[string]*bintree{}},
"0007_enable_waku_default.up.sql": &bintree{_0007_enable_waku_defaultUpSql, map[string]*bintree{}},
"0008_add_push_notifications.up.sql": &bintree{_0008_add_push_notificationsUpSql, map[string]*bintree{}},
"0009_enable_sending_push_notifications.down.sql": &bintree{_0009_enable_sending_push_notificationsDownSql, map[string]*bintree{}},
"0009_enable_sending_push_notifications.up.sql": &bintree{_0009_enable_sending_push_notificationsUpSql, map[string]*bintree{}},
"0010_add_block_mentions.down.sql": &bintree{_0010_add_block_mentionsDownSql, map[string]*bintree{}},
"0010_add_block_mentions.up.sql": &bintree{_0010_add_block_mentionsUpSql, map[string]*bintree{}},
"0011_allow_webview_permission_requests.down.sql": &bintree{_0011_allow_webview_permission_requestsDownSql, map[string]*bintree{}},
"0011_allow_webview_permission_requests.up.sql": &bintree{_0011_allow_webview_permission_requestsUpSql, map[string]*bintree{}},
"0012_pending_transactions.down.sql": &bintree{_0012_pending_transactionsDownSql, map[string]*bintree{}},
"0012_pending_transactions.up.sql": &bintree{_0012_pending_transactionsUpSql, map[string]*bintree{}},
"0013_favourites.down.sql": &bintree{_0013_favouritesDownSql, map[string]*bintree{}},
"0013_favourites.up.sql": &bintree{_0013_favouritesUpSql, map[string]*bintree{}},
"0014_add_use_mailservers.down.sql": &bintree{_0014_add_use_mailserversDownSql, map[string]*bintree{}},
"0014_add_use_mailservers.up.sql": &bintree{_0014_add_use_mailserversUpSql, map[string]*bintree{}},
"0015_link_previews.down.sql": &bintree{_0015_link_previewsDownSql, map[string]*bintree{}},
"0015_link_previews.up.sql": &bintree{_0015_link_previewsUpSql, map[string]*bintree{}},
"0016_local_notifications_preferences.down.sql": &bintree{_0016_local_notifications_preferencesDownSql, map[string]*bintree{}},
"0016_local_notifications_preferences.up.sql": &bintree{_0016_local_notifications_preferencesUpSql, map[string]*bintree{}},
"0017_bookmarks.down.sql": &bintree{_0017_bookmarksDownSql, map[string]*bintree{}},
"0017_bookmarks.up.sql": &bintree{_0017_bookmarksUpSql, map[string]*bintree{}},
"0018_profile_pictures_visibility.up.sql": &bintree{_0018_profile_pictures_visibilityUpSql, map[string]*bintree{}},
"0019_blocks_ranges_extra_data.up.sql": &bintree{_0019_blocks_ranges_extra_dataUpSql, map[string]*bintree{}},
"0020_metrics.up.sql": &bintree{_0020_metricsUpSql, map[string]*bintree{}},
"0021_add_session_id_to_metrics.up.sql": &bintree{_0021_add_session_id_to_metricsUpSql, map[string]*bintree{}},
"0022_pending_transfers.up.sql": &bintree{_0022_pending_transfersUpSql, map[string]*bintree{}},
"1618237885_settings_anon_metrics_should_send.up.sql": &bintree{_1618237885_settings_anon_metrics_should_sendUpSql, map[string]*bintree{}},
"1618395756_contacts_only.up.sql": &bintree{_1618395756_contacts_onlyUpSql, map[string]*bintree{}},
"1622184614_add_default_sync_period.up.sql": &bintree{_1622184614_add_default_sync_periodUpSql, map[string]*bintree{}},
"1625872445_user_status.up.sql": &bintree{_1625872445_user_statusUpSql, map[string]*bintree{}},
"1627983977_add_gif_to_settings.up.sql": &bintree{_1627983977_add_gif_to_settingsUpSql, map[string]*bintree{}},
"1628580203_add_hidden_account.up.sql": &bintree{_1628580203_add_hidden_accountUpSql, map[string]*bintree{}},
"1629123384_add_id_to_app_metrics.up.sql": &bintree{_1629123384_add_id_to_app_metricsUpSql, map[string]*bintree{}},
"1630401853_add_opensea_enabled_to_settings.up.sql": &bintree{_1630401853_add_opensea_enabled_to_settingsUpSql, map[string]*bintree{}},
"1630464455_create-saved_addresses-table.down.sql": &bintree{_1630464455_createSaved_addressesTableDownSql, map[string]*bintree{}},
"1630464455_create-saved_addresses-table.up.sql": &bintree{_1630464455_createSaved_addressesTableUpSql, map[string]*bintree{}},
"1630485153_networks.down.sql": &bintree{_1630485153_networksDownSql, map[string]*bintree{}},
"1630485153_networks.up.sql": &bintree{_1630485153_networksUpSql, map[string]*bintree{}},
"1632262444_profile_pictures_show_to.up.sql": &bintree{_1632262444_profile_pictures_show_toUpSql, map[string]*bintree{}},
"1635942153_add_telemetry_server_url_to_settings.up.sql": &bintree{_1635942153_add_telemetry_server_url_to_settingsUpSql, map[string]*bintree{}},
"1635942154_add_backup_setting.up.sql": &bintree{_1635942154_add_backup_settingUpSql, map[string]*bintree{}},
"1637745568_add_auto_message_setting.up.sql": &bintree{_1637745568_add_auto_message_settingUpSql, map[string]*bintree{}},
"1640111208_nodeconfig.up.sql": &bintree{_1640111208_nodeconfigUpSql, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
"0001_app.down.sql": {_0001_appDownSql, map[string]*bintree{}},
"0001_app.up.sql": {_0001_appUpSql, map[string]*bintree{}},
"0002_tokens.down.sql": {_0002_tokensDownSql, map[string]*bintree{}},
"0002_tokens.up.sql": {_0002_tokensUpSql, map[string]*bintree{}},
"0003_settings.down.sql": {_0003_settingsDownSql, map[string]*bintree{}},
"0003_settings.up.sql": {_0003_settingsUpSql, map[string]*bintree{}},
"0004_pending_stickers.down.sql": {_0004_pending_stickersDownSql, map[string]*bintree{}},
"0004_pending_stickers.up.sql": {_0004_pending_stickersUpSql, map[string]*bintree{}},
"0005_waku_mode.down.sql": {_0005_waku_modeDownSql, map[string]*bintree{}},
"0005_waku_mode.up.sql": {_0005_waku_modeUpSql, map[string]*bintree{}},
"0006_appearance.up.sql": {_0006_appearanceUpSql, map[string]*bintree{}},
"0007_enable_waku_default.up.sql": {_0007_enable_waku_defaultUpSql, map[string]*bintree{}},
"0008_add_push_notifications.up.sql": {_0008_add_push_notificationsUpSql, map[string]*bintree{}},
"0009_enable_sending_push_notifications.down.sql": {_0009_enable_sending_push_notificationsDownSql, map[string]*bintree{}},
"0009_enable_sending_push_notifications.up.sql": {_0009_enable_sending_push_notificationsUpSql, map[string]*bintree{}},
"0010_add_block_mentions.down.sql": {_0010_add_block_mentionsDownSql, map[string]*bintree{}},
"0010_add_block_mentions.up.sql": {_0010_add_block_mentionsUpSql, map[string]*bintree{}},
"0011_allow_webview_permission_requests.down.sql": {_0011_allow_webview_permission_requestsDownSql, map[string]*bintree{}},
"0011_allow_webview_permission_requests.up.sql": {_0011_allow_webview_permission_requestsUpSql, map[string]*bintree{}},
"0012_pending_transactions.down.sql": {_0012_pending_transactionsDownSql, map[string]*bintree{}},
"0012_pending_transactions.up.sql": {_0012_pending_transactionsUpSql, map[string]*bintree{}},
"0013_favourites.down.sql": {_0013_favouritesDownSql, map[string]*bintree{}},
"0013_favourites.up.sql": {_0013_favouritesUpSql, map[string]*bintree{}},
"0014_add_use_mailservers.down.sql": {_0014_add_use_mailserversDownSql, map[string]*bintree{}},
"0014_add_use_mailservers.up.sql": {_0014_add_use_mailserversUpSql, map[string]*bintree{}},
"0015_link_previews.down.sql": {_0015_link_previewsDownSql, map[string]*bintree{}},
"0015_link_previews.up.sql": {_0015_link_previewsUpSql, map[string]*bintree{}},
"0016_local_notifications_preferences.down.sql": {_0016_local_notifications_preferencesDownSql, map[string]*bintree{}},
"0016_local_notifications_preferences.up.sql": {_0016_local_notifications_preferencesUpSql, map[string]*bintree{}},
"0017_bookmarks.down.sql": {_0017_bookmarksDownSql, map[string]*bintree{}},
"0017_bookmarks.up.sql": {_0017_bookmarksUpSql, map[string]*bintree{}},
"0018_profile_pictures_visibility.up.sql": {_0018_profile_pictures_visibilityUpSql, map[string]*bintree{}},
"0019_blocks_ranges_extra_data.up.sql": {_0019_blocks_ranges_extra_dataUpSql, map[string]*bintree{}},
"0020_metrics.up.sql": {_0020_metricsUpSql, map[string]*bintree{}},
"0021_add_session_id_to_metrics.up.sql": {_0021_add_session_id_to_metricsUpSql, map[string]*bintree{}},
"0022_pending_transfers.up.sql": {_0022_pending_transfersUpSql, map[string]*bintree{}},
"1618237885_settings_anon_metrics_should_send.up.sql": {_1618237885_settings_anon_metrics_should_sendUpSql, map[string]*bintree{}},
"1618395756_contacts_only.up.sql": {_1618395756_contacts_onlyUpSql, map[string]*bintree{}},
"1622184614_add_default_sync_period.up.sql": {_1622184614_add_default_sync_periodUpSql, map[string]*bintree{}},
"1625872445_user_status.up.sql": {_1625872445_user_statusUpSql, map[string]*bintree{}},
"1627983977_add_gif_to_settings.up.sql": {_1627983977_add_gif_to_settingsUpSql, map[string]*bintree{}},
"1628580203_add_hidden_account.up.sql": {_1628580203_add_hidden_accountUpSql, map[string]*bintree{}},
"1629123384_add_id_to_app_metrics.up.sql": {_1629123384_add_id_to_app_metricsUpSql, map[string]*bintree{}},
"1630401853_add_opensea_enabled_to_settings.up.sql": {_1630401853_add_opensea_enabled_to_settingsUpSql, map[string]*bintree{}},
"1630464455_create-saved_addresses-table.down.sql": {_1630464455_createSaved_addressesTableDownSql, map[string]*bintree{}},
"1630464455_create-saved_addresses-table.up.sql": {_1630464455_createSaved_addressesTableUpSql, map[string]*bintree{}},
"1630485153_networks.down.sql": {_1630485153_networksDownSql, map[string]*bintree{}},
"1630485153_networks.up.sql": {_1630485153_networksUpSql, map[string]*bintree{}},
"1632262444_profile_pictures_show_to.up.sql": {_1632262444_profile_pictures_show_toUpSql, map[string]*bintree{}},
"1635942153_add_telemetry_server_url_to_settings.up.sql": {_1635942153_add_telemetry_server_url_to_settingsUpSql, map[string]*bintree{}},
"1635942154_add_backup_setting.up.sql": {_1635942154_add_backup_settingUpSql, map[string]*bintree{}},
"1637745568_add_auto_message_setting.up.sql": {_1637745568_add_auto_message_settingUpSql, map[string]*bintree{}},
"1640111208_nodeconfig.up.sql": {_1640111208_nodeconfigUpSql, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
@ -1513,7 +1464,7 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}

View File

@ -188,7 +188,7 @@ func main() {
count++
timestamp := time.Now().Format(time.RFC3339)
logger.Info("Publishing", "id", id, "count", count, "time", timestamp)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.Text = fmt.Sprintf("%d\n%s\n%s", count, timestamp, id)
inputMessage.LocalChatID = targetChat.ID

View File

@ -516,7 +516,7 @@ func buildMessage(chat *protocol.Chat, count int) *common.Message {
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
clock += uint64(count)
message := &common.Message{}
message := common.NewMessage()
message.Text = fmt.Sprintf("test message %d", count)
message.ChatId = chat.ID
message.Clock = clock

View File

@ -12,7 +12,6 @@ import (
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -22,7 +21,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
var buf bytes.Buffer
@ -30,7 +29,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
if clErr != nil {
return nil, err
@ -86,7 +85,7 @@ func _1557732988_initialize_dbDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1557732988_initialize_db.down.sql", size: 72, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1557732988_initialize_db.down.sql", size: 72, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x77, 0x40, 0x78, 0xb7, 0x71, 0x3c, 0x20, 0x3b, 0xc9, 0xb, 0x2f, 0x49, 0xe4, 0xff, 0x1c, 0x84, 0x54, 0xa1, 0x30, 0xe3, 0x90, 0xf8, 0x73, 0xda, 0xb0, 0x2a, 0xea, 0x8e, 0xf1, 0x82, 0xe7, 0xd2}}
return a, nil
}
@ -106,7 +105,7 @@ func _1557732988_initialize_dbUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1557732988_initialize_db.up.sql", size: 278, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1557732988_initialize_db.up.sql", size: 278, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0x85, 0x41, 0x7a, 0xba, 0x4f, 0xa3, 0x43, 0xc0, 0x63, 0xfa, 0x2c, 0xd1, 0xc5, 0xbb, 0x20, 0xa0, 0x64, 0xa8, 0x3b, 0x65, 0x82, 0xa2, 0x14, 0x28, 0x18, 0x7c, 0x8b, 0x3a, 0x7a, 0xfd, 0xe0}}
return a, nil
}
@ -126,7 +125,7 @@ func staticGo() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "static.go", size: 178, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "static.go", size: 178, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xab, 0x8a, 0xf4, 0x27, 0x24, 0x9d, 0x2a, 0x1, 0x7b, 0x54, 0xea, 0xae, 0x4a, 0x35, 0x40, 0x92, 0xb5, 0xf9, 0xb3, 0x54, 0x3e, 0x3a, 0x1a, 0x2b, 0xae, 0xfb, 0x9e, 0x82, 0xeb, 0x4c, 0xf, 0x6}}
return a, nil
}
@ -223,21 +222,24 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"1557732988_initialize_db.down.sql": _1557732988_initialize_dbDownSql,
"1557732988_initialize_db.up.sql": _1557732988_initialize_dbUpSql,
"static.go": staticGo,
"1557732988_initialize_db.up.sql": _1557732988_initialize_dbUpSql,
"static.go": staticGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
@ -270,9 +272,9 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"1557732988_initialize_db.down.sql": &bintree{_1557732988_initialize_dbDownSql, map[string]*bintree{}},
"1557732988_initialize_db.up.sql": &bintree{_1557732988_initialize_dbUpSql, map[string]*bintree{}},
"static.go": &bintree{staticGo, map[string]*bintree{}},
"1557732988_initialize_db.down.sql": {_1557732988_initialize_dbDownSql, map[string]*bintree{}},
"1557732988_initialize_db.up.sql": {_1557732988_initialize_dbUpSql, map[string]*bintree{}},
"static.go": {staticGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
@ -289,7 +291,7 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}

View File

@ -22,7 +22,6 @@ import (
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -32,7 +31,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
var buf bytes.Buffer
@ -40,7 +39,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
if clErr != nil {
return nil, err
@ -96,7 +95,7 @@ func _0001_accountsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0001_accounts.down.sql", size: 21, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0001_accounts.down.sql", size: 21, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd2, 0x61, 0x4c, 0x18, 0xfc, 0xc, 0xdf, 0x5c, 0x1f, 0x5e, 0xd3, 0xbd, 0xfa, 0x12, 0x5e, 0x8d, 0x8d, 0x8b, 0xb9, 0x5f, 0x99, 0x46, 0x63, 0xa5, 0xe3, 0xa6, 0x8a, 0x4, 0xf1, 0x73, 0x8a, 0xe9}}
return a, nil
}
@ -116,7 +115,7 @@ func _0001_accountsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "0001_accounts.up.sql", size: 163, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "0001_accounts.up.sql", size: 163, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0xfa, 0x99, 0x8e, 0x96, 0xb3, 0x13, 0x6c, 0x1f, 0x6, 0x27, 0xc5, 0xd2, 0xd4, 0xe0, 0xa5, 0x26, 0x82, 0xa7, 0x26, 0xf2, 0x68, 0x9d, 0xed, 0x9c, 0x3d, 0xbb, 0xdc, 0x37, 0x28, 0xbc, 0x1}}
return a, nil
}
@ -136,7 +135,7 @@ func _1605007189_identity_imagesDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1605007189_identity_images.down.sql", size: 29, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1605007189_identity_images.down.sql", size: 29, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2f, 0xcf, 0xa7, 0xae, 0xd5, 0x4f, 0xcd, 0x14, 0x63, 0x9, 0xbe, 0x39, 0x49, 0x18, 0x96, 0xb2, 0xa3, 0x8, 0x7d, 0x41, 0xdb, 0x50, 0x5d, 0xf5, 0x4d, 0xa2, 0xd, 0x8f, 0x57, 0x79, 0x77, 0x67}}
return a, nil
}
@ -156,7 +155,7 @@ func _1605007189_identity_imagesUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1605007189_identity_images.up.sql", size: 268, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1605007189_identity_images.up.sql", size: 268, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x50, 0xb6, 0xc1, 0x5c, 0x76, 0x72, 0x6b, 0x22, 0x34, 0xdc, 0x96, 0xdc, 0x2b, 0xfd, 0x2d, 0xbe, 0xcc, 0x1e, 0xd4, 0x5, 0x93, 0xd, 0xc2, 0x51, 0xf3, 0x1a, 0xef, 0x2b, 0x26, 0xa4, 0xeb, 0x65}}
return a, nil
}
@ -176,7 +175,7 @@ func _1606224181_drop_photo_path_from_accountsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1606224181_drop_photo_path_from_accounts.down.sql", size: 892, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1606224181_drop_photo_path_from_accounts.down.sql", size: 892, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x90, 0x24, 0x17, 0x7, 0x80, 0x93, 0x6f, 0x8d, 0x5d, 0xaa, 0x8c, 0x79, 0x15, 0x5d, 0xb3, 0x19, 0xd7, 0xd8, 0x39, 0xf9, 0x3a, 0x63, 0x8f, 0x81, 0x15, 0xb6, 0xd6, 0x9a, 0x37, 0xa8, 0x8e, 0x9b}}
return a, nil
}
@ -196,7 +195,7 @@ func _1606224181_drop_photo_path_from_accountsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1606224181_drop_photo_path_from_accounts.up.sql", size: 866, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1606224181_drop_photo_path_from_accounts.up.sql", size: 866, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xff, 0x4c, 0x97, 0xee, 0xef, 0x82, 0xb8, 0x6c, 0x71, 0xbb, 0x50, 0x7b, 0xe6, 0xd9, 0x22, 0x31, 0x7c, 0x1a, 0xfe, 0x91, 0x28, 0xf6, 0x6, 0x36, 0xe, 0xb1, 0xf1, 0xc8, 0x25, 0xac, 0x7e, 0xd6}}
return a, nil
}
@ -216,7 +215,7 @@ func _1648646095_image_clockDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1648646095_image_clock.down.sql", size: 939, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1648646095_image_clock.down.sql", size: 939, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x4d, 0xa8, 0x1f, 0xf, 0xe0, 0xd7, 0xc9, 0x68, 0x98, 0xd8, 0x37, 0xb8, 0xba, 0x9e, 0xb2, 0x19, 0xf3, 0xc4, 0x73, 0x80, 0x3, 0x17, 0x2a, 0x53, 0x68, 0x10, 0x13, 0x54, 0x99, 0xb1, 0xf5, 0x1c}}
return a, nil
}
@ -236,7 +235,7 @@ func _1648646095_image_clockUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1648646095_image_clock.up.sql", size: 69, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1648646095_image_clock.up.sql", size: 69, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x98, 0xa6, 0xa4, 0x4e, 0x4e, 0xca, 0x17, 0x56, 0xea, 0xfb, 0xf0, 0xa9, 0x81, 0x95, 0xe, 0x80, 0x52, 0x1, 0x47, 0x9b, 0xde, 0x14, 0xfa, 0x72, 0xc9, 0x62, 0x6f, 0x24, 0xa2, 0xc, 0x32, 0x50}}
return a, nil
}
@ -256,7 +255,7 @@ func _1649317600_add_color_hashUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1649317600_add_color_hash.up.sql", size: 201, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1649317600_add_color_hash.up.sql", size: 201, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1a, 0xf, 0x37, 0x6d, 0xcf, 0x99, 0xc9, 0x2e, 0xdc, 0x70, 0x11, 0xb4, 0x36, 0x26, 0x4f, 0x39, 0xa8, 0x44, 0xf, 0xcb, 0xcc, 0x81, 0x74, 0x7a, 0x88, 0xaa, 0x54, 0x8c, 0xc4, 0xe, 0x56, 0x4f}}
return a, nil
}
@ -276,7 +275,7 @@ func _1660238799_accounts_kdfUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1660238799_accounts_kdf.up.sql", size: 115, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1660238799_accounts_kdf.up.sql", size: 115, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xdf, 0xe6, 0x7a, 0x69, 0x25, 0x42, 0x3b, 0x9c, 0x20, 0xf5, 0xcb, 0xae, 0xb0, 0xb3, 0x1b, 0x66, 0xc2, 0x5d, 0xd0, 0xc1, 0x59, 0xe8, 0xa9, 0xc5, 0x69, 0x58, 0x8f, 0xae, 0xe6, 0xd1, 0x4c, 0x53}}
return a, nil
}
@ -296,7 +295,7 @@ func _1679505708_add_customization_colorUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1679505708_add_customization_color.up.sql", size: 78, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1679505708_add_customization_color.up.sql", size: 78, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa9, 0xe1, 0x3d, 0xaa, 0x5d, 0x35, 0x87, 0x8a, 0x8b, 0xe9, 0x4a, 0xa6, 0x7b, 0x85, 0xbc, 0x33, 0x11, 0xc7, 0x7d, 0x61, 0xac, 0x65, 0x59, 0xda, 0x32, 0x59, 0x68, 0x9d, 0xa1, 0x10, 0x7b, 0xa9}}
return a, nil
}
@ -316,7 +315,7 @@ func _1687853321_add_customization_color_updated_atUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1687853321_add_customization_color_updated_at.up.sql", size: 80, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1687853321_add_customization_color_updated_at.up.sql", size: 80, mode: os.FileMode(0644), modTime: time.Unix(1691488641, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa8, 0xc2, 0x9, 0xec, 0xf4, 0xd1, 0x46, 0x29, 0xc5, 0xce, 0x4d, 0xd4, 0xf, 0x9c, 0xfa, 0x62, 0x1, 0x29, 0xe6, 0xd2, 0xd5, 0xe, 0xf0, 0x27, 0x81, 0x4a, 0x82, 0x25, 0x5f, 0x67, 0xff, 0xd1}}
return a, nil
}
@ -336,7 +335,7 @@ func docGo() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "doc.go", size: 74, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x7c, 0x28, 0xcd, 0x47, 0xf2, 0xfa, 0x7c, 0x51, 0x2d, 0xd8, 0x38, 0xb, 0xb0, 0x34, 0x9d, 0x4c, 0x62, 0xa, 0x9e, 0x28, 0xc3, 0x31, 0x23, 0xd9, 0xbb, 0x89, 0x9f, 0xa0, 0x89, 0x1f, 0xe8}}
return a, nil
}
@ -432,42 +431,35 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"0001_accounts.down.sql": _0001_accountsDownSql,
"0001_accounts.up.sql": _0001_accountsUpSql,
"1605007189_identity_images.down.sql": _1605007189_identity_imagesDownSql,
"1605007189_identity_images.up.sql": _1605007189_identity_imagesUpSql,
"1606224181_drop_photo_path_from_accounts.down.sql": _1606224181_drop_photo_path_from_accountsDownSql,
"1606224181_drop_photo_path_from_accounts.up.sql": _1606224181_drop_photo_path_from_accountsUpSql,
"1648646095_image_clock.down.sql": _1648646095_image_clockDownSql,
"1648646095_image_clock.up.sql": _1648646095_image_clockUpSql,
"1649317600_add_color_hash.up.sql": _1649317600_add_color_hashUpSql,
"1660238799_accounts_kdf.up.sql": _1660238799_accounts_kdfUpSql,
"1679505708_add_customization_color.up.sql": _1679505708_add_customization_colorUpSql,
"0001_accounts.down.sql": _0001_accountsDownSql,
"0001_accounts.up.sql": _0001_accountsUpSql,
"1605007189_identity_images.down.sql": _1605007189_identity_imagesDownSql,
"1605007189_identity_images.up.sql": _1605007189_identity_imagesUpSql,
"1606224181_drop_photo_path_from_accounts.down.sql": _1606224181_drop_photo_path_from_accountsDownSql,
"1606224181_drop_photo_path_from_accounts.up.sql": _1606224181_drop_photo_path_from_accountsUpSql,
"1648646095_image_clock.down.sql": _1648646095_image_clockDownSql,
"1648646095_image_clock.up.sql": _1648646095_image_clockUpSql,
"1649317600_add_color_hash.up.sql": _1649317600_add_color_hashUpSql,
"1660238799_accounts_kdf.up.sql": _1660238799_accounts_kdfUpSql,
"1679505708_add_customization_color.up.sql": _1679505708_add_customization_colorUpSql,
"1687853321_add_customization_color_updated_at.up.sql": _1687853321_add_customization_color_updated_atUpSql,
"doc.go": docGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
@ -500,19 +492,19 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"0001_accounts.down.sql": &bintree{_0001_accountsDownSql, map[string]*bintree{}},
"0001_accounts.up.sql": &bintree{_0001_accountsUpSql, map[string]*bintree{}},
"1605007189_identity_images.down.sql": &bintree{_1605007189_identity_imagesDownSql, map[string]*bintree{}},
"1605007189_identity_images.up.sql": &bintree{_1605007189_identity_imagesUpSql, map[string]*bintree{}},
"1606224181_drop_photo_path_from_accounts.down.sql": &bintree{_1606224181_drop_photo_path_from_accountsDownSql, map[string]*bintree{}},
"1606224181_drop_photo_path_from_accounts.up.sql": &bintree{_1606224181_drop_photo_path_from_accountsUpSql, map[string]*bintree{}},
"1648646095_image_clock.down.sql": &bintree{_1648646095_image_clockDownSql, map[string]*bintree{}},
"1648646095_image_clock.up.sql": &bintree{_1648646095_image_clockUpSql, map[string]*bintree{}},
"1649317600_add_color_hash.up.sql": &bintree{_1649317600_add_color_hashUpSql, map[string]*bintree{}},
"1660238799_accounts_kdf.up.sql": &bintree{_1660238799_accounts_kdfUpSql, map[string]*bintree{}},
"1679505708_add_customization_color.up.sql": &bintree{_1679505708_add_customization_colorUpSql, map[string]*bintree{}},
"1687853321_add_customization_color_updated_at.up.sql": &bintree{_1687853321_add_customization_color_updated_atUpSql, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
"0001_accounts.down.sql": {_0001_accountsDownSql, map[string]*bintree{}},
"0001_accounts.up.sql": {_0001_accountsUpSql, map[string]*bintree{}},
"1605007189_identity_images.down.sql": {_1605007189_identity_imagesDownSql, map[string]*bintree{}},
"1605007189_identity_images.up.sql": {_1605007189_identity_imagesUpSql, map[string]*bintree{}},
"1606224181_drop_photo_path_from_accounts.down.sql": {_1606224181_drop_photo_path_from_accountsDownSql, map[string]*bintree{}},
"1606224181_drop_photo_path_from_accounts.up.sql": {_1606224181_drop_photo_path_from_accountsUpSql, map[string]*bintree{}},
"1648646095_image_clock.down.sql": {_1648646095_image_clockDownSql, map[string]*bintree{}},
"1648646095_image_clock.up.sql": {_1648646095_image_clockUpSql, map[string]*bintree{}},
"1649317600_add_color_hash.up.sql": {_1649317600_add_color_hashUpSql, map[string]*bintree{}},
"1660238799_accounts_kdf.up.sql": {_1660238799_accounts_kdfUpSql, map[string]*bintree{}},
"1679505708_add_customization_color.up.sql": {_1679505708_add_customization_colorUpSql, map[string]*bintree{}},
"1687853321_add_customization_color_updated_at.up.sql": {_1687853321_add_customization_color_updated_atUpSql, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
@ -529,7 +521,7 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}

View File

@ -294,7 +294,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRow(row *sql.Row)
// Restore last message
if lastMessageBytes != nil {
lastMessage := &common.Message{}
lastMessage := common.NewMessage()
if err = json.Unmarshal(lastMessageBytes, lastMessage); err != nil {
return nil, err
}
@ -303,7 +303,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRow(row *sql.Row)
// Restore message
if messageBytes != nil {
message := &common.Message{}
message := common.NewMessage()
if err = json.Unmarshal(messageBytes, message); err != nil {
return nil, err
}
@ -312,7 +312,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRow(row *sql.Row)
// Restore reply message
if replyMessageBytes != nil {
replyMessage := &common.Message{}
replyMessage := common.NewMessage()
if err = json.Unmarshal(replyMessageBytes, replyMessage); err != nil {
return nil, err
}
@ -374,7 +374,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRows(rows *sql.Ro
// Restore last message
if lastMessageBytes != nil {
lastMessage := &common.Message{}
lastMessage := common.NewMessage()
if err = json.Unmarshal(lastMessageBytes, lastMessage); err != nil {
return "", nil, err
}
@ -383,7 +383,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRows(rows *sql.Ro
// Restore message
if messageBytes != nil {
message := &common.Message{}
message := common.NewMessage()
if err = json.Unmarshal(messageBytes, message); err != nil {
return "", nil, err
}
@ -392,7 +392,7 @@ func (db sqlitePersistence) unmarshalActivityCenterNotificationRows(rows *sql.Ro
// Restore reply message
if replyMessageBytes != nil {
replyMessage := &common.Message{}
replyMessage := common.NewMessage()
if err = json.Unmarshal(replyMessageBytes, replyMessage); err != nil {
return "", nil, err
}

View File

@ -52,7 +52,7 @@ func TestDeleteActivityCenterNotificationsWhenEmpty(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)
@ -81,7 +81,7 @@ func TestDeleteActivityCenterNotificationsWithMultipleIds(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)
@ -120,14 +120,17 @@ func TestDeleteActivityCenterNotificationsForMessage(t *testing.T) {
messages := []*common.Message{
{
ID: "0x1",
ChatMessage: &protobuf.ChatMessage{},
LocalChatID: chat.ID,
},
{
ID: "0x2",
ChatMessage: &protobuf.ChatMessage{},
LocalChatID: chat.ID,
},
{
ID: "0x3",
ChatMessage: &protobuf.ChatMessage{},
ID: "0x3",
},
}
err = p.SaveMessages(messages)
@ -238,7 +241,7 @@ func (s *MessengerActivityCenterMessageSuite) TestMuteCommunityActivityCenterNot
chat := CreateOneToOneChat(common.PubkeyToHex(&alice.identity.PublicKey), &alice.identity.PublicKey, bob.transport)
// bob sends a community message
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -279,7 +282,7 @@ func (s *MessengerActivityCenterMessageSuite) TestMuteCommunityActivityCenterNot
s.Require().True(bobCommunity.Muted())
// alice sends a community message
inputMessage = &common.Message{}
inputMessage = common.NewMessage()
inputMessage.ChatId = defaultCommunityChatID
inputMessage.Text = "Good news, @" + common.EveryoneMentionTag + " !"
inputMessage.CommunityID = community.IDString()
@ -800,7 +803,7 @@ func TestActivityCenterPersistence(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)
@ -949,7 +952,7 @@ func TestActivityCenterReadUnreadPagination(t *testing.T) {
initialOrFinalCursor := ""
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)
@ -1076,7 +1079,7 @@ func TestActivityCenterReadUnreadFilterByTypes(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)
@ -1204,7 +1207,7 @@ func TestActivityCenterReadUnread(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "sample text"
chat.LastMessage = message
err = p.SaveChat(*chat)

View File

@ -65,7 +65,11 @@ func adaptModelsToProtoBatch(modelAnonMetrics []appmetrics.AppMetric, sendID *ec
return amb, nil
}
func adaptProtoBatchToModels(protoBatch protobuf.AnonymousMetricBatch) ([]*appmetrics.AppMetric, error) {
func adaptProtoBatchToModels(protoBatch *protobuf.AnonymousMetricBatch) ([]*appmetrics.AppMetric, error) {
if protoBatch == nil {
return nil, nil
}
var ams []*appmetrics.AppMetric
for _, pm := range protoBatch.Metrics {

View File

@ -12,7 +12,6 @@ import (
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -22,7 +21,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
var buf bytes.Buffer
@ -30,7 +29,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
if clErr != nil {
return nil, err
@ -86,7 +85,7 @@ func _1619446565_postgres_make_anon_metrics_tableDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1619446565_postgres_make_anon_metrics_table.down.sql", size: 24, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1619446565_postgres_make_anon_metrics_table.down.sql", size: 24, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x75, 0xea, 0x1, 0x74, 0xe6, 0xa3, 0x11, 0xd0, 0x86, 0x87, 0x7e, 0x31, 0xb4, 0x1a, 0x27, 0x5d, 0xda, 0x77, 0xa3, 0xf5, 0x1d, 0x88, 0x79, 0xcf, 0xd5, 0x95, 0x75, 0xd, 0x47, 0xa1, 0x90, 0x5}}
return a, nil
}
@ -106,7 +105,7 @@ func _1619446565_postgres_make_anon_metrics_tableUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1619446565_postgres_make_anon_metrics_table.up.sql", size: 443, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1619446565_postgres_make_anon_metrics_table.up.sql", size: 443, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd5, 0xdc, 0x72, 0x28, 0x3c, 0xf6, 0x94, 0xb0, 0x47, 0x3d, 0xca, 0x55, 0x3d, 0xf7, 0x83, 0xb8, 0x7d, 0x2f, 0x1e, 0x98, 0xb7, 0xde, 0xa, 0xff, 0xa0, 0x52, 0x60, 0x83, 0x56, 0xc5, 0xd1, 0xa2}}
return a, nil
}
@ -126,7 +125,7 @@ func docGo() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "doc.go", size: 380, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "doc.go", size: 380, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x49, 0x1, 0xd4, 0xd6, 0xc7, 0x44, 0xd4, 0xfd, 0x7b, 0x69, 0x1f, 0xe3, 0xe, 0x48, 0x14, 0x99, 0xf0, 0x8e, 0x43, 0xae, 0x54, 0x64, 0xa2, 0x8b, 0x82, 0x1c, 0x2b, 0xb, 0xec, 0xf5, 0xb3, 0xfc}}
return a, nil
}
@ -223,21 +222,24 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"1619446565_postgres_make_anon_metrics_table.down.sql": _1619446565_postgres_make_anon_metrics_tableDownSql,
"1619446565_postgres_make_anon_metrics_table.up.sql": _1619446565_postgres_make_anon_metrics_tableUpSql,
"1619446565_postgres_make_anon_metrics_table.up.sql": _1619446565_postgres_make_anon_metrics_tableUpSql,
"doc.go": docGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
@ -270,9 +272,9 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"1619446565_postgres_make_anon_metrics_table.down.sql": &bintree{_1619446565_postgres_make_anon_metrics_tableDownSql, map[string]*bintree{}},
"1619446565_postgres_make_anon_metrics_table.up.sql": &bintree{_1619446565_postgres_make_anon_metrics_tableUpSql, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
"1619446565_postgres_make_anon_metrics_table.down.sql": {_1619446565_postgres_make_anon_metrics_tableDownSql, map[string]*bintree{}},
"1619446565_postgres_make_anon_metrics_table.up.sql": {_1619446565_postgres_make_anon_metrics_tableUpSql, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
@ -289,7 +291,7 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}

View File

@ -49,7 +49,7 @@ func (s *Server) Stop() error {
return nil
}
func (s *Server) StoreMetrics(appMetricsBatch protobuf.AnonymousMetricBatch) (appMetrics []*appmetrics.AppMetric, err error) {
func (s *Server) StoreMetrics(appMetricsBatch *protobuf.AnonymousMetricBatch) (appMetrics []*appmetrics.AppMetric, err error) {
if s.Config.Active != ActiveServerPhrase {
return nil, nil
}

View File

@ -77,7 +77,7 @@ func (s *ChatTestSuite) TestValidateChat() {
func (s *ChatTestSuite) TestUpdateFromMessage() {
// Base case, clock is higher
message := &common.Message{}
message := common.NewMessage()
chat := &Chat{}
message.Clock = 1
@ -86,7 +86,7 @@ func (s *ChatTestSuite) TestUpdateFromMessage() {
s.Require().Equal(uint64(1), chat.LastClockValue)
// Clock is lower and lastMessage is not nil
message = &common.Message{}
message = common.NewMessage()
lastMessage := message
chat = &Chat{LastClockValue: 2, LastMessage: lastMessage}
@ -96,7 +96,7 @@ func (s *ChatTestSuite) TestUpdateFromMessage() {
s.Require().Equal(uint64(2), chat.LastClockValue)
// Clock is lower and lastMessage is nil
message = &common.Message{}
message = common.NewMessage()
chat = &Chat{LastClockValue: 2}
message.Clock = 1
@ -105,7 +105,7 @@ func (s *ChatTestSuite) TestUpdateFromMessage() {
s.Require().Equal(uint64(2), chat.LastClockValue)
// Clock is higher but lastMessage has lower clock message then the receiving one
message = &common.Message{}
message = common.NewMessage()
chat = &Chat{LastClockValue: 2}
message.Clock = 1
@ -114,7 +114,7 @@ func (s *ChatTestSuite) TestUpdateFromMessage() {
s.Require().Equal(uint64(2), chat.LastClockValue)
chat.LastClockValue = 4
message = &common.Message{}
message = common.NewMessage()
message.Clock = 3
s.Require().NoError(chat.UpdateFromMessage(message, &testTimeSource{}))
s.Require().Equal(chat.LastMessage, message)
@ -124,7 +124,7 @@ func (s *ChatTestSuite) TestUpdateFromMessage() {
func (s *ChatTestSuite) TestSerializeJSON() {
message := &common.Message{}
message := common.NewMessage()
chat := &Chat{}
message.From = "0x04deaafa03e3a646e54a36ec3f6968c1d3686847d88420f00c0ab6ee517ee1893398fca28aacd2af74f2654738c21d10bad3d88dc64201ebe0de5cf1e313970d3d"

View File

@ -149,7 +149,7 @@ func (m Messages) GetClock(i int) uint64 {
// Message represents a message record in the database,
// more specifically in user_messages table.
type Message struct {
protobuf.ChatMessage
*protobuf.ChatMessage
// ID calculated as keccak256(compressedAuthorPubKey, data) where data is unencrypted payload.
ID string `json:"id"`
@ -248,6 +248,10 @@ func (m *Message) MarshalJSON() ([]byte, error) {
URL string `json:"url"`
}
if m.ChatMessage == nil {
m.ChatMessage = &protobuf.ChatMessage{}
}
type MessageStructType struct {
ID string `json:"id"`
WhisperTimestamp uint64 `json:"whisperTimestamp"`
@ -672,14 +676,14 @@ func getAudioMessageMIME(i *protobuf.AudioMessage) (string, error) {
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (m Message) GetSigPubKey() *ecdsa.PublicKey {
func (m *Message) GetSigPubKey() *ecdsa.PublicKey {
return m.SigPubKey
}
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (m *Message) GetProtobuf() proto.Message {
return &m.ChatMessage
return m.ChatMessage
}
// SetMessageType a setter for the MessageType field
@ -862,3 +866,9 @@ func (m *Message) SetAlbumIDAndImagesCount(albumID string, imagesCount uint32) e
return nil
}
func NewMessage() *Message {
return &Message{
ChatMessage: &protobuf.ChatMessage{},
}
}

View File

@ -714,11 +714,6 @@ func (s *MessageSender) HandleMessages(shhMessage *types.Message) ([]*v1protocol
if err != nil {
hlogger.Error("failed to handle application metadata layer message", zap.Error(err))
}
err = statusMessage.HandleApplication()
if err != nil {
hlogger.Error("failed to handle application layer message", zap.Error(err))
}
}
return statusMessages, acks, nil

View File

@ -120,9 +120,7 @@ func (s *MessageSenderSuite) TestHandleDecodedMessagesWrapped() {
s.Require().Equal(1, len(decodedMessages))
s.Require().Equal(&authorKey.PublicKey, decodedMessages[0].SigPubKey())
s.Require().Equal(v1protocol.MessageID(&authorKey.PublicKey, wrappedPayload), decodedMessages[0].ID)
parsedMessage := decodedMessages[0].ParsedMessage.Interface().(protobuf.ChatMessage)
s.Require().Equal(encodedPayload, decodedMessages[0].UnwrappedPayload)
s.Require().True(proto.Equal(&s.testMessage, &parsedMessage))
s.Require().Equal(protobuf.ApplicationMetadataMessage_CHAT_MESSAGE, decodedMessages[0].Type)
}
@ -158,8 +156,6 @@ func (s *MessageSenderSuite) TestHandleDecodedMessagesDatasync() {
s.Require().Equal(&authorKey.PublicKey, decodedMessages[0].SigPubKey())
s.Require().Equal(v1protocol.MessageID(&authorKey.PublicKey, wrappedPayload), decodedMessages[0].ID)
s.Require().Equal(encodedPayload, decodedMessages[0].UnwrappedPayload)
parsedMessage := decodedMessages[0].ParsedMessage.Interface().(protobuf.ChatMessage)
s.Require().True(proto.Equal(&s.testMessage, &parsedMessage))
s.Require().Equal(protobuf.ApplicationMetadataMessage_CHAT_MESSAGE, decodedMessages[0].Type)
}
@ -223,7 +219,5 @@ func (s *MessageSenderSuite) TestHandleDecodedMessagesDatasyncEncrypted() {
s.Require().Equal(&authorKey.PublicKey, decodedMessages[0].SigPubKey())
s.Require().Equal(v1protocol.MessageID(&authorKey.PublicKey, wrappedPayload), decodedMessages[0].ID)
s.Require().Equal(encodedPayload, decodedMessages[0].UnwrappedPayload)
parsedMessage := decodedMessages[0].ParsedMessage.Interface().(protobuf.ChatMessage)
s.Require().True(proto.Equal(&s.testMessage, &parsedMessage))
s.Require().Equal(protobuf.ApplicationMetadataMessage_CHAT_MESSAGE, decodedMessages[0].Type)
}

View File

@ -25,7 +25,7 @@ func TestPrepareContentImage(t *testing.T) {
payload, err := ioutil.ReadAll(file)
require.NoError(t, err)
message := &Message{}
message := NewMessage()
message.ContentType = protobuf.ChatMessage_IMAGE
image := protobuf.ImageMessage{
Payload: payload,
@ -45,7 +45,7 @@ func TestPrepareContentAudio(t *testing.T) {
payload, err := ioutil.ReadAll(file)
require.NoError(t, err)
message := &Message{}
message := NewMessage()
message.ContentType = protobuf.ChatMessage_AUDIO
audio := protobuf.AudioMessage{
Payload: payload,
@ -70,7 +70,7 @@ func TestGetAudioMessageMIME(t *testing.T) {
}
func TestPrepareContentMentions(t *testing.T) {
message := &Message{}
message := NewMessage()
pk1, err := crypto.GenerateKey()
require.NoError(t, err)
pk1String := types.EncodeHex(crypto.FromECDSAPub(&pk1.PublicKey))
@ -89,7 +89,7 @@ func TestPrepareContentMentions(t *testing.T) {
}
func TestPrepareContentLinks(t *testing.T) {
message := &Message{}
message := NewMessage()
link1 := "https://github.com/status-im/status-mobile"
link2 := "https://www.youtube.com/watch?v=6RYO8KCY6YE"
@ -106,7 +106,7 @@ func TestPrepareSimplifiedText(t *testing.T) {
canonicalName1 := "canonical-name-1"
canonicalName2 := "canonical-name-2"
message := &Message{}
message := NewMessage()
pk1, err := crypto.GenerateKey()
require.NoError(t, err)
pk1String := types.EncodeHex(crypto.FromECDSAPub(&pk1.PublicKey))
@ -204,7 +204,7 @@ func TestConvertFromProtoToLinkPreviews(t *testing.T) {
}
msg := Message{
ID: "42",
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
UnfurledLinks: []*protobuf.UnfurledLink{l},
},
}

View File

@ -15,7 +15,7 @@ func (m PinnedMessages) GetClock(i int) uint64 {
}
type PinMessage struct {
protobuf.PinMessage
*protobuf.PinMessage
// ID calculated as keccak256(compressedAuthorPubKey, data) where data is unencrypted payload.
ID string `json:"id"`
@ -35,6 +35,10 @@ type PinMessage struct {
Message *PinnedMessage `json:"pinnedMessage"`
}
func NewPinMessage() *PinMessage {
return &PinMessage{PinMessage: &protobuf.PinMessage{}}
}
type PinnedMessage struct {
Message *Message `json:"message"`
PinnedAt uint64 `json:"pinnedAt"`
@ -59,11 +63,11 @@ func (m *PinMessage) GetGrant() []byte {
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (m *PinMessage) GetProtobuf() proto.Message {
return &m.PinMessage
return m.PinMessage
}
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (m PinMessage) GetSigPubKey() *ecdsa.PublicKey {
func (m *PinMessage) GetSigPubKey() *ecdsa.PublicKey {
return m.SigPubKey
}

View File

@ -4,7 +4,7 @@ import (
"github.com/status-im/status-go/protocol/protobuf"
)
func (o *Community) ToSyncCommunityProtobuf(clock uint64, communitySettings *CommunitySettings) (*protobuf.SyncCommunity, error) {
func (o *Community) ToSyncInstallationCommunityProtobuf(clock uint64, communitySettings *CommunitySettings) (*protobuf.SyncInstallationCommunity, error) {
wrappedCommunity, err := o.ToProtocolMessageBytes()
if err != nil {
return nil, err
@ -26,7 +26,7 @@ func (o *Community) ToSyncCommunityProtobuf(clock uint64, communitySettings *Com
settings.HistoryArchiveSupportEnabled = communitySettings.HistoryArchiveSupportEnabled
}
return &protobuf.SyncCommunity{
return &protobuf.SyncInstallationCommunity{
Clock: clock,
Id: o.ID(),
Description: wrappedCommunity,

View File

@ -1013,7 +1013,7 @@ func (o *Community) ValidateRequestToJoin(signer *ecdsa.PublicKey, request *prot
}
// ValidateRequestToJoin validates a request, checks that the right permissions are applied
func (o *Community) ValidateEditSharedAddresses(signer *ecdsa.PublicKey, request *protobuf.CommunityEditRevealedAccounts) error {
func (o *Community) ValidateEditSharedAddresses(signer *ecdsa.PublicKey, request *protobuf.CommunityEditSharedAddresses) error {
o.mutex.Lock()
defer o.mutex.Unlock()

View File

@ -101,7 +101,7 @@ type CommunityEventsMessage struct {
Events []CommunityEvent `json:"events,omitempty"`
}
func (m *CommunityEventsMessage) ToProtobuf() protobuf.CommunityEventsMessage {
func (m *CommunityEventsMessage) ToProtobuf() *protobuf.CommunityEventsMessage {
result := protobuf.CommunityEventsMessage{
CommunityId: m.CommunityID,
EventsBaseCommunityDescription: m.EventsBaseCommunityDescription,
@ -116,7 +116,7 @@ func (m *CommunityEventsMessage) ToProtobuf() protobuf.CommunityEventsMessage {
result.SignedEvents = append(result.SignedEvents, signedEvent)
}
return result
return &result
}
func CommunityEventsMessageFromProtobuf(msg *protobuf.CommunityEventsMessage) (*CommunityEventsMessage, error) {
@ -139,7 +139,7 @@ func CommunityEventsMessageFromProtobuf(msg *protobuf.CommunityEventsMessage) (*
func (m *CommunityEventsMessage) Marshal() ([]byte, error) {
pb := m.ToProtobuf()
return proto.Marshal(&pb)
return proto.Marshal(pb)
}
func (c *Community) mergeCommunityEvents(communityEventMessage *CommunityEventsMessage) {

View File

@ -2221,7 +2221,7 @@ func (m *Manager) HandleCommunityRequestToJoin(signer *ecdsa.PublicKey, request
return requestToJoin, nil
}
func (m *Manager) HandleCommunityEditSharedAddresses(signer *ecdsa.PublicKey, request *protobuf.CommunityEditRevealedAccounts) error {
func (m *Manager) HandleCommunityEditSharedAddresses(signer *ecdsa.PublicKey, request *protobuf.CommunityEditSharedAddresses) error {
community, err := m.persistence.GetByID(&m.identity.PublicKey, request.CommunityId)
if err != nil {
return err
@ -3271,7 +3271,7 @@ func (m *Manager) IsChannelEncrypted(communityID string, chatID string) (bool, e
return community.ChannelHasTokenPermissions(chatID), nil
}
func (m *Manager) ShouldHandleSyncCommunity(community *protobuf.SyncCommunity) (bool, error) {
func (m *Manager) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error) {
return m.persistence.ShouldHandleSyncCommunity(community)
}

View File

@ -98,7 +98,7 @@ func (p *Persistence) ShouldHandleSyncCommunitySettings(settings *protobuf.SyncC
}
}
func (p *Persistence) ShouldHandleSyncCommunity(community *protobuf.SyncCommunity) (bool, error) {
func (p *Persistence) ShouldHandleSyncCommunity(community *protobuf.SyncInstallationCommunity) (bool, error) {
// TODO see if there is a way to make this more elegant
// Keep the "*".
// When the test for this function fails because the table has changed we should update sync functionality

View File

@ -77,7 +77,7 @@ func (s *PersistenceSuite) TestSaveCommunity() {
}
func (s *PersistenceSuite) TestShouldHandleSyncCommunity() {
sc := &protobuf.SyncCommunity{
sc := &protobuf.SyncInstallationCommunity{
Id: []byte("0x123456"),
Description: []byte("this is a description"),
Joined: true,
@ -113,7 +113,7 @@ func (s *PersistenceSuite) TestShouldHandleSyncCommunity() {
}
func (s *PersistenceSuite) TestSetSyncClock() {
sc := &protobuf.SyncCommunity{
sc := &protobuf.SyncInstallationCommunity{
Id: []byte("0x123456"),
Description: []byte("this is a description"),
Joined: true,
@ -161,7 +161,7 @@ func (s *PersistenceSuite) TestSetSyncClock() {
}
func (s *PersistenceSuite) TestSetPrivateKey() {
sc := &protobuf.SyncCommunity{
sc := &protobuf.SyncInstallationCommunity{
Id: []byte("0x123456"),
Description: []byte("this is a description"),
Joined: true,
@ -198,8 +198,8 @@ func (s *PersistenceSuite) TestJoinedAndPendingCommunitiesWithRequests() {
// Add a new community that we have joined
com := s.makeNewCommunity(identity)
com.Join()
sc, err := com.ToSyncCommunityProtobuf(clock, nil)
s.NoError(err, "Community.ToSyncCommunityProtobuf shouldn't give any error")
sc, err := com.ToSyncInstallationCommunityProtobuf(clock, nil)
s.NoError(err, "Community.ToSyncInstallationCommunityProtobuf shouldn't give any error")
err = s.db.saveRawCommunityRow(fromSyncCommunityProtobuf(sc))
s.NoError(err, "saveRawCommunityRow")
@ -270,7 +270,7 @@ func (s *PersistenceSuite) makeNewCommunity(identity *ecdsa.PrivateKey) *Communi
}
func (s *PersistenceSuite) TestGetSyncedRawCommunity() {
sc := &protobuf.SyncCommunity{
sc := &protobuf.SyncInstallationCommunity{
Id: []byte("0x123456"),
Description: []byte("this is a description"),
Joined: true,

View File

@ -17,7 +17,7 @@ type RawCommunityRow struct {
Muted bool
}
func fromSyncCommunityProtobuf(syncCommProto *protobuf.SyncCommunity) RawCommunityRow {
func fromSyncCommunityProtobuf(syncCommProto *protobuf.SyncInstallationCommunity) RawCommunityRow {
return RawCommunityRow{
ID: syncCommProto.Id,
Description: syncCommProto.Description,

View File

@ -1460,12 +1460,12 @@ func testBanUnbanMember(base CommunityEventsTestsInterface, community *communiti
func testDeleteAnyMessageInTheCommunity(base CommunityEventsTestsInterface, community *communities.Community) {
chatID := community.ChatIDs()[0]
inputMessage := common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chatID
inputMessage.ContentType = protobuf.ChatMessage_TEXT_PLAIN
inputMessage.Text = "control node text"
messageID := controlNodeSendMessage(base, &inputMessage)
messageID := controlNodeSendMessage(base, inputMessage)
deleteControlNodeMessage(base, messageID)
}
@ -1475,19 +1475,19 @@ func testEventSenderPinMessage(base CommunityEventsTestsInterface, community *co
s.Require().False(community.AllowsAllMembersToPinMessage())
chatID := community.ChatIDs()[0]
inputMessage := common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chatID
inputMessage.ContentType = protobuf.ChatMessage_TEXT_PLAIN
inputMessage.Text = "control node text"
messageID := controlNodeSendMessage(base, &inputMessage)
messageID := controlNodeSendMessage(base, inputMessage)
pinnedMessage := common.PinMessage{}
pinnedMessage := common.NewPinMessage()
pinnedMessage.MessageId = messageID
pinnedMessage.ChatId = chatID
pinnedMessage.Pinned = true
pinControlNodeMessage(base, &pinnedMessage)
pinControlNodeMessage(base, pinnedMessage)
}
func testMemberReceiveEventsWhenControlNodeOffline(base CommunityEventsTestsInterface, community *communities.Community) {

View File

@ -251,7 +251,7 @@ func createCommunity(s *suite.Suite, owner *Messenger) (*communities.Community,
func advertiseCommunityTo(s *suite.Suite, community *communities.Community, owner *Messenger, user *Messenger) {
chat := CreateOneToOneChat(common.PubkeyToHex(&user.identity.PublicKey), &user.identity.PublicKey, user.transport)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -380,7 +380,7 @@ func joinOnRequestCommunity(s *suite.Suite, community *communities.Community, co
func sendChatMessage(s *suite.Suite, sender *Messenger, chatID string, text string) *common.Message {
msg := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: chatID,
ContentType: protobuf.ChatMessage_TEXT_PLAIN,
Text: text,

View File

@ -149,7 +149,7 @@ func (s *MessengerCommunitiesSuite) TestRetrieveCommunity() {
// Send a community message
chat := CreateOneToOneChat(common.PubkeyToHex(&alice.identity.PublicKey), &alice.identity.PublicKey, s.alice.transport)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -256,7 +256,7 @@ func (s *MessengerCommunitiesSuite) TestJoinCommunity() {
// Send a community message
chat := CreateOneToOneChat(common.PubkeyToHex(&s.alice.identity.PublicKey), &s.alice.identity.PublicKey, s.bob.transport)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -445,7 +445,7 @@ func (s *MessengerCommunitiesSuite) TestPostToCommunityChat() {
ctx := context.Background()
chatID := chat.ID
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chatID
inputMessage.ContentType = protobuf.ChatMessage_TEXT_PLAIN
inputMessage.Text = "some text"
@ -1695,16 +1695,10 @@ func (s *MessengerCommunitiesSuite) TestRequestAccessAgain() {
s.Require().Equal(notification.MembershipStatus, ActivityCenterMembershipStatusPending)
// Retrieve request to join
err = tt.RetryWithBackOff(func() error {
response, err = s.bob.RetrieveAll()
if err != nil {
return err
}
if len(response.RequestsToJoinCommunity) == 0 {
return errors.New("request to join community not received")
}
return nil
})
response, err = WaitOnMessengerResponse(s.bob,
func(r *MessengerResponse) bool { return len(r.RequestsToJoinCommunity) == 1 },
"request to join community was never 1",
)
s.Require().NoError(err)
s.Require().Len(response.RequestsToJoinCommunity, 1)
@ -3039,8 +3033,11 @@ func (s *MessengerCommunitiesSuite) TestCommunityBanUserRequestToJoin() {
s.Require().NoError(err)
messageState := s.admin.buildMessageState()
messageState.CurrentMessageState = &CurrentMessageState{}
err = s.admin.HandleCommunityRequestToJoin(messageState, &s.alice.identity.PublicKey, *requestToJoinProto)
messageState.CurrentMessageState.PublicKey = &s.alice.identity.PublicKey
err = s.admin.HandleCommunityRequestToJoin(messageState, requestToJoinProto, nil)
s.Require().ErrorContains(err, "can't request access")
}

View File

@ -11,7 +11,7 @@ import (
// DeleteMessage represents a delete of a message from a user in the application layer, used for persistence, querying and
// signaling
type DeleteMessage struct {
protobuf.DeleteMessage
*protobuf.DeleteMessage
// ID is the ID of the message that has been edited
ID string `json:"id,omitempty"`
@ -23,16 +23,20 @@ type DeleteMessage struct {
SigPubKey *ecdsa.PublicKey `json:"-"`
}
func NewDeleteMessage() *DeleteMessage {
return &DeleteMessage{DeleteMessage: &protobuf.DeleteMessage{}}
}
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (e DeleteMessage) GetSigPubKey() *ecdsa.PublicKey {
func (e *DeleteMessage) GetSigPubKey() *ecdsa.PublicKey {
return e.SigPubKey
}
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (e DeleteMessage) GetProtobuf() proto.Message {
return &e.DeleteMessage
func (e *DeleteMessage) GetProtobuf() proto.Message {
return e.DeleteMessage
}
// SetMessageType a setter for the MessageType field
@ -42,6 +46,6 @@ func (e *DeleteMessage) SetMessageType(messageType protobuf.MessageType) {
}
// WrapGroupMessage indicates whether we should wrap this in membership information
func (e DeleteMessage) WrapGroupMessage() bool {
func (e *DeleteMessage) WrapGroupMessage() bool {
return false
}

View File

@ -11,7 +11,7 @@ import (
// EditMessage represents an edit of a message from a user in the application layer, used for persistence, querying and
// signaling
type EditMessage struct {
protobuf.EditMessage
*protobuf.EditMessage
// ID is the ID of the message that has been edited
ID string `json:"id,omitempty"`
@ -26,16 +26,20 @@ type EditMessage struct {
LocalChatID string `json:"localChatId"`
}
func NewEditMessage() *EditMessage {
return &EditMessage{EditMessage: &protobuf.EditMessage{}}
}
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (e EditMessage) GetSigPubKey() *ecdsa.PublicKey {
func (e *EditMessage) GetSigPubKey() *ecdsa.PublicKey {
return e.SigPubKey
}
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (e EditMessage) GetProtobuf() proto.Message {
return &e.EditMessage
func (e *EditMessage) GetProtobuf() proto.Message {
return e.EditMessage
}
// SetMessageType a setter for the MessageType field
@ -45,6 +49,6 @@ func (e *EditMessage) SetMessageType(messageType protobuf.MessageType) {
}
// WrapGroupMessage indicates whether we should wrap this in membership information
func (e EditMessage) WrapGroupMessage() bool {
func (e *EditMessage) WrapGroupMessage() bool {
return false
}

View File

@ -16,7 +16,7 @@ import (
// EmojiReaction represents an emoji reaction from a user in the application layer, used for persistence, querying and
// signaling
type EmojiReaction struct {
protobuf.EmojiReaction
*protobuf.EmojiReaction
// From is a public key of the author of the emoji reaction.
From string `json:"from,omitempty"`
@ -28,21 +28,25 @@ type EmojiReaction struct {
LocalChatID string `json:"localChatId"`
}
func NewEmojiReaction() *EmojiReaction {
return &EmojiReaction{EmojiReaction: &protobuf.EmojiReaction{}}
}
// ID is the Keccak256() contatenation of From-MessageID-EmojiType
func (e EmojiReaction) ID() string {
func (e *EmojiReaction) ID() string {
return types.EncodeHex(crypto.Keccak256([]byte(fmt.Sprintf("%s%s%d", e.From, e.MessageId, e.Type))))
}
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (e EmojiReaction) GetSigPubKey() *ecdsa.PublicKey {
func (e *EmojiReaction) GetSigPubKey() *ecdsa.PublicKey {
return e.SigPubKey
}
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (e EmojiReaction) GetProtobuf() proto.Message {
return &e.EmojiReaction
func (e *EmojiReaction) GetProtobuf() proto.Message {
return e.EmojiReaction
}
// SetMessageType a setter for the MessageType field
@ -51,7 +55,7 @@ func (e *EmojiReaction) SetMessageType(messageType protobuf.MessageType) {
e.MessageType = messageType
}
func (e EmojiReaction) MarshalJSON() ([]byte, error) {
func (e *EmojiReaction) MarshalJSON() ([]byte, error) {
item := struct {
ID string `json:"id"`
Clock uint64 `json:"clock,omitempty"`
@ -84,6 +88,6 @@ func (e EmojiReaction) MarshalJSON() ([]byte, error) {
}
// WrapGroupMessage indicates whether we should wrap this in membership information
func (e EmojiReaction) WrapGroupMessage() bool {
func (e *EmojiReaction) WrapGroupMessage() bool {
return false
}

View File

@ -29,7 +29,6 @@ import (
"crypto/sha256"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strings"
@ -39,7 +38,7 @@ import (
func bindataRead(data []byte, name string) ([]byte, error) {
gz, err := gzip.NewReader(bytes.NewBuffer(data))
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
var buf bytes.Buffer
@ -47,7 +46,7 @@ func bindataRead(data []byte, name string) ([]byte, error) {
clErr := gz.Close()
if err != nil {
return nil, fmt.Errorf("read %q: %v", name, err)
return nil, fmt.Errorf("read %q: %w", name, err)
}
if clErr != nil {
return nil, err
@ -103,7 +102,7 @@ func _1536754952_initial_schemaDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1536754952_initial_schema.down.sql", size: 83, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1536754952_initial_schema.down.sql", size: 83, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x44, 0xcf, 0x76, 0x71, 0x1f, 0x5e, 0x9a, 0x43, 0xd8, 0xcd, 0xb8, 0xc3, 0x70, 0xc3, 0x7f, 0xfc, 0x90, 0xb4, 0x25, 0x1e, 0xf4, 0x66, 0x20, 0xb8, 0x33, 0x7e, 0xb0, 0x76, 0x1f, 0xc, 0xc0, 0x75}}
return a, nil
}
@ -123,7 +122,7 @@ func _1536754952_initial_schemaUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1536754952_initial_schema.up.sql", size: 962, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1536754952_initial_schema.up.sql", size: 962, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xea, 0x90, 0x5a, 0x59, 0x3e, 0x3, 0xe2, 0x3c, 0x81, 0x42, 0xcd, 0x4c, 0x9a, 0xe8, 0xda, 0x93, 0x2b, 0x70, 0xa4, 0xd5, 0x29, 0x3e, 0xd5, 0xc9, 0x27, 0xb6, 0xb7, 0x65, 0xff, 0x0, 0xcb, 0xde}}
return a, nil
}
@ -143,7 +142,7 @@ func _1539249977_update_ratchet_infoDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1539249977_update_ratchet_info.down.sql", size: 311, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1539249977_update_ratchet_info.down.sql", size: 311, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1, 0xa4, 0xeb, 0xa0, 0xe6, 0xa0, 0xd4, 0x48, 0xbb, 0xad, 0x6f, 0x7d, 0x67, 0x8c, 0xbd, 0x25, 0xde, 0x1f, 0x73, 0x9a, 0xbb, 0xa8, 0xc9, 0x30, 0xb7, 0xa9, 0x7c, 0xaf, 0xb5, 0x1, 0x61, 0xdd}}
return a, nil
}
@ -163,7 +162,7 @@ func _1539249977_update_ratchet_infoUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1539249977_update_ratchet_info.up.sql", size: 368, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1539249977_update_ratchet_info.up.sql", size: 368, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc, 0x8e, 0xbf, 0x6f, 0xa, 0xc0, 0xe1, 0x3c, 0x42, 0x28, 0x88, 0x1d, 0xdb, 0xba, 0x1c, 0x83, 0xec, 0xba, 0xd3, 0x5f, 0x5c, 0x77, 0x5e, 0xa7, 0x46, 0x36, 0xec, 0x69, 0xa, 0x4b, 0x17, 0x79}}
return a, nil
}
@ -183,7 +182,7 @@ func _1540715431_add_versionDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1540715431_add_version.down.sql", size: 127, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1540715431_add_version.down.sql", size: 127, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0x9, 0x4, 0xe3, 0x76, 0x2e, 0xb8, 0x9, 0x23, 0xf0, 0x70, 0x93, 0xc4, 0x50, 0xe, 0x9d, 0x84, 0x22, 0x8c, 0x94, 0xd3, 0x24, 0x9, 0x9a, 0xc1, 0xa1, 0x48, 0x45, 0xfd, 0x40, 0x6e, 0xe6}}
return a, nil
}
@ -203,7 +202,7 @@ func _1540715431_add_versionUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1540715431_add_version.up.sql", size: 265, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1540715431_add_version.up.sql", size: 265, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc7, 0x4c, 0x36, 0x96, 0xdf, 0x16, 0x10, 0xa6, 0x27, 0x1a, 0x79, 0x8b, 0x42, 0x83, 0x23, 0xc, 0x7e, 0xb6, 0x3d, 0x2, 0xda, 0xa4, 0xb4, 0xd, 0x27, 0x55, 0xba, 0xdc, 0xb2, 0x88, 0x8f, 0xa6}}
return a, nil
}
@ -223,7 +222,7 @@ func _1541164797_add_installationsDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1541164797_add_installations.down.sql", size: 26, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1541164797_add_installations.down.sql", size: 26, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0xfd, 0xe6, 0xd8, 0xca, 0x3b, 0x38, 0x18, 0xee, 0x0, 0x5f, 0x36, 0x9e, 0x1e, 0xd, 0x19, 0x3e, 0xb4, 0x73, 0x53, 0xe9, 0xa5, 0xac, 0xdd, 0xa1, 0x2f, 0xc7, 0x6c, 0xa8, 0xd9, 0xa, 0x88}}
return a, nil
}
@ -243,7 +242,7 @@ func _1541164797_add_installationsUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1541164797_add_installations.up.sql", size: 216, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1541164797_add_installations.up.sql", size: 216, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2d, 0x18, 0x26, 0xb8, 0x88, 0x47, 0xdb, 0x83, 0xcc, 0xb6, 0x9d, 0x1c, 0x1, 0xae, 0x2f, 0xde, 0x97, 0x82, 0x3, 0x30, 0xa8, 0x63, 0xa1, 0x78, 0x4b, 0xa5, 0x9, 0x8, 0x75, 0xa2, 0x57, 0x81}}
return a, nil
}
@ -263,7 +262,7 @@ func _1558084410_add_secretDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1558084410_add_secret.down.sql", size: 56, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1558084410_add_secret.down.sql", size: 56, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x49, 0xb, 0x65, 0xdf, 0x59, 0xbf, 0xe9, 0x5, 0x5b, 0x6f, 0xd5, 0x3a, 0xb7, 0x57, 0xe8, 0x78, 0x38, 0x73, 0x53, 0x57, 0xf7, 0x24, 0x4, 0xe4, 0xa2, 0x49, 0x22, 0xa2, 0xc6, 0xfd, 0x80, 0xa4}}
return a, nil
}
@ -283,7 +282,7 @@ func _1558084410_add_secretUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1558084410_add_secret.up.sql", size: 301, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1558084410_add_secret.up.sql", size: 301, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf5, 0x32, 0x36, 0x8e, 0x47, 0xb0, 0x8f, 0xc1, 0xc6, 0xf7, 0xc6, 0x9f, 0x2d, 0x44, 0x75, 0x2b, 0x26, 0xec, 0x6, 0xa0, 0x7b, 0xa5, 0xbd, 0xc8, 0x76, 0x8a, 0x82, 0x68, 0x2, 0x42, 0xb5, 0xf4}}
return a, nil
}
@ -303,7 +302,7 @@ func _1558588866_add_versionDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1558588866_add_version.down.sql", size: 47, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1558588866_add_version.down.sql", size: 47, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xde, 0x52, 0x34, 0x3c, 0x46, 0x4a, 0xf0, 0x72, 0x47, 0x6f, 0x49, 0x5c, 0xc7, 0xf9, 0x32, 0xce, 0xc4, 0x3d, 0xfd, 0x61, 0xa1, 0x8b, 0x8f, 0xf2, 0x31, 0x34, 0xde, 0x15, 0x49, 0xa6, 0xde, 0xb9}}
return a, nil
}
@ -323,7 +322,7 @@ func _1558588866_add_versionUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1558588866_add_version.up.sql", size: 57, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1558588866_add_version.up.sql", size: 57, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2a, 0xea, 0x64, 0x39, 0x61, 0x20, 0x83, 0x83, 0xb, 0x2e, 0x79, 0x64, 0xb, 0x53, 0xfa, 0xfe, 0xc6, 0xf7, 0x67, 0x42, 0xd3, 0x4f, 0xdc, 0x7e, 0x30, 0x32, 0xe8, 0x14, 0x41, 0xe9, 0xe7, 0x3b}}
return a, nil
}
@ -343,7 +342,7 @@ func _1559627659_add_contact_codeDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1559627659_add_contact_code.down.sql", size: 32, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1559627659_add_contact_code.down.sql", size: 32, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x5d, 0x64, 0x6d, 0xce, 0x24, 0x42, 0x20, 0x8d, 0x4f, 0x37, 0xaa, 0x9d, 0xc, 0x57, 0x98, 0xc1, 0xd1, 0x1a, 0x34, 0xcd, 0x9f, 0x8f, 0x34, 0x86, 0xb3, 0xd3, 0xdc, 0xf1, 0x7d, 0xe5, 0x1b, 0x6e}}
return a, nil
}
@ -363,7 +362,7 @@ func _1559627659_add_contact_codeUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1559627659_add_contact_code.up.sql", size: 198, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1559627659_add_contact_code.up.sql", size: 198, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x16, 0xf6, 0xc2, 0x62, 0x9c, 0xd2, 0xc9, 0x1e, 0xd8, 0xea, 0xaa, 0xea, 0x95, 0x8f, 0x89, 0x6a, 0x85, 0x5d, 0x9d, 0x99, 0x78, 0x3c, 0x90, 0x66, 0x99, 0x3e, 0x4b, 0x19, 0x62, 0xfb, 0x31, 0x4d}}
return a, nil
}
@ -383,7 +382,7 @@ func _1561368210_add_installation_metadataDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1561368210_add_installation_metadata.down.sql", size: 35, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1561368210_add_installation_metadata.down.sql", size: 35, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xa8, 0xde, 0x3f, 0xd2, 0x4a, 0x50, 0x98, 0x56, 0xe3, 0xc0, 0xcd, 0x9d, 0xb0, 0x34, 0x3b, 0xe5, 0x62, 0x18, 0xb5, 0x20, 0xc9, 0x3e, 0xdc, 0x6a, 0x40, 0x36, 0x66, 0xea, 0x51, 0x8c, 0x71, 0xf5}}
return a, nil
}
@ -403,7 +402,7 @@ func _1561368210_add_installation_metadataUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1561368210_add_installation_metadata.up.sql", size: 267, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1561368210_add_installation_metadata.up.sql", size: 267, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb4, 0x71, 0x8f, 0x29, 0xb1, 0xaa, 0xd6, 0xd1, 0x8c, 0x17, 0xef, 0x6c, 0xd5, 0x80, 0xb8, 0x2c, 0xc3, 0xfe, 0xec, 0x24, 0x4d, 0xc8, 0x25, 0xd3, 0xb4, 0xcd, 0xa9, 0xac, 0x63, 0x61, 0xb2, 0x9c}}
return a, nil
}
@ -423,7 +422,7 @@ func _1632236298_add_communitiesDownSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1632236298_add_communities.down.sql", size: 151, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1632236298_add_communities.down.sql", size: 151, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x26, 0xe5, 0x47, 0xd1, 0xe5, 0xec, 0x5b, 0x3e, 0xdc, 0x22, 0xf4, 0x27, 0xee, 0x70, 0xf3, 0x9, 0x4f, 0xd2, 0x9f, 0x92, 0xf, 0x5a, 0x18, 0x11, 0xb7, 0x40, 0xab, 0xf1, 0x98, 0x72, 0xd6, 0x60}}
return a, nil
}
@ -443,7 +442,7 @@ func _1632236298_add_communitiesUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1632236298_add_communities.up.sql", size: 584, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1632236298_add_communities.up.sql", size: 584, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8f, 0xe0, 0x1, 0x6e, 0x84, 0xc, 0x35, 0xe4, 0x5a, 0xf, 0xbe, 0xcb, 0xf7, 0xd2, 0xa8, 0x25, 0xf5, 0xdb, 0x7, 0xcb, 0xa3, 0xe6, 0xf4, 0xc4, 0x1b, 0xa5, 0xec, 0x32, 0x1e, 0x1e, 0x48, 0x60}}
return a, nil
}
@ -463,7 +462,7 @@ func _1636536507_add_index_bundlesUpSql() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "1636536507_add_index_bundles.up.sql", size: 347, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "1636536507_add_index_bundles.up.sql", size: 347, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf1, 0xb9, 0x3c, 0x16, 0xfc, 0xfb, 0xb2, 0xb4, 0x3b, 0xfe, 0xdc, 0xf5, 0x9c, 0x42, 0xa0, 0xa0, 0xd4, 0xd, 0x5b, 0x97, 0x10, 0x80, 0x95, 0xe, 0x13, 0xc1, 0x18, 0x8, 0xee, 0xf, 0x99, 0xee}}
return a, nil
}
@ -483,7 +482,7 @@ func docGo() (*asset, error) {
return nil, err
}
info := bindataFileInfo{name: "doc.go", size: 377, mode: os.FileMode(0644), modTime: time.Unix(1692356179, 0)}
info := bindataFileInfo{name: "doc.go", size: 377, mode: os.FileMode(0644), modTime: time.Unix(1687889856, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xef, 0xaf, 0xdf, 0xcf, 0x65, 0xae, 0x19, 0xfc, 0x9d, 0x29, 0xc1, 0x91, 0xaf, 0xb5, 0xd5, 0xb1, 0x56, 0xf3, 0xee, 0xa8, 0xba, 0x13, 0x65, 0xdb, 0xab, 0xcf, 0x4e, 0xac, 0x92, 0xe9, 0x60, 0xf1}}
return a, nil
}
@ -579,56 +578,42 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
"1536754952_initial_schema.down.sql": _1536754952_initial_schemaDownSql,
"1536754952_initial_schema.up.sql": _1536754952_initial_schemaUpSql,
"1539249977_update_ratchet_info.down.sql": _1539249977_update_ratchet_infoDownSql,
"1539249977_update_ratchet_info.up.sql": _1539249977_update_ratchet_infoUpSql,
"1540715431_add_version.down.sql": _1540715431_add_versionDownSql,
"1540715431_add_version.up.sql": _1540715431_add_versionUpSql,
"1541164797_add_installations.down.sql": _1541164797_add_installationsDownSql,
"1541164797_add_installations.up.sql": _1541164797_add_installationsUpSql,
"1558084410_add_secret.down.sql": _1558084410_add_secretDownSql,
"1558084410_add_secret.up.sql": _1558084410_add_secretUpSql,
"1558588866_add_version.down.sql": _1558588866_add_versionDownSql,
"1558588866_add_version.up.sql": _1558588866_add_versionUpSql,
"1559627659_add_contact_code.down.sql": _1559627659_add_contact_codeDownSql,
"1559627659_add_contact_code.up.sql": _1559627659_add_contact_codeUpSql,
"1536754952_initial_schema.down.sql": _1536754952_initial_schemaDownSql,
"1536754952_initial_schema.up.sql": _1536754952_initial_schemaUpSql,
"1539249977_update_ratchet_info.down.sql": _1539249977_update_ratchet_infoDownSql,
"1539249977_update_ratchet_info.up.sql": _1539249977_update_ratchet_infoUpSql,
"1540715431_add_version.down.sql": _1540715431_add_versionDownSql,
"1540715431_add_version.up.sql": _1540715431_add_versionUpSql,
"1541164797_add_installations.down.sql": _1541164797_add_installationsDownSql,
"1541164797_add_installations.up.sql": _1541164797_add_installationsUpSql,
"1558084410_add_secret.down.sql": _1558084410_add_secretDownSql,
"1558084410_add_secret.up.sql": _1558084410_add_secretUpSql,
"1558588866_add_version.down.sql": _1558588866_add_versionDownSql,
"1558588866_add_version.up.sql": _1558588866_add_versionUpSql,
"1559627659_add_contact_code.down.sql": _1559627659_add_contact_codeDownSql,
"1559627659_add_contact_code.up.sql": _1559627659_add_contact_codeUpSql,
"1561368210_add_installation_metadata.down.sql": _1561368210_add_installation_metadataDownSql,
"1561368210_add_installation_metadata.up.sql": _1561368210_add_installation_metadataUpSql,
"1632236298_add_communities.down.sql": _1632236298_add_communitiesDownSql,
"1632236298_add_communities.up.sql": _1632236298_add_communitiesUpSql,
"1636536507_add_index_bundles.up.sql": _1636536507_add_index_bundlesUpSql,
"doc.go": docGo,
"1561368210_add_installation_metadata.up.sql": _1561368210_add_installation_metadataUpSql,
"1632236298_add_communities.down.sql": _1632236298_add_communitiesDownSql,
"1632236298_add_communities.up.sql": _1632236298_add_communitiesUpSql,
"1636536507_add_index_bundles.up.sql": _1636536507_add_index_bundlesUpSql,
"doc.go": docGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
const AssetDebug = false
// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
// data/
// foo.txt
// img/
// a.png
// b.png
//
// data/
// foo.txt
// img/
// a.png
// b.png
//
// then AssetDir("data") would return []string{"foo.txt", "img"},
// AssetDir("data/img") would return []string{"a.png", "b.png"},
// AssetDir("foo.txt") and AssetDir("notexist") would return an error, and
@ -661,26 +646,26 @@ type bintree struct {
}
var _bintree = &bintree{nil, map[string]*bintree{
"1536754952_initial_schema.down.sql": &bintree{_1536754952_initial_schemaDownSql, map[string]*bintree{}},
"1536754952_initial_schema.up.sql": &bintree{_1536754952_initial_schemaUpSql, map[string]*bintree{}},
"1539249977_update_ratchet_info.down.sql": &bintree{_1539249977_update_ratchet_infoDownSql, map[string]*bintree{}},
"1539249977_update_ratchet_info.up.sql": &bintree{_1539249977_update_ratchet_infoUpSql, map[string]*bintree{}},
"1540715431_add_version.down.sql": &bintree{_1540715431_add_versionDownSql, map[string]*bintree{}},
"1540715431_add_version.up.sql": &bintree{_1540715431_add_versionUpSql, map[string]*bintree{}},
"1541164797_add_installations.down.sql": &bintree{_1541164797_add_installationsDownSql, map[string]*bintree{}},
"1541164797_add_installations.up.sql": &bintree{_1541164797_add_installationsUpSql, map[string]*bintree{}},
"1558084410_add_secret.down.sql": &bintree{_1558084410_add_secretDownSql, map[string]*bintree{}},
"1558084410_add_secret.up.sql": &bintree{_1558084410_add_secretUpSql, map[string]*bintree{}},
"1558588866_add_version.down.sql": &bintree{_1558588866_add_versionDownSql, map[string]*bintree{}},
"1558588866_add_version.up.sql": &bintree{_1558588866_add_versionUpSql, map[string]*bintree{}},
"1559627659_add_contact_code.down.sql": &bintree{_1559627659_add_contact_codeDownSql, map[string]*bintree{}},
"1559627659_add_contact_code.up.sql": &bintree{_1559627659_add_contact_codeUpSql, map[string]*bintree{}},
"1561368210_add_installation_metadata.down.sql": &bintree{_1561368210_add_installation_metadataDownSql, map[string]*bintree{}},
"1561368210_add_installation_metadata.up.sql": &bintree{_1561368210_add_installation_metadataUpSql, map[string]*bintree{}},
"1632236298_add_communities.down.sql": &bintree{_1632236298_add_communitiesDownSql, map[string]*bintree{}},
"1632236298_add_communities.up.sql": &bintree{_1632236298_add_communitiesUpSql, map[string]*bintree{}},
"1636536507_add_index_bundles.up.sql": &bintree{_1636536507_add_index_bundlesUpSql, map[string]*bintree{}},
"doc.go": &bintree{docGo, map[string]*bintree{}},
"1536754952_initial_schema.down.sql": {_1536754952_initial_schemaDownSql, map[string]*bintree{}},
"1536754952_initial_schema.up.sql": {_1536754952_initial_schemaUpSql, map[string]*bintree{}},
"1539249977_update_ratchet_info.down.sql": {_1539249977_update_ratchet_infoDownSql, map[string]*bintree{}},
"1539249977_update_ratchet_info.up.sql": {_1539249977_update_ratchet_infoUpSql, map[string]*bintree{}},
"1540715431_add_version.down.sql": {_1540715431_add_versionDownSql, map[string]*bintree{}},
"1540715431_add_version.up.sql": {_1540715431_add_versionUpSql, map[string]*bintree{}},
"1541164797_add_installations.down.sql": {_1541164797_add_installationsDownSql, map[string]*bintree{}},
"1541164797_add_installations.up.sql": {_1541164797_add_installationsUpSql, map[string]*bintree{}},
"1558084410_add_secret.down.sql": {_1558084410_add_secretDownSql, map[string]*bintree{}},
"1558084410_add_secret.up.sql": {_1558084410_add_secretUpSql, map[string]*bintree{}},
"1558588866_add_version.down.sql": {_1558588866_add_versionDownSql, map[string]*bintree{}},
"1558588866_add_version.up.sql": {_1558588866_add_versionUpSql, map[string]*bintree{}},
"1559627659_add_contact_code.down.sql": {_1559627659_add_contact_codeDownSql, map[string]*bintree{}},
"1559627659_add_contact_code.up.sql": {_1559627659_add_contact_codeUpSql, map[string]*bintree{}},
"1561368210_add_installation_metadata.down.sql": {_1561368210_add_installation_metadataDownSql, map[string]*bintree{}},
"1561368210_add_installation_metadata.up.sql": {_1561368210_add_installation_metadataUpSql, map[string]*bintree{}},
"1632236298_add_communities.down.sql": {_1632236298_add_communitiesDownSql, map[string]*bintree{}},
"1632236298_add_communities.up.sql": {_1632236298_add_communitiesUpSql, map[string]*bintree{}},
"1636536507_add_index_bundles.up.sql": {_1636536507_add_index_bundlesUpSql, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.
@ -697,7 +682,7 @@ func RestoreAsset(dir, name string) error {
if err != nil {
return err
}
err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
err = os.WriteFile(_filePath(dir, name), data, info.Mode())
if err != nil {
return err
}

File diff suppressed because it is too large Load Diff

View File

@ -15,7 +15,7 @@ import (
// Invitation represents a group chat invitation request from a user in the application layer, used for persistence, querying and
// signaling
type GroupChatInvitation struct {
protobuf.GroupChatInvitation
*protobuf.GroupChatInvitation
// From is a public key of the author of the invitation request.
From string `json:"from,omitempty"`
@ -24,24 +24,28 @@ type GroupChatInvitation struct {
SigPubKey *ecdsa.PublicKey `json:"-"`
}
func NewGroupChatInvitation() *GroupChatInvitation {
return &GroupChatInvitation{GroupChatInvitation: &protobuf.GroupChatInvitation{}}
}
// ID is the Keccak256() contatenation of From-ChatId
func (g GroupChatInvitation) ID() string {
func (g *GroupChatInvitation) ID() string {
return types.EncodeHex(crypto.Keccak256([]byte(fmt.Sprintf("%s%s", g.From, g.ChatId))))
}
// GetSigPubKey returns an ecdsa encoded public key
// this function is required to implement the ChatEntity interface
func (g GroupChatInvitation) GetSigPubKey() *ecdsa.PublicKey {
func (g *GroupChatInvitation) GetSigPubKey() *ecdsa.PublicKey {
return g.SigPubKey
}
// GetProtoBuf returns the struct's embedded protobuf struct
// this function is required to implement the ChatEntity interface
func (g GroupChatInvitation) GetProtobuf() proto.Message {
return &g.GroupChatInvitation
func (g *GroupChatInvitation) GetProtobuf() proto.Message {
return g.GroupChatInvitation
}
func (g GroupChatInvitation) MarshalJSON() ([]byte, error) {
func (g *GroupChatInvitation) MarshalJSON() ([]byte, error) {
item := struct {
ID string `json:"id"`
ChatID string `json:"chatId,omitempty"`

View File

@ -74,7 +74,7 @@ func eventToSystemMessage(e v1protocol.MembershipUpdateEvent, translations *syst
}
timestamp := v1protocol.TimestampInMsFromTime(time.Now())
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: e.ChatID,
Text: text,
MessageType: protobuf.MessageType_SYSTEM_MESSAGE_PRIVATE_GROUP,

View File

@ -1274,7 +1274,7 @@ func (db sqlitePersistence) EmojiReactionsByChatID(chatID string, currCursor str
var result []*EmojiReaction
for rows.Next() {
var emojiReaction EmojiReaction
emojiReaction := NewEmojiReaction()
err := rows.Scan(&emojiReaction.Clock,
&emojiReaction.From,
&emojiReaction.Type,
@ -1286,7 +1286,7 @@ func (db sqlitePersistence) EmojiReactionsByChatID(chatID string, currCursor str
return nil, err
}
result = append(result, &emojiReaction)
result = append(result, emojiReaction)
}
return result, nil
@ -1324,7 +1324,7 @@ func (db sqlitePersistence) EmojiReactionsByChatIDMessageID(chatID string, messa
var result []*EmojiReaction
for rows.Next() {
var emojiReaction EmojiReaction
emojiReaction := NewEmojiReaction()
err := rows.Scan(&emojiReaction.Clock,
&emojiReaction.From,
&emojiReaction.Type,
@ -1336,7 +1336,7 @@ func (db sqlitePersistence) EmojiReactionsByChatIDMessageID(chatID string, messa
return nil, err
}
result = append(result, &emojiReaction)
result = append(result, emojiReaction)
}
return result, nil
@ -1404,7 +1404,7 @@ func (db sqlitePersistence) EmojiReactionsByChatIDs(chatIDs []string, currCursor
var result []*EmojiReaction
for rows.Next() {
var emojiReaction EmojiReaction
emojiReaction := NewEmojiReaction()
err := rows.Scan(&emojiReaction.Clock,
&emojiReaction.From,
&emojiReaction.Type,
@ -1416,7 +1416,7 @@ func (db sqlitePersistence) EmojiReactionsByChatIDs(chatIDs []string, currCursor
return nil, err
}
result = append(result, &emojiReaction)
result = append(result, emojiReaction)
}
return result, nil
@ -2198,7 +2198,7 @@ func (db sqlitePersistence) EmojiReactionByID(id string) (*EmojiReaction, error)
emoji_reactions.id = ?
`, id)
emojiReaction := new(EmojiReaction)
emojiReaction := NewEmojiReaction()
err := row.Scan(&emojiReaction.Clock,
&emojiReaction.From,
&emojiReaction.Type,
@ -2293,7 +2293,7 @@ func (db sqlitePersistence) InvitationByID(id string) (*GroupChatInvitation, err
group_chat_invitations.id = ?
`, id)
chatInvitations := new(GroupChatInvitation)
chatInvitations := NewGroupChatInvitation()
err := row.Scan(&chatInvitations.From,
&chatInvitations.ChatId,
&chatInvitations.IntroductionMessage,
@ -2389,7 +2389,7 @@ func (db sqlitePersistence) deactivateChat(chat *Chat, currentClockValue uint64,
return db.clearHistory(chat, currentClockValue, tx, true)
}
func (db sqlitePersistence) SaveDelete(deleteMessage DeleteMessage) error {
func (db sqlitePersistence) SaveDelete(deleteMessage *DeleteMessage) error {
_, err := db.db.Exec(`INSERT INTO user_messages_deletes (clock, chat_id, message_id, source, id) VALUES(?,?,?,?,?)`, deleteMessage.Clock, deleteMessage.ChatId, deleteMessage.MessageId, deleteMessage.From, deleteMessage.ID)
return err
}
@ -2403,7 +2403,7 @@ func (db sqlitePersistence) GetDeletes(messageID string, from string) ([]*Delete
var messages []*DeleteMessage
for rows.Next() {
d := &DeleteMessage{}
d := NewDeleteMessage()
err := rows.Scan(&d.Clock, &d.ChatId, &d.MessageId, &d.From, &d.ID)
if err != nil {
return nil, err
@ -2413,23 +2413,23 @@ func (db sqlitePersistence) GetDeletes(messageID string, from string) ([]*Delete
return messages, nil
}
func (db sqlitePersistence) SaveOrUpdateDeleteForMeMessage(deleteForMeMessage *protobuf.DeleteForMeMessage) error {
func (db sqlitePersistence) SaveOrUpdateDeleteForMeMessage(deleteForMeMessage *protobuf.SyncDeleteForMeMessage) error {
_, err := db.db.Exec(`INSERT OR REPLACE INTO user_messages_deleted_for_mes (clock, message_id)
SELECT ?,? WHERE NOT EXISTS (SELECT 1 FROM user_messages_deleted_for_mes WHERE message_id = ? AND clock >= ?)`,
deleteForMeMessage.Clock, deleteForMeMessage.MessageId, deleteForMeMessage.MessageId, deleteForMeMessage.Clock)
return err
}
func (db sqlitePersistence) GetDeleteForMeMessagesByMessageID(messageID string) ([]*protobuf.DeleteForMeMessage, error) {
func (db sqlitePersistence) GetDeleteForMeMessagesByMessageID(messageID string) ([]*protobuf.SyncDeleteForMeMessage, error) {
rows, err := db.db.Query(`SELECT clock, message_id FROM user_messages_deleted_for_mes WHERE message_id = ?`, messageID)
if err != nil {
return nil, err
}
defer rows.Close()
var messages []*protobuf.DeleteForMeMessage
var messages []*protobuf.SyncDeleteForMeMessage
for rows.Next() {
d := &protobuf.DeleteForMeMessage{}
d := &protobuf.SyncDeleteForMeMessage{}
err := rows.Scan(&d.Clock, &d.MessageId)
if err != nil {
return nil, err
@ -2439,16 +2439,16 @@ func (db sqlitePersistence) GetDeleteForMeMessagesByMessageID(messageID string)
return messages, nil
}
func (db sqlitePersistence) GetDeleteForMeMessages() ([]*protobuf.DeleteForMeMessage, error) {
func (db sqlitePersistence) GetDeleteForMeMessages() ([]*protobuf.SyncDeleteForMeMessage, error) {
rows, err := db.db.Query(`SELECT clock, message_id FROM user_messages_deleted_for_mes`)
if err != nil {
return nil, err
}
defer rows.Close()
var messages []*protobuf.DeleteForMeMessage
var messages []*protobuf.SyncDeleteForMeMessage
for rows.Next() {
d := &protobuf.DeleteForMeMessage{}
d := &protobuf.SyncDeleteForMeMessage{}
err := rows.Scan(&d.Clock, &d.MessageId)
if err != nil {
return nil, err
@ -2458,7 +2458,10 @@ func (db sqlitePersistence) GetDeleteForMeMessages() ([]*protobuf.DeleteForMeMes
return messages, nil
}
func (db sqlitePersistence) SaveEdit(editMessage EditMessage) error {
func (db sqlitePersistence) SaveEdit(editMessage *EditMessage) error {
if editMessage == nil {
return nil
}
_, err := db.db.Exec(`INSERT INTO user_messages_edits (clock, chat_id, message_id, text, source, id) VALUES(?,?,?,?,?,?)`, editMessage.Clock, editMessage.ChatId, editMessage.MessageId, editMessage.Text, editMessage.From, editMessage.ID)
return err
}
@ -2472,7 +2475,7 @@ func (db sqlitePersistence) GetEdits(messageID string, from string) ([]*EditMess
var messages []*EditMessage
for rows.Next() {
e := &EditMessage{}
e := NewEditMessage()
err := rows.Scan(&e.Clock, &e.ChatId, &e.MessageId, &e.From, &e.Text, &e.ID)
if err != nil {
return nil, err
@ -2558,14 +2561,14 @@ func getMessageFromScanRows(db sqlitePersistence, rows *sql.Rows) (*common.Messa
//
// Hence, we make sure we're aggregating all attachments on a single
// common.Message
var message common.Message
err := db.tableUserMessagesScanAllFields(rows, &message)
message := common.NewMessage()
err := db.tableUserMessagesScanAllFields(rows, message)
if err != nil {
return nil, err
}
if msg == nil {
msg = &message
msg = message
} else if discordMessage := msg.GetDiscordMessage(); discordMessage != nil {
msg.Payload = getUpdatedChatMessagePayload(discordMessage, message.GetDiscordMessage())
}
@ -2596,22 +2599,22 @@ func getMessagesFromScanRows(db sqlitePersistence, rows *sql.Rows, withCursor bo
//
// Hence, we make sure we're aggregating all attachments on a single
// common.Message
var message common.Message
message := common.NewMessage()
if withCursor {
var cursor string
if err := db.tableUserMessagesScanAllFields(rows, &message, &cursor); err != nil {
if err := db.tableUserMessagesScanAllFields(rows, message, &cursor); err != nil {
return nil, err
}
} else {
if err := db.tableUserMessagesScanAllFields(rows, &message); err != nil {
if err := db.tableUserMessagesScanAllFields(rows, message); err != nil {
return nil, err
}
}
if msg, ok := messageIdx[message.ID]; !ok {
messageIdx[message.ID] = &message
messages = append(messages, &message)
messageIdx[message.ID] = message
messages = append(messages, message)
} else if discordMessage := msg.GetDiscordMessage(); discordMessage != nil {
msg.Payload = getUpdatedChatMessagePayload(discordMessage, message.GetDiscordMessage())
}
@ -2634,18 +2637,17 @@ func getMessagesAndCursorsFromScanRows(db sqlitePersistence, rows *sql.Rows) ([]
//
// Hence, we make sure we're aggregating all attachments on a single
// common.Message
var (
message common.Message
cursor string
)
if err := db.tableUserMessagesScanAllFields(rows, &message, &cursor); err != nil {
var cursor string
message := common.NewMessage()
if err := db.tableUserMessagesScanAllFields(rows, message, &cursor); err != nil {
return nil, nil, err
}
if msg, ok := messageIdx[message.ID]; !ok {
messageIdx[message.ID] = &message
messageIdx[message.ID] = message
cursors = append(cursors, cursor)
messages = append(messages, &message)
messages = append(messages, message)
} else if discordMessage := msg.GetDiscordMessage(); discordMessage != nil {
msg.Payload = getUpdatedChatMessagePayload(discordMessage, message.GetDiscordMessage())
}
@ -2664,17 +2666,17 @@ func getPinnedMessagesAndCursorsFromScanRows(db sqlitePersistence, rows *sql.Row
for rows.Next() {
var (
message common.Message
pinnedAt uint64
pinnedBy string
cursor string
)
if err := db.tableUserMessagesScanAllFields(rows, &message, &pinnedAt, &pinnedBy, &cursor); err != nil {
message := common.NewMessage()
if err := db.tableUserMessagesScanAllFields(rows, message, &pinnedAt, &pinnedBy, &cursor); err != nil {
return nil, nil, err
}
if msg, ok := messageIdx[message.ID]; !ok {
pinnedMessage := &common.PinnedMessage{
Message: &message,
Message: message,
PinnedAt: pinnedAt,
PinnedBy: pinnedBy,
}

View File

@ -40,7 +40,10 @@ func ValidateMembershipUpdateMessage(message *protocol.MembershipUpdateMessage,
return nil
}
func ValidateStatusUpdate(message protobuf.StatusUpdate) error {
func ValidateStatusUpdate(message *protobuf.StatusUpdate) error {
if message == nil {
return errors.New("message can't be nil")
}
if message.Clock == 0 {
return errors.New("clock can't be 0")
}
@ -57,7 +60,10 @@ func ValidateStatusUpdate(message protobuf.StatusUpdate) error {
}
func ValidateEditMessage(message protobuf.EditMessage) error {
func ValidateEditMessage(message *protobuf.EditMessage) error {
if message == nil {
return errors.New("message can't be nil")
}
if message.Clock == 0 {
return errors.New("clock can't be 0")
}
@ -75,7 +81,11 @@ func ValidateEditMessage(message protobuf.EditMessage) error {
return ValidateText(message.Text)
}
func ValidateDeleteMessage(message protobuf.DeleteMessage) error {
func ValidateDeleteMessage(message *protobuf.DeleteMessage) error {
if message == nil {
return errors.New("message can't be nil")
}
if len(message.ChatId) == 0 {
return errors.New("chat-id can't be empty")
}
@ -90,7 +100,11 @@ func ValidateDeleteMessage(message protobuf.DeleteMessage) error {
return nil
}
func ValidateDeleteForMeMessage(message protobuf.DeleteForMeMessage) error {
func ValidateDeleteForMeMessage(message *protobuf.SyncDeleteForMeMessage) error {
if message == nil {
return errors.New("message can't be nil")
}
if len(message.MessageId) == 0 {
return errors.New("message-id can't be empty")
}
@ -98,7 +112,7 @@ func ValidateDeleteForMeMessage(message protobuf.DeleteForMeMessage) error {
return nil
}
func ValidateReceivedPairInstallation(message *protobuf.PairInstallation, whisperTimestamp uint64) error {
func ValidateReceivedPairInstallation(message *protobuf.SyncPairInstallation, whisperTimestamp uint64) error {
if err := validateClockValue(message.Clock, whisperTimestamp); err != nil {
return err
}

View File

@ -22,13 +22,13 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
Name string
WhisperTimestamp uint64
Valid bool
Message protobuf.RequestAddressForTransaction
Message *protobuf.RequestAddressForTransaction
}{
{
Name: "valid message",
WhisperTimestamp: 30,
Valid: true,
Message: protobuf.RequestAddressForTransaction{
Message: &protobuf.RequestAddressForTransaction{
Clock: 30,
Value: "0.34",
Contract: "some contract",
@ -38,7 +38,7 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
Name: "missing clock value",
WhisperTimestamp: 30,
Valid: false,
Message: protobuf.RequestAddressForTransaction{
Message: &protobuf.RequestAddressForTransaction{
Value: "0.34",
Contract: "some contract",
},
@ -47,7 +47,7 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
Name: "missing value",
WhisperTimestamp: 30,
Valid: false,
Message: protobuf.RequestAddressForTransaction{
Message: &protobuf.RequestAddressForTransaction{
Clock: 30,
Contract: "some contract",
},
@ -56,7 +56,7 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
Name: "non number value",
WhisperTimestamp: 30,
Valid: false,
Message: protobuf.RequestAddressForTransaction{
Message: &protobuf.RequestAddressForTransaction{
Clock: 30,
Value: "most definitely not a number",
Contract: "some contract",
@ -66,7 +66,7 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
Name: "Clock value too high",
WhisperTimestamp: 30,
Valid: false,
Message: protobuf.RequestAddressForTransaction{
Message: &protobuf.RequestAddressForTransaction{
Clock: 151000,
Value: "0.34",
Contract: "some contract",
@ -75,7 +75,7 @@ func (s *MessageValidatorSuite) TestValidateRequestAddressForTransaction() {
}
for _, tc := range testCases {
s.Run(tc.Name, func() {
err := ValidateReceivedRequestAddressForTransaction(&tc.Message, tc.WhisperTimestamp)
err := ValidateReceivedRequestAddressForTransaction(tc.Message, tc.WhisperTimestamp)
if tc.Valid {
s.Nil(err)
} else {
@ -91,13 +91,13 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name string
WhisperTimestamp uint64
Valid bool
Message protobuf.ChatMessage
Message *protobuf.ChatMessage
}{
{
Name: "A valid message",
WhisperTimestamp: 2,
Valid: true,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Clock: 1,
Timestamp: 2,
@ -112,7 +112,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Missing chatId",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
Clock: 1,
Timestamp: 2,
Text: "some-text",
@ -126,7 +126,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Missing clock",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Timestamp: 2,
Text: "some-text",
@ -140,7 +140,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Clock value too high",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Clock: 133000,
Timestamp: 1,
@ -155,7 +155,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Missing timestamp",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Clock: 2,
Text: "some-text",
@ -169,7 +169,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Missing text",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Clock: 2,
Timestamp: 3,
@ -183,7 +183,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Blank text",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: " \n \t \n ",
Clock: 2,
@ -198,7 +198,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Too long text",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Clock: 1,
Timestamp: 2,
@ -213,7 +213,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Unknown MessageType",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -228,7 +228,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Unknown ContentType",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -243,7 +243,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "System message MessageType",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -258,7 +258,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Request address for transaction message type",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -273,7 +273,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Valid emoji only emssage",
WhisperTimestamp: 2,
Valid: true,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: ":+1:",
Clock: 2,
@ -304,7 +304,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Valid sticker message",
WhisperTimestamp: 2,
Valid: true,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -325,7 +325,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid sticker message without Hash",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -345,7 +345,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid sticker message without any content",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -360,7 +360,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Valid image message",
WhisperTimestamp: 2,
Valid: true,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -381,7 +381,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid image message, type unknown",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -402,7 +402,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid image message, missing payload",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -422,7 +422,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Valid audio message",
WhisperTimestamp: 2,
Valid: true,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -443,7 +443,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid audio message, type unknown",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -464,7 +464,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
Name: "Invalid audio message, missing payload",
WhisperTimestamp: 2,
Valid: false,
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
ChatId: "a",
Text: "valid",
Clock: 2,
@ -484,7 +484,7 @@ func (s *MessageValidatorSuite) TestValidatePlainTextMessage() {
for _, tc := range testCases {
s.Run(tc.Name, func() {
err := ValidateReceivedChatMessage(&tc.Message, tc.WhisperTimestamp)
err := ValidateReceivedChatMessage(tc.Message, tc.WhisperTimestamp)
if tc.Valid {
s.Nil(err)
} else {
@ -499,13 +499,13 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name string
Valid bool
WhisperTimestamp uint64
Message protobuf.EmojiReaction
Message *protobuf.EmojiReaction
}{
{
Name: "valid emoji reaction",
Valid: true,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
ChatId: "chat-id",
MessageId: "message-id",
@ -517,7 +517,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "valid emoji retraction",
Valid: true,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
ChatId: "0.34",
MessageId: "message-id",
@ -530,7 +530,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "missing chatID",
Valid: false,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
MessageId: "message-id",
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -541,7 +541,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "missing messageID",
Valid: false,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
ChatId: "chat-id",
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -552,7 +552,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "missing type",
Valid: false,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
ChatId: "chat-id",
MessageId: "message-id",
@ -563,7 +563,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "missing message type",
Valid: false,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 30,
ChatId: "chat-id",
MessageId: "message-id",
@ -574,7 +574,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
Name: "clock value too high",
Valid: false,
WhisperTimestamp: 30,
Message: protobuf.EmojiReaction{
Message: &protobuf.EmojiReaction{
Clock: 900000,
ChatId: "chat-id",
MessageId: "message-id",
@ -585,7 +585,7 @@ func (s *MessageValidatorSuite) TestValidateEmojiReaction() {
}
for _, tc := range testCases {
s.Run(tc.Name, func() {
err := ValidateReceivedEmojiReaction(&tc.Message, tc.WhisperTimestamp)
err := ValidateReceivedEmojiReaction(tc.Message, tc.WhisperTimestamp)
if tc.Valid {
s.Nil(err)
} else {

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
v1protocol "github.com/status-im/status-go/protocol/v1"
"github.com/status-im/status-go/protocol/verification"
"github.com/golang/protobuf/proto"
@ -120,7 +121,7 @@ func (m *Messenger) syncActivityCenterNotifications(notifications []*ActivityCen
}
return m.sendToPairedDevices(context.TODO(), common.RawMessage{
Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_NOTIFICATION,
MessageType: protobuf.ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_NOTIFICATIONS,
ResendAutomatically: true,
})
}
@ -383,7 +384,7 @@ func (m *Messenger) ActivityCenterNotification(id types.HexBytes) (*ActivityCent
return m.persistence.GetActivityCenterNotificationByID(id)
}
func (m *Messenger) handleActivityCenterRead(state *ReceivedMessageState, message protobuf.SyncActivityCenterRead) error {
func (m *Messenger) HandleSyncActivityCenterRead(state *ReceivedMessageState, message *protobuf.SyncActivityCenterRead, statusMessage *v1protocol.StatusMessage) error {
resp, err := m.MarkActivityCenterNotificationsRead(context.TODO(), toHexBytes(message.Ids), message.Clock, false)
if err != nil {
@ -393,7 +394,7 @@ func (m *Messenger) handleActivityCenterRead(state *ReceivedMessageState, messag
return state.Response.Merge(resp)
}
func (m *Messenger) handleActivityCenterAccepted(state *ReceivedMessageState, message protobuf.SyncActivityCenterAccepted) error {
func (m *Messenger) HandleSyncActivityCenterAccepted(state *ReceivedMessageState, message *protobuf.SyncActivityCenterAccepted, statusMessage *v1protocol.StatusMessage) error {
resp, err := m.AcceptActivityCenterNotifications(context.TODO(), toHexBytes(message.Ids), message.Clock, false)
if err != nil {
@ -403,7 +404,7 @@ func (m *Messenger) handleActivityCenterAccepted(state *ReceivedMessageState, me
return state.Response.Merge(resp)
}
func (m *Messenger) handleActivityCenterDismissed(state *ReceivedMessageState, message protobuf.SyncActivityCenterDismissed) error {
func (m *Messenger) HandleSyncActivityCenterDismissed(state *ReceivedMessageState, message *protobuf.SyncActivityCenterDismissed, statusMessage *v1protocol.StatusMessage) error {
resp, err := m.DismissActivityCenterNotifications(context.TODO(), toHexBytes(message.Ids), message.Clock, false)
if err != nil {
@ -413,7 +414,7 @@ func (m *Messenger) handleActivityCenterDismissed(state *ReceivedMessageState, m
return state.Response.Merge(resp)
}
func (m *Messenger) handleSyncActivityCenterNotificationState(state *ReceivedMessageState, a *protobuf.SyncActivityCenterNotificationState) error {
func (m *Messenger) HandleSyncActivityCenterNotificationState(state *ReceivedMessageState, a *protobuf.SyncActivityCenterNotificationState, statusMessage *v1protocol.StatusMessage) error {
s := &ActivityCenterState{
HasSeen: a.HasSeen,
UpdatedAt: a.UpdatedAt,
@ -428,7 +429,7 @@ func (m *Messenger) handleSyncActivityCenterNotificationState(state *ReceivedMes
return nil
}
func (m *Messenger) handleSyncActivityCenterNotifications(state *ReceivedMessageState, a *protobuf.SyncActivityCenterNotifications) error {
func (m *Messenger) HandleSyncActivityCenterNotifications(state *ReceivedMessageState, a *protobuf.SyncActivityCenterNotifications, statusMessage *v1protocol.StatusMessage) error {
var notifications []*ActivityCenterNotification
for _, n := range a.ActivityCenterNotifications {
notification, err := convertActivityCenterNotificationFromProtobuf(n)
@ -509,7 +510,7 @@ func convertActivityCenterNotificationFromProtobuf(proto *protobuf.SyncActivityC
}
if len(proto.Message) > 0 {
message := &common.Message{}
message := common.NewMessage()
err := json.Unmarshal(proto.Message, &message)
if err != nil {
return nil, err
@ -517,7 +518,7 @@ func convertActivityCenterNotificationFromProtobuf(proto *protobuf.SyncActivityC
a.Message = message
}
if len(proto.ReplyMessage) > 0 {
replyMessage := &common.Message{}
replyMessage := common.NewMessage()
err := json.Unmarshal(proto.ReplyMessage, &replyMessage)
if err != nil {
return nil, err

View File

@ -142,7 +142,7 @@ func (s *MessengerActivityCenterMessageSuite) TestEveryoneMentionTag() {
chat := CreateOneToOneChat(common.PubkeyToHex(&alice.identity.PublicKey), &alice.identity.PublicKey, bob.transport)
// bob sends a community message
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -171,7 +171,7 @@ func (s *MessengerActivityCenterMessageSuite) TestEveryoneMentionTag() {
defaultCommunityChatID := response.Chats()[0].ID
// bob sends a community message
inputMessage = &common.Message{}
inputMessage = common.NewMessage()
inputMessage.ChatId = defaultCommunityChatID
inputMessage.Text = "Good news, @" + common.EveryoneMentionTag + " !"
inputMessage.CommunityID = community.IDString()
@ -232,7 +232,7 @@ func (s *MessengerActivityCenterMessageSuite) TestReplyWithImage() {
chat := CreateOneToOneChat(common.PubkeyToHex(&alice.identity.PublicKey), &alice.identity.PublicKey, bob.transport)
// bob sends a community message
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
inputMessage.Text = "some text"
inputMessage.CommunityID = community.IDString()
@ -263,7 +263,7 @@ func (s *MessengerActivityCenterMessageSuite) TestReplyWithImage() {
defaultCommunityChatID := defaultCommunityChat.ID
// bob sends a community message
inputMessage = &common.Message{}
inputMessage = common.NewMessage()
inputMessage.ChatId = defaultCommunityChatID
inputMessage.Text = "test message"
inputMessage.CommunityID = community.IDString()

View File

@ -42,7 +42,7 @@ func (m *Messenger) startAutoMessageLoop() error {
count++
timestamp := time.Now().Format(time.RFC3339)
msg := &common.Message{}
msg := common.NewMessage()
msg.Text = fmt.Sprintf("%d\n%s", count, timestamp)
msg.ChatId = autoMessageChatID
msg.LocalChatID = autoMessageChatID

View File

@ -286,7 +286,7 @@ func (m *Messenger) backupCommunities(ctx context.Context, clock uint64) ([]*pro
return nil, err
}
syncMessage, err := c.ToSyncCommunityProtobuf(clock, settings)
syncMessage, err := c.ToSyncInstallationCommunityProtobuf(clock, settings)
if err != nil {
return nil, err
}
@ -298,7 +298,7 @@ func (m *Messenger) backupCommunities(ctx context.Context, clock uint64) ([]*pro
syncMessage.EncryptionKeys = encodedKeys
backupMessage := &protobuf.Backup{
Communities: []*protobuf.SyncCommunity{syncMessage},
Communities: []*protobuf.SyncInstallationCommunity{syncMessage},
}
backupMessages = append(backupMessages, backupMessage)

View File

@ -6,6 +6,7 @@ import (
ensservice "github.com/status-im/status-go/services/ens"
"github.com/status-im/status-go/protocol/identity"
v1protocol "github.com/status-im/status-go/protocol/v1"
"go.uber.org/zap"
@ -23,7 +24,22 @@ const (
SyncWakuSectionKeyWatchOnlyAccounts = "watchOnlyAccounts"
)
func (m *Messenger) HandleBackup(state *ReceivedMessageState, message protobuf.Backup) []error {
func (m *Messenger) HandleBackup(state *ReceivedMessageState, message *protobuf.Backup, statusMessage *v1protocol.StatusMessage) error {
if !m.processBackedupMessages {
return nil
}
errors := m.handleBackup(state, message)
if len(errors) > 0 {
for _, err := range errors {
m.logger.Warn("failed to handle Backup", zap.Error(err))
}
return errors[0]
}
return nil
}
func (m *Messenger) handleBackup(state *ReceivedMessageState, message *protobuf.Backup) []error {
var errors []error
err := m.handleBackedUpProfile(message.Profile, message.Clock)
@ -32,14 +48,14 @@ func (m *Messenger) HandleBackup(state *ReceivedMessageState, message protobuf.B
}
for _, contact := range message.Contacts {
err = m.HandleSyncInstallationContact(state, *contact)
err = m.HandleSyncInstallationContactV2(state, contact, nil)
if err != nil {
errors = append(errors, err)
}
}
for _, community := range message.Communities {
err = m.handleSyncCommunity(state, *community)
err = m.handleSyncInstallationCommunity(state, community, nil)
if err != nil {
errors = append(errors, err)
}
@ -154,7 +170,7 @@ func (m *Messenger) handleBackedUpProfile(message *protobuf.BackedUpProfile, bac
var ensUsernameDetails []*ensservice.UsernameDetail
for _, d := range message.EnsUsernameDetails {
dd, err := m.saveEnsUsernameDetailProto(*d)
dd, err := m.saveEnsUsernameDetailProto(d)
if err != nil {
return err
}

View File

@ -165,7 +165,7 @@ func (s *MessengerBackupSuite) TestBackupProfile() {
err = bob1.settings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, profileSocialLinksClock)
s.Require().NoError(err)
bob1EnsUsernameDetail, err := bob1.saveEnsUsernameDetailProto(protobuf.SyncEnsUsernameDetail{
bob1EnsUsernameDetail, err := bob1.saveEnsUsernameDetailProto(&protobuf.SyncEnsUsernameDetail{
Clock: 1,
Username: "bob1.eth",
ChainId: 1,
@ -842,7 +842,12 @@ func (s *MessengerBackupSuite) TestBackupWatchOnlyAccounts() {
_, err = WaitOnMessengerResponse(
bob2,
func(r *MessengerResponse) bool {
return r.BackupHandled
c, err := bob2.settings.GetActiveWatchOnlyAccounts()
if err != nil {
return false
}
return r.BackupHandled && len(woAccounts) == len(c)
},
"no messages",
)

View File

@ -115,7 +115,7 @@ func (m *Messenger) publishCommunityEventsRejected(community *communities.Commun
communityEventsMessage := msg.ToProtobuf()
communityEventsMessageRejected := &protobuf.CommunityEventsMessageRejected{
Msg: &communityEventsMessage,
Msg: communityEventsMessage,
}
payload, err := proto.Marshal(communityEventsMessageRejected)
@ -1105,7 +1105,7 @@ func (m *Messenger) EditSharedAddressesForCommunity(request *requests.EditShared
member := community.GetMember(m.IdentityPublicKey())
requestToEditRevealedAccountsProto := &protobuf.CommunityEditRevealedAccounts{
requestToEditRevealedAccountsProto := &protobuf.CommunityEditSharedAddresses{
Clock: member.LastUpdateClock + 1,
CommunityId: community.ID(),
RevealedAccounts: make([]*protobuf.RevealedAccount, 0),
@ -2133,7 +2133,7 @@ func (m *Messenger) ShareCommunity(request *requests.ShareCommunity) (*Messenger
var messages []*common.Message
for _, pk := range request.Users {
message := &common.Message{}
message := common.NewMessage()
message.ChatId = pk.String()
message.CommunityID = request.CommunityID.String()
message.Text = fmt.Sprintf("Community %s has been shared with you", community.Name())
@ -2564,8 +2564,8 @@ func (m *Messenger) passStoredCommunityInfoToSignalHandler(communityID string) {
}
// handleCommunityDescription handles an community description
func (m *Messenger) handleCommunityDescription(state *ReceivedMessageState, signer *ecdsa.PublicKey, description protobuf.CommunityDescription, rawPayload []byte) error {
communityResponse, err := m.communitiesManager.HandleCommunityDescriptionMessage(signer, &description, rawPayload)
func (m *Messenger) handleCommunityDescription(state *ReceivedMessageState, signer *ecdsa.PublicKey, description *protobuf.CommunityDescription, rawPayload []byte) error {
communityResponse, err := m.communitiesManager.HandleCommunityDescriptionMessage(signer, description, rawPayload)
if err != nil {
return err
}
@ -2683,8 +2683,9 @@ func (m *Messenger) handleCommunityResponse(state *ReceivedMessageState, communi
return nil
}
func (m *Messenger) handleCommunityEventsMessage(state *ReceivedMessageState, signer *ecdsa.PublicKey, message protobuf.CommunityEventsMessage) error {
communityResponse, err := m.communitiesManager.HandleCommunityEventsMessage(signer, &message)
func (m *Messenger) HandleCommunityEventsMessage(state *ReceivedMessageState, message *protobuf.CommunityEventsMessage, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
communityResponse, err := m.communitiesManager.HandleCommunityEventsMessage(signer, message)
if err != nil {
return err
}
@ -2693,8 +2694,9 @@ func (m *Messenger) handleCommunityEventsMessage(state *ReceivedMessageState, si
}
// Re-sends rejected events, if any.
func (m *Messenger) handleCommunityEventsMessageRejected(state *ReceivedMessageState, signer *ecdsa.PublicKey, message protobuf.CommunityEventsMessageRejected) error {
reapplyEventsMessage, err := m.communitiesManager.HandleCommunityEventsMessageRejected(signer, &message)
func (m *Messenger) HandleCommunityEventsMessageRejected(state *ReceivedMessageState, message *protobuf.CommunityEventsMessageRejected, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
reapplyEventsMessage, err := m.communitiesManager.HandleCommunityEventsMessageRejected(signer, message)
if err != nil {
return err
}
@ -2710,7 +2712,7 @@ func (m *Messenger) handleCommunityEventsMessageRejected(state *ReceivedMessageS
return nil
}
func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMessageState, signer *ecdsa.PublicKey, message protobuf.CommunityPrivilegedUserSyncMessage) error {
func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMessageState, signer *ecdsa.PublicKey, message *protobuf.CommunityPrivilegedUserSyncMessage) error {
if signer == nil {
return errors.New("signer can't be nil")
}
@ -2733,7 +2735,7 @@ func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMess
return errors.New("user has no permissions to send privileged sync message")
}
err = m.communitiesManager.ValidateCommunityPrivilegedUserSyncMessage(&message)
err = m.communitiesManager.ValidateCommunityPrivilegedUserSyncMessage(message)
if err != nil {
return err
}
@ -2745,7 +2747,7 @@ func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMess
if !isControlNodeMsg {
return errors.New("accepted/requested to join sync messages can be send only by the control node")
}
requestsToJoin, err := m.communitiesManager.HandleRequestToJoinPrivilegedUserSyncMessage(&message, community.ID())
requestsToJoin, err := m.communitiesManager.HandleRequestToJoinPrivilegedUserSyncMessage(message, community.ID())
if err != nil {
return nil
}
@ -2753,7 +2755,7 @@ func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMess
case protobuf.CommunityPrivilegedUserSyncMessage_ADD_COMMUNITY_TOKENS:
// TODO add tokens to the Response
err = m.communitiesManager.HandleAddCommunityTokenPrivilegedUserSyncMessage(&message, community)
err = m.communitiesManager.HandleAddCommunityTokenPrivilegedUserSyncMessage(message, community)
if err != nil {
return nil
}
@ -2762,11 +2764,20 @@ func (m *Messenger) handleCommunityPrivilegedUserSyncMessage(state *ReceivedMess
return nil
}
func (m *Messenger) handleSyncCommunity(messageState *ReceivedMessageState, syncCommunity protobuf.SyncCommunity) error {
func (m *Messenger) HandleCommunityPrivilegedUserSyncMessage(state *ReceivedMessageState, message *protobuf.CommunityPrivilegedUserSyncMessage, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
return m.handleCommunityPrivilegedUserSyncMessage(state, signer, message)
}
func (m *Messenger) HandleSyncInstallationCommunity(messageState *ReceivedMessageState, syncCommunity *protobuf.SyncInstallationCommunity, statusMessage *v1protocol.StatusMessage) error {
return m.handleSyncInstallationCommunity(messageState, syncCommunity, nil)
}
func (m *Messenger) handleSyncInstallationCommunity(messageState *ReceivedMessageState, syncCommunity *protobuf.SyncInstallationCommunity, statusMessage *v1protocol.StatusMessage) error {
logger := m.logger.Named("handleSyncCommunity")
// Should handle community
shouldHandle, err := m.communitiesManager.ShouldHandleSyncCommunity(&syncCommunity)
shouldHandle, err := m.communitiesManager.ShouldHandleSyncCommunity(syncCommunity)
if err != nil {
logger.Debug("m.communitiesManager.ShouldHandleSyncCommunity error", zap.Error(err))
return err
@ -2825,14 +2836,14 @@ func (m *Messenger) handleSyncCommunity(messageState *ReceivedMessageState, sync
return err
}
err = m.handleCommunityDescription(messageState, orgPubKey, cd, syncCommunity.Description)
err = m.handleCommunityDescription(messageState, orgPubKey, &cd, syncCommunity.Description)
if err != nil {
logger.Debug("m.handleCommunityDescription error", zap.Error(err))
return err
}
if syncCommunity.Settings != nil {
err = m.handleSyncCommunitySettings(messageState, *syncCommunity.Settings)
err = m.HandleSyncCommunitySettings(messageState, syncCommunity.Settings, nil)
if err != nil {
logger.Debug("m.handleSyncCommunitySettings error", zap.Error(err))
return err
@ -2846,7 +2857,7 @@ func (m *Messenger) handleSyncCommunity(messageState *ReceivedMessageState, sync
}
if savedCommunity.HasPermissionToSendCommunityEvents() || savedCommunity.IsControlNode() {
err := m.handleCommunityTokensMetadata(savedCommunity.IDString(), savedCommunity.CommunityTokensMetadata())
err := m.handleCommunityTokensMetadata(savedCommunity.IDString(), savedCommunity.CommunityTokensMetadata(), nil)
if err != nil {
logger.Debug("m.handleCommunityTokensMetadata", zap.Error(err))
return err
@ -2888,8 +2899,8 @@ func (m *Messenger) handleSyncCommunity(messageState *ReceivedMessageState, sync
return nil
}
func (m *Messenger) handleSyncCommunitySettings(messageState *ReceivedMessageState, syncCommunitySettings protobuf.SyncCommunitySettings) error {
shouldHandle, err := m.communitiesManager.ShouldHandleSyncCommunitySettings(&syncCommunitySettings)
func (m *Messenger) HandleSyncCommunitySettings(messageState *ReceivedMessageState, syncCommunitySettings *protobuf.SyncCommunitySettings, statusMessage *v1protocol.StatusMessage) error {
shouldHandle, err := m.communitiesManager.ShouldHandleSyncCommunitySettings(syncCommunitySettings)
if err != nil {
m.logger.Debug("m.communitiesManager.ShouldHandleSyncCommunitySettings error", zap.Error(err))
return err
@ -2899,7 +2910,7 @@ func (m *Messenger) handleSyncCommunitySettings(messageState *ReceivedMessageSta
return nil
}
communitySettings, err := m.communitiesManager.HandleSyncCommunitySettings(&syncCommunitySettings)
communitySettings, err := m.communitiesManager.HandleSyncCommunitySettings(syncCommunitySettings)
if err != nil {
return err
}
@ -2908,7 +2919,7 @@ func (m *Messenger) handleSyncCommunitySettings(messageState *ReceivedMessageSta
return nil
}
func (m *Messenger) handleCommunityTokensMetadata(communityID string, communityTokens []*protobuf.CommunityTokenMetadata) error {
func (m *Messenger) handleCommunityTokensMetadata(communityID string, communityTokens []*protobuf.CommunityTokenMetadata, statusMessage *v1protocol.StatusMessage) error {
return m.communitiesManager.HandleCommunityTokensMetadata(communityID, communityTokens)
}
@ -3196,7 +3207,7 @@ func (m *Messenger) dispatchMagnetlinkMessage(communityID string) error {
LocalChatID: chatID,
Sender: community.PrivateKey(),
Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_COMMUNITY_ARCHIVE_MAGNETLINK,
MessageType: protobuf.ApplicationMetadataMessage_COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK,
SkipGroupMessageWrap: true,
}
@ -3729,7 +3740,7 @@ func (m *Messenger) RequestImportDiscordCommunity(request *requests.ImportDiscor
LocalChatID: processedChannelIds[channel.Channel.ID],
SigPubKey: &communityPubKey,
CommunityID: communityID,
ChatMessage: chatMessage,
ChatMessage: &chatMessage,
}
err = messageToSave.PrepareContent(common.PubkeyToHex(&m.identity.PublicKey))
@ -3773,7 +3784,7 @@ func (m *Messenger) RequestImportDiscordCommunity(request *requests.ImportDiscor
pinMessageToSave := common.PinMessage{
ID: types.EncodeHex(messageID),
PinMessage: pinMessage,
PinMessage: &pinMessage,
LocalChatID: processedChannelIds[channel.Channel.ID],
From: messageToSave.From,
SigPubKey: messageToSave.SigPubKey,

View File

@ -93,7 +93,7 @@ func (s *MessengerCommunityMetricsSuite) generateMessages(chatID string, communi
var messages []*common.Message
for i, timestamp := range timestamps {
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: chatID,
Text: fmt.Sprintf("Test message %d", i),
MessageType: protobuf.MessageType_ONE_TO_ONE,

View File

@ -1203,13 +1203,12 @@ func (s *MessengerContactRequestSuite) TestReceiveAcceptAndRetractContactRequest
state.CurrentMessageState = &CurrentMessageState{
PublicKey: &contactKey.PublicKey,
MessageID: "0xa",
Message: message,
Contact: contact,
WhisperTimestamp: 1,
}
response := state.Response
err = s.m.HandleChatMessage(state)
err = s.m.HandleChatMessage(state, &message, nil)
s.Require().NoError(err)
s.Require().Len(response.ActivityCenterNotifications(), 1)
contacts := s.m.Contacts()
@ -1219,7 +1218,7 @@ func (s *MessengerContactRequestSuite) TestReceiveAcceptAndRetractContactRequest
retract := protobuf.RetractContactRequest{
Clock: 2,
}
err = s.m.HandleRetractContactRequest(state, retract)
err = s.m.HandleRetractContactRequest(state, &retract, nil)
s.Require().NoError(err)
// Nothing should have changed
@ -1273,7 +1272,7 @@ func (s *MessengerContactRequestSuite) TestBobRestoresIncomingContactRequestFrom
// Restore alice's contact from backup
sync := s.syncInstallationContactV2FromContact(aliceFromBob)
err = bob2.HandleSyncInstallationContact(state, sync)
err = bob2.HandleSyncInstallationContactV2(state, &sync, nil)
s.Require().NoError(err)
// Accept latest CR for a contact
@ -1353,7 +1352,7 @@ func (s *MessengerContactRequestSuite) TestAliceRestoresOutgoingContactRequestFr
// Restore alice's contact from backup
sync := s.syncInstallationContactV2FromContact(bobFromAlice)
err = alice2.HandleSyncInstallationContact(state, sync)
err = alice2.HandleSyncInstallationContactV2(state, &sync, nil)
s.Require().NoError(err)
// Accept latest CR for a contact
@ -1455,6 +1454,7 @@ func (s *MessengerContactRequestSuite) blockContactAndSync(alice1 *Messenger, al
s.Require().Len(resp.ActivityCenterNotifications(), 1)
s.Require().Equal(resp.ActivityCenterNotifications()[0].Type, ActivityCenterNotificationTypeContactRemoved)
alice2.logger.Info("STARTING")
// Wait for Alice-2 to sync Bob blocked state
resp, err = WaitOnMessengerResponse(alice2, func(r *MessengerResponse) bool {
return len(r.Contacts) == 1

View File

@ -17,6 +17,7 @@ import (
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/requests"
v1protocol "github.com/status-im/status-go/protocol/v1"
"github.com/status-im/status-go/protocol/verification"
)
@ -717,7 +718,7 @@ func (m *Messenger) GetTrustStatus(contactID string) (verification.TrustStatus,
return m.verificationDatabase.GetTrustStatus(contactID)
}
func ValidateContactVerificationRequest(request protobuf.RequestContactVerification) error {
func ValidateContactVerificationRequest(request *protobuf.RequestContactVerification) error {
challengeLen := len(strings.TrimSpace(request.Challenge))
if challengeLen < minContactVerificationMessageLen || challengeLen > maxContactVerificationMessageLen {
return errors.New("invalid verification request challenge length")
@ -726,7 +727,7 @@ func ValidateContactVerificationRequest(request protobuf.RequestContactVerificat
return nil
}
func (m *Messenger) HandleRequestContactVerification(state *ReceivedMessageState, request protobuf.RequestContactVerification) error {
func (m *Messenger) HandleRequestContactVerification(state *ReceivedMessageState, request *protobuf.RequestContactVerification, statusMessage *v1protocol.StatusMessage) error {
if err := ValidateContactVerificationRequest(request); err != nil {
m.logger.Debug("Invalid verification request", zap.Error(err))
return err
@ -810,7 +811,7 @@ func (m *Messenger) HandleRequestContactVerification(state *ReceivedMessageState
return m.createOrUpdateIncomingContactVerificationNotification(contact, state, persistedVR, chatMessage, nil)
}
func ValidateAcceptContactVerification(request protobuf.AcceptContactVerification) error {
func ValidateAcceptContactVerification(request *protobuf.AcceptContactVerification) error {
responseLen := len(strings.TrimSpace(request.Response))
if responseLen < minContactVerificationMessageLen || responseLen > maxContactVerificationMessageLen {
return errors.New("invalid verification request response length")
@ -819,7 +820,7 @@ func ValidateAcceptContactVerification(request protobuf.AcceptContactVerificatio
return nil
}
func (m *Messenger) HandleAcceptContactVerification(state *ReceivedMessageState, request protobuf.AcceptContactVerification) error {
func (m *Messenger) HandleAcceptContactVerification(state *ReceivedMessageState, request *protobuf.AcceptContactVerification, statusMessage *v1protocol.StatusMessage) error {
if err := ValidateAcceptContactVerification(request); err != nil {
m.logger.Debug("Invalid AcceptContactVerification", zap.Error(err))
return err
@ -913,7 +914,7 @@ func (m *Messenger) HandleAcceptContactVerification(state *ReceivedMessageState,
return nil
}
func (m *Messenger) HandleDeclineContactVerification(state *ReceivedMessageState, request protobuf.DeclineContactVerification) error {
func (m *Messenger) HandleDeclineContactVerification(state *ReceivedMessageState, request *protobuf.DeclineContactVerification, statusMessage *v1protocol.StatusMessage) error {
if common.IsPubKeyEqual(state.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
return nil // Is ours, do nothing
}
@ -977,7 +978,7 @@ func (m *Messenger) HandleDeclineContactVerification(state *ReceivedMessageState
return m.createOrUpdateOutgoingContactVerificationNotification(contact, state.Response, persistedVR, msg, nil)
}
func (m *Messenger) HandleCancelContactVerification(state *ReceivedMessageState, request protobuf.CancelContactVerification) error {
func (m *Messenger) HandleCancelContactVerification(state *ReceivedMessageState, request *protobuf.CancelContactVerification, statusMessage *v1protocol.StatusMessage) error {
myPubKey := hexutil.Encode(crypto.FromECDSAPub(&m.identity.PublicKey))
contactID := hexutil.Encode(crypto.FromECDSAPub(state.CurrentMessageState.PublicKey))
@ -1075,7 +1076,7 @@ func (m *Messenger) createOrUpdateIncomingContactVerificationNotification(contac
}
func (m *Messenger) createContactVerificationMessage(challenge string, chat *Chat, state *ReceivedMessageState, verificationStatus common.ContactVerificationState) (*common.Message, error) {
chatMessage := &common.Message{}
chatMessage := common.NewMessage()
chatMessage.ID = state.CurrentMessageState.MessageID
chatMessage.From = state.CurrentMessageState.Contact.ID
chatMessage.Alias = state.CurrentMessageState.Contact.Alias
@ -1097,7 +1098,7 @@ func (m *Messenger) createContactVerificationMessage(challenge string, chat *Cha
func (m *Messenger) createLocalContactVerificationMessage(challenge string, chat *Chat, id string, status common.ContactVerificationState) (*common.Message, error) {
chatMessage := &common.Message{}
chatMessage := common.NewMessage()
chatMessage.ID = id
err := extendMessageFromChat(chatMessage, chat, &m.identity.PublicKey, m.getTimesource())
if err != nil {

View File

@ -68,7 +68,7 @@ func (m *Messenger) prepareMutualStateUpdateMessage(contactID string, updateType
}
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: contactID,
Text: text,
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -537,7 +537,7 @@ func (m *Messenger) generateContactRequest(clock uint64, timestamp uint64, conta
return nil, errors.New("contact cannot be nil")
}
contactRequest := &common.Message{}
contactRequest := common.NewMessage()
contactRequest.ChatId = contact.ID
contactRequest.WhisperTimestamp = timestamp
contactRequest.Seen = true

View File

@ -97,7 +97,7 @@ func (s *MessengerDeleteMessageForEveryoneSuite) TestDeleteMessageForEveryone()
s.Require().NoError(err)
ctx := context.Background()
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = communityChat.ID
inputMessage.ContentType = protobuf.ChatMessage_TEXT_PLAIN
inputMessage.Text = "some text"

View File

@ -170,8 +170,8 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageFirstThenMessage() {
inputMessage := buildTestMessage(*theirChat)
inputMessage.Clock = 1
deleteMessage := DeleteMessage{
DeleteMessage: protobuf.DeleteMessage{
deleteMessage := &DeleteMessage{
DeleteMessage: &protobuf.DeleteMessage{
Clock: 2,
MessageType: protobuf.MessageType_ONE_TO_ONE,
MessageId: messageID,
@ -185,21 +185,20 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageFirstThenMessage() {
}
// Handle Delete first
err = s.m.HandleDeleteMessage(state, deleteMessage)
err = s.m.handleDeleteMessage(state, deleteMessage)
s.Require().NoError(err)
// // Handle chat message
state = &ReceivedMessageState{
Response: &MessengerResponse{},
CurrentMessageState: &CurrentMessageState{
Message: inputMessage.ChatMessage,
MessageID: messageID,
WhisperTimestamp: s.m.getTimesource().GetCurrentTime(),
Contact: contact,
PublicKey: &theirMessenger.identity.PublicKey,
},
}
err = s.m.HandleChatMessage(state)
err = s.m.HandleChatMessage(state, inputMessage.ChatMessage, nil)
s.Require().NoError(err)
s.Require().Len(state.Response.Messages(), 0) // Message should not be added to response
s.Require().Len(state.Response.RemovedMessages(), 0)
@ -311,8 +310,8 @@ func (s *MessengerDeleteMessageSuite) TestDeleteImageMessageFirstThenMessage() {
album = append(album, image)
}
deleteMessage := DeleteMessage{
DeleteMessage: protobuf.DeleteMessage{
deleteMessage := &DeleteMessage{
DeleteMessage: &protobuf.DeleteMessage{
Clock: 2,
MessageType: protobuf.MessageType_ONE_TO_ONE,
MessageId: messageID1,
@ -326,21 +325,20 @@ func (s *MessengerDeleteMessageSuite) TestDeleteImageMessageFirstThenMessage() {
}
// Handle Delete first
err = s.m.HandleDeleteMessage(state, deleteMessage)
err = s.m.handleDeleteMessage(state, deleteMessage)
s.Require().NoError(err)
// Handle first image message
state = &ReceivedMessageState{
Response: &MessengerResponse{},
CurrentMessageState: &CurrentMessageState{
Message: album[0].ChatMessage,
MessageID: messageID1,
WhisperTimestamp: s.m.getTimesource().GetCurrentTime(),
Contact: contact,
PublicKey: &theirMessenger.identity.PublicKey,
},
}
err = s.m.HandleChatMessage(state)
err = s.m.HandleChatMessage(state, album[0].ChatMessage, nil)
s.Require().NoError(err)
s.Require().Len(state.Response.Messages(), 0) // Message should not be added to response
s.Require().Len(state.Response.RemovedMessages(), 0)
@ -350,14 +348,13 @@ func (s *MessengerDeleteMessageSuite) TestDeleteImageMessageFirstThenMessage() {
state = &ReceivedMessageState{
Response: &MessengerResponse{},
CurrentMessageState: &CurrentMessageState{
Message: album[1].ChatMessage,
MessageID: messageID2,
WhisperTimestamp: s.m.getTimesource().GetCurrentTime(),
Contact: contact,
PublicKey: &theirMessenger.identity.PublicKey,
},
}
err = s.m.HandleChatMessage(state)
err = s.m.HandleChatMessage(state, album[1].ChatMessage, nil)
s.Require().NoError(err)
s.Require().Len(state.Response.Messages(), 0) // Message should not be added to response even if we didn't delete that ID
s.Require().Len(state.Response.RemovedMessages(), 0)
@ -399,8 +396,8 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageWithAMention() {
s.Require().Equal(int(response.Chats()[0].UnviewedMentionsCount), 1)
s.Require().True(response.Messages()[0].Mentioned)
deleteMessage := DeleteMessage{
DeleteMessage: protobuf.DeleteMessage{
deleteMessage := &DeleteMessage{
DeleteMessage: &protobuf.DeleteMessage{
Clock: 2,
MessageType: protobuf.MessageType_ONE_TO_ONE,
MessageId: messageID,
@ -414,7 +411,7 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageWithAMention() {
}
// Handle Delete first
err = s.m.HandleDeleteMessage(state, deleteMessage)
err = s.m.handleDeleteMessage(state, deleteMessage)
s.Require().NoError(err)
s.Require().Len(response.Chats(), 1)
@ -463,8 +460,8 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageAndChatIsAlreadyRead() {
ogMessage := sendResponse.Messages()[0]
deleteMessage := DeleteMessage{
DeleteMessage: protobuf.DeleteMessage{
deleteMessage := &DeleteMessage{
DeleteMessage: &protobuf.DeleteMessage{
Clock: 2,
MessageType: protobuf.MessageType_ONE_TO_ONE,
MessageId: ogMessage.ID,
@ -478,7 +475,7 @@ func (s *MessengerDeleteMessageSuite) TestDeleteMessageAndChatIsAlreadyRead() {
}
// Handle Delete first
err = s.m.HandleDeleteMessage(state, deleteMessage)
err = s.m.handleDeleteMessage(state, deleteMessage)
s.Require().NoError(err)
s.Require().Len(response.Chats(), 1)

View File

@ -129,7 +129,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
s.Require().NoError(err)
editMessage := EditMessage{
EditMessage: protobuf.EditMessage{
EditMessage: &protobuf.EditMessage{
Clock: editedMessage.Clock + 1,
Text: "some text",
MessageId: editedMessage.ID,
@ -144,7 +144,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
}
state.AllChats.Store(ourChat.ID, ourChat)
err = s.m.HandleEditMessage(state, editMessage)
err = s.m.handleEditMessage(state, editMessage)
// It should error as the user can't edit this message
s.Require().Error(err)
@ -154,7 +154,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
s.Require().NoError(err)
editMessage = EditMessage{
EditMessage: protobuf.EditMessage{
EditMessage: &protobuf.EditMessage{
Clock: editedMessage.Clock + 2,
Text: "some text",
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -164,7 +164,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
From: contact.ID,
}
err = s.m.HandleEditMessage(state, editMessage)
err = s.m.handleEditMessage(state, editMessage)
s.Require().NoError(err)
// It save the edit
s.Require().Len(state.Response.Messages(), 1)
@ -176,7 +176,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
// In-between edit
editMessage = EditMessage{
EditMessage: protobuf.EditMessage{
EditMessage: &protobuf.EditMessage{
Clock: editedMessage.Clock + 1,
Text: "some other text",
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -188,7 +188,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageEdgeCases() {
state.Response = &MessengerResponse{}
err = s.m.HandleEditMessage(state, editMessage)
err = s.m.handleEditMessage(state, editMessage)
// It should error as the user can't edit this message
s.Require().NoError(err)
// It discards the edit
@ -216,7 +216,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageFirstEditsThenMessage() {
inputMessage := buildTestMessage(*theirChat)
inputMessage.Clock = 1
editMessage := EditMessage{
EditMessage: protobuf.EditMessage{
EditMessage: &protobuf.EditMessage{
Clock: 2,
Text: "some text",
MessageType: protobuf.MessageType_ONE_TO_ONE,
@ -230,7 +230,7 @@ func (s *MessengerEditMessageSuite) TestEditMessageFirstEditsThenMessage() {
}
// Handle edit first
err = s.m.HandleEditMessage(state, editMessage)
err = s.m.handleEditMessage(state, editMessage)
s.Require().NoError(err)
// Handle chat message
@ -238,14 +238,13 @@ func (s *MessengerEditMessageSuite) TestEditMessageFirstEditsThenMessage() {
state = &ReceivedMessageState{
Response: response,
CurrentMessageState: &CurrentMessageState{
Message: inputMessage.ChatMessage,
MessageID: messageID,
WhisperTimestamp: s.m.getTimesource().GetCurrentTime(),
Contact: contact,
PublicKey: &theirMessenger.identity.PublicKey,
},
}
err = s.m.HandleChatMessage(state)
err = s.m.HandleChatMessage(state, inputMessage.ChatMessage, nil)
s.Require().NoError(err)
s.Require().Len(response.Messages(), 1)

View File

@ -168,7 +168,7 @@ func (s *MessengerEmojiSuite) TestEmojiPrivateGroup() {
}
func (s *MessengerEmojiSuite) TestCompressedKeyReturnedWithEmoji() {
emojiReaction := &EmojiReaction{}
emojiReaction := NewEmojiReaction()
id, err := crypto.GenerateKey()
s.Require().NoError(err)

View File

@ -213,7 +213,7 @@ func (m *Messenger) AddMembersToGroupChat(ctx context.Context, chatID string, me
logger.Info("ApproveInvitationByChatIdAndFrom", zap.String("chatID", chatID), zap.Any("member", member))
groupChatInvitation := &GroupChatInvitation{
GroupChatInvitation: protobuf.GroupChatInvitation{
GroupChatInvitation: &protobuf.GroupChatInvitation{
ChatId: chat.ID,
},
From: member,
@ -433,7 +433,7 @@ func (m *Messenger) SendGroupChatInvitationRequest(ctx context.Context, chatID s
clock, _ := chat.NextClockAndTimestamp(m.getTimesource())
invitationR := &GroupChatInvitation{
GroupChatInvitation: protobuf.GroupChatInvitation{
GroupChatInvitation: &protobuf.GroupChatInvitation{
Clock: clock,
ChatId: chatID,
IntroductionMessage: message,

View File

@ -385,8 +385,8 @@ func (s *MessengerGroupChatSuite) TestGroupChatHandleDeleteMemberMessage() {
s.Require().Len(response.Messages(), 1)
s.Require().Equal(inputMessage.Text, response.Messages()[0].Text)
deleteMessage := DeleteMessage{
DeleteMessage: protobuf.DeleteMessage{
deleteMessage := &DeleteMessage{
DeleteMessage: &protobuf.DeleteMessage{
Clock: 2,
MessageType: protobuf.MessageType_PRIVATE_GROUP,
MessageId: inputMessage.ID,
@ -399,7 +399,7 @@ func (s *MessengerGroupChatSuite) TestGroupChatHandleDeleteMemberMessage() {
Response: &MessengerResponse{},
}
err = member.HandleDeleteMessage(state, deleteMessage)
err = member.handleDeleteMessage(state, deleteMessage)
s.Require().NoError(err)
removedMessages := state.Response.RemovedMessages()

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/status-im/status-go/services/browsers"
"github.com/status-im/status-go/signal"
"github.com/pkg/errors"
@ -55,13 +56,24 @@ var (
// HandleMembershipUpdate updates a Chat instance according to the membership updates.
// It retrieves chat, if exists, and merges membership updates from the message.
// Finally, the Chat is updated with the new group events.
func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, chat *Chat, rawMembershipUpdate protobuf.MembershipUpdateMessage, translations *systemMessageTranslationsMap) error {
func (m *Messenger) HandleMembershipUpdateMessage(messageState *ReceivedMessageState, rawMembershipUpdate *protobuf.MembershipUpdateMessage, statusMessage *v1protocol.StatusMessage) error {
chat, _ := messageState.AllChats.Load(rawMembershipUpdate.ChatId)
return m.HandleMembershipUpdate(messageState, chat, rawMembershipUpdate, m.systemMessagesTranslations)
}
func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, chat *Chat, rawMembershipUpdate *protobuf.MembershipUpdateMessage, translations *systemMessageTranslationsMap) error {
var group *v1protocol.Group
var err error
if rawMembershipUpdate == nil {
return nil
}
logger := m.logger.With(zap.String("site", "HandleMembershipUpdate"))
message, err := v1protocol.MembershipUpdateMessageFromProtobuf(&rawMembershipUpdate)
message, err := v1protocol.MembershipUpdateMessageFromProtobuf(rawMembershipUpdate)
if err != nil {
return err
@ -100,7 +112,7 @@ func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, c
if waitingForApproval {
groupChatInvitation := &GroupChatInvitation{
GroupChatInvitation: protobuf.GroupChatInvitation{
GroupChatInvitation: &protobuf.GroupChatInvitation{
ChatId: message.ChatID,
},
From: types.EncodeHex(crypto.FromECDSAPub(&m.identity.PublicKey)),
@ -228,10 +240,9 @@ func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, c
}
if message.Message != nil {
messageState.CurrentMessageState.Message = *message.Message
return m.HandleChatMessage(messageState)
return m.HandleChatMessage(messageState, message.Message, nil)
} else if message.EmojiReaction != nil {
return m.HandleEmojiReaction(messageState, *message.EmojiReaction)
return m.HandleEmojiReaction(messageState, message.EmojiReaction, nil)
}
return nil
@ -278,8 +289,9 @@ func (m *Messenger) PendingNotificationContactRequest(contactID string) (*Activi
}
func (m *Messenger) createContactRequestForContactUpdate(contact *Contact, messageState *ReceivedMessageState) (*common.Message, error) {
contactRequest, err := m.generateContactRequest(
messageState.CurrentMessageState.Message.Clock,
contact.ContactRequestRemoteClock,
messageState.CurrentMessageState.WhisperTimestamp,
contact,
defaultContactRequestText(),
@ -471,11 +483,16 @@ func (m *Messenger) syncContactRequestForInstallationContact(contact *Contact, s
return nil
}
func (m *Messenger) HandleSyncInstallationContact(state *ReceivedMessageState, message protobuf.SyncInstallationContactV2) error {
func (m *Messenger) HandleSyncInstallationAccount(state *ReceivedMessageState, message *protobuf.SyncInstallationAccount, statusMessage *v1protocol.StatusMessage) error {
// Noop
return nil
}
func (m *Messenger) HandleSyncInstallationContactV2(state *ReceivedMessageState, message *protobuf.SyncInstallationContactV2, statusMessage *v1protocol.StatusMessage) error {
// Ignore own contact installation
if message.Id == m.myHexIdentity() {
m.logger.Warn("HandleSyncInstallationContact: skipping own contact")
m.logger.Warn("HandleSyncInstallationContactV2: skipping own contact")
return nil
}
@ -648,7 +665,7 @@ func (m *Messenger) HandleSyncInstallationContact(state *ReceivedMessageState, m
return nil
}
func (m *Messenger) HandleSyncProfilePictures(state *ReceivedMessageState, message protobuf.SyncProfilePictures) error {
func (m *Messenger) HandleSyncProfilePictures(state *ReceivedMessageState, message *protobuf.SyncProfilePictures, statusMessage *v1protocol.StatusMessage) error {
dbImages, err := m.multiAccounts.GetIdentityImages(message.KeyUid)
if err != nil {
return err
@ -688,7 +705,7 @@ func (m *Messenger) HandleSyncProfilePictures(state *ReceivedMessageState, messa
return err
}
func (m *Messenger) HandleSyncInstallationPublicChat(state *ReceivedMessageState, message protobuf.SyncInstallationPublicChat) *Chat {
func (m *Messenger) HandleSyncInstallationPublicChat(state *ReceivedMessageState, message *protobuf.SyncInstallationPublicChat, statusMessage *v1protocol.StatusMessage) error {
chatID := message.Id
existingChat, ok := state.AllChats.Load(chatID)
if ok && (existingChat.Active || uint32(message.GetClock()/1000) < existingChat.SyncedTo) {
@ -706,10 +723,12 @@ func (m *Messenger) HandleSyncInstallationPublicChat(state *ReceivedMessageState
state.AllChats.Store(chat.ID, chat)
state.Response.AddChat(chat)
return chat
// We join and re-register as we want to receive mentions from the newly joined public chat
_, err := m.createPublicChat(chat.ID, state.Response)
return err
}
func (m *Messenger) HandleSyncChatRemoved(state *ReceivedMessageState, message protobuf.SyncChatRemoved) error {
func (m *Messenger) HandleSyncChatRemoved(state *ReceivedMessageState, message *protobuf.SyncChatRemoved, statusMessage *v1protocol.StatusMessage) error {
chat, ok := m.allChats.Load(message.Id)
if !ok {
return ErrChatNotFound
@ -738,7 +757,7 @@ func (m *Messenger) HandleSyncChatRemoved(state *ReceivedMessageState, message p
return state.Response.Merge(response)
}
func (m *Messenger) HandleSyncChatMessagesRead(state *ReceivedMessageState, message protobuf.SyncChatMessagesRead) error {
func (m *Messenger) HandleSyncChatMessagesRead(state *ReceivedMessageState, message *protobuf.SyncChatMessagesRead, statusMessage *v1protocol.StatusMessage) error {
chat, ok := m.allChats.Load(message.Id)
if !ok {
return ErrChatNotFound
@ -757,7 +776,7 @@ func (m *Messenger) HandleSyncChatMessagesRead(state *ReceivedMessageState, mess
return nil
}
func (m *Messenger) handlePinMessage(pinner *Contact, whisperTimestamp uint64, response *MessengerResponse, message protobuf.PinMessage) error {
func (m *Messenger) handlePinMessage(pinner *Contact, whisperTimestamp uint64, response *MessengerResponse, message *protobuf.PinMessage) error {
logger := m.logger.With(zap.String("site", "HandlePinMessage"))
logger.Info("Handling pin message")
@ -819,7 +838,7 @@ func (m *Messenger) handlePinMessage(pinner *Contact, whisperTimestamp uint64, r
return err
}
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: message.Clock,
Timestamp: whisperTimestamp,
ChatId: chat.ID,
@ -848,7 +867,7 @@ func (m *Messenger) handlePinMessage(pinner *Contact, whisperTimestamp uint64, r
return nil
}
func (m *Messenger) HandlePinMessage(state *ReceivedMessageState, message protobuf.PinMessage) error {
func (m *Messenger) HandlePinMessage(state *ReceivedMessageState, message *protobuf.PinMessage, statusMessage *v1protocol.StatusMessage) error {
return m.handlePinMessage(state.CurrentMessageState.Contact, state.CurrentMessageState.WhisperTimestamp, state.Response, message)
}
@ -970,7 +989,7 @@ func (m *Messenger) handleAcceptContactRequestMessage(state *ReceivedMessageStat
return nil
}
func (m *Messenger) HandleAcceptContactRequest(state *ReceivedMessageState, message protobuf.AcceptContactRequest, senderID string) error {
func (m *Messenger) HandleAcceptContactRequest(state *ReceivedMessageState, message *protobuf.AcceptContactRequest, statusMessage *v1protocol.StatusMessage) error {
err := m.handleAcceptContactRequestMessage(state, message.Clock, message.Id, false)
if err != nil {
m.logger.Warn("could not accept contact request", zap.Error(err))
@ -979,7 +998,7 @@ func (m *Messenger) HandleAcceptContactRequest(state *ReceivedMessageState, mess
return nil
}
func (m *Messenger) handleRetractContactRequest(state *ReceivedMessageState, contact *Contact, message protobuf.RetractContactRequest) error {
func (m *Messenger) handleRetractContactRequest(state *ReceivedMessageState, contact *Contact, message *protobuf.RetractContactRequest) error {
if contact.ID == m.myHexIdentity() {
m.logger.Debug("retraction coming from us, ignoring")
return nil
@ -1040,7 +1059,7 @@ func (m *Messenger) handleRetractContactRequest(state *ReceivedMessageState, con
return nil
}
func (m *Messenger) HandleRetractContactRequest(state *ReceivedMessageState, message protobuf.RetractContactRequest) error {
func (m *Messenger) HandleRetractContactRequest(state *ReceivedMessageState, message *protobuf.RetractContactRequest, statusMessage *v1protocol.StatusMessage) error {
contact := state.CurrentMessageState.Contact
err := m.handleRetractContactRequest(state, contact, message)
if err != nil {
@ -1053,8 +1072,14 @@ func (m *Messenger) HandleRetractContactRequest(state *ReceivedMessageState, mes
return nil
}
func (m *Messenger) HandleContactUpdate(state *ReceivedMessageState, message protobuf.ContactUpdate) error {
func (m *Messenger) HandleContactUpdate(state *ReceivedMessageState, message *protobuf.ContactUpdate, statusMessage *v1protocol.StatusMessage) error {
logger := m.logger.With(zap.String("site", "HandleContactUpdate"))
if common.IsPubKeyEqual(state.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
logger.Warn("coming from us, ignoring")
return nil
}
contact := state.CurrentMessageState.Contact
chat, ok := state.AllChats.Load(contact.ID)
@ -1145,9 +1170,9 @@ func (m *Messenger) HandleContactUpdate(state *ReceivedMessageState, message pro
return nil
}
func (m *Messenger) HandlePairInstallation(state *ReceivedMessageState, message protobuf.PairInstallation) error {
func (m *Messenger) HandleSyncPairInstallation(state *ReceivedMessageState, message *protobuf.SyncPairInstallation, statusMessage *v1protocol.StatusMessage) error {
logger := m.logger.With(zap.String("site", "HandlePairInstallation"))
if err := ValidateReceivedPairInstallation(&message, state.CurrentMessageState.WhisperTimestamp); err != nil {
if err := ValidateReceivedPairInstallation(message, state.CurrentMessageState.WhisperTimestamp); err != nil {
logger.Warn("failed to validate message", zap.Error(err))
return err
}
@ -1332,12 +1357,13 @@ func (m *Messenger) handleArchiveMessages(archiveMessages []*protobuf.WakuMessag
return response, nil
}
func (m *Messenger) HandleCommunityCancelRequestToJoin(state *ReceivedMessageState, signer *ecdsa.PublicKey, cancelRequestToJoinProto protobuf.CommunityCancelRequestToJoin) error {
func (m *Messenger) HandleCommunityCancelRequestToJoin(state *ReceivedMessageState, cancelRequestToJoinProto *protobuf.CommunityCancelRequestToJoin, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
if cancelRequestToJoinProto.CommunityId == nil {
return ErrInvalidCommunityID
}
requestToJoin, err := m.communitiesManager.HandleCommunityCancelRequestToJoin(signer, &cancelRequestToJoinProto)
requestToJoin, err := m.communitiesManager.HandleCommunityCancelRequestToJoin(signer, cancelRequestToJoinProto)
if err != nil {
return err
}
@ -1375,7 +1401,9 @@ func (m *Messenger) HandleCommunityCancelRequestToJoin(state *ReceivedMessageSta
}
// HandleCommunityRequestToJoin handles an community request to join
func (m *Messenger) HandleCommunityRequestToJoin(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToJoinProto protobuf.CommunityRequestToJoin) error {
func (m *Messenger) HandleCommunityRequestToJoin(state *ReceivedMessageState, requestToJoinProto *protobuf.CommunityRequestToJoin, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
if requestToJoinProto.CommunityId == nil {
return ErrInvalidCommunityID
}
@ -1391,7 +1419,7 @@ func (m *Messenger) HandleCommunityRequestToJoin(state *ReceivedMessageState, si
return errors.New("request is expired")
}
requestToJoin, err := m.communitiesManager.HandleCommunityRequestToJoin(signer, &requestToJoinProto)
requestToJoin, err := m.communitiesManager.HandleCommunityRequestToJoin(signer, requestToJoinProto)
if err != nil {
return err
}
@ -1490,12 +1518,13 @@ func (m *Messenger) HandleCommunityRequestToJoin(state *ReceivedMessageState, si
}
// HandleCommunityEditSharedAddresses handles an edit a user has made to their shared addresses
func (m *Messenger) HandleCommunityEditSharedAddresses(state *ReceivedMessageState, signer *ecdsa.PublicKey, editRevealedAddressesProto protobuf.CommunityEditRevealedAccounts) error {
func (m *Messenger) HandleCommunityEditSharedAddresses(state *ReceivedMessageState, editRevealedAddressesProto *protobuf.CommunityEditSharedAddresses, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
if editRevealedAddressesProto.CommunityId == nil {
return ErrInvalidCommunityID
}
err := m.communitiesManager.HandleCommunityEditSharedAddresses(signer, &editRevealedAddressesProto)
err := m.communitiesManager.HandleCommunityEditSharedAddresses(signer, editRevealedAddressesProto)
if err != nil {
return err
}
@ -1509,12 +1538,13 @@ func (m *Messenger) HandleCommunityEditSharedAddresses(state *ReceivedMessageSta
return nil
}
func (m *Messenger) HandleCommunityRequestToJoinResponse(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToJoinResponseProto protobuf.CommunityRequestToJoinResponse) error {
func (m *Messenger) HandleCommunityRequestToJoinResponse(state *ReceivedMessageState, requestToJoinResponseProto *protobuf.CommunityRequestToJoinResponse, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
if requestToJoinResponseProto.CommunityId == nil {
return ErrInvalidCommunityID
}
updatedRequest, err := m.communitiesManager.HandleCommunityRequestToJoinResponse(signer, &requestToJoinResponseProto)
updatedRequest, err := m.communitiesManager.HandleCommunityRequestToJoinResponse(signer, requestToJoinResponseProto)
if err != nil {
return err
}
@ -1594,12 +1624,13 @@ func (m *Messenger) HandleCommunityRequestToJoinResponse(state *ReceivedMessageS
return nil
}
func (m *Messenger) HandleCommunityRequestToLeave(state *ReceivedMessageState, signer *ecdsa.PublicKey, requestToLeaveProto protobuf.CommunityRequestToLeave) error {
func (m *Messenger) HandleCommunityRequestToLeave(state *ReceivedMessageState, requestToLeaveProto *protobuf.CommunityRequestToLeave, statusMessage *v1protocol.StatusMessage) error {
signer := state.CurrentMessageState.PublicKey
if requestToLeaveProto.CommunityId == nil {
return ErrInvalidCommunityID
}
err := m.communitiesManager.HandleCommunityRequestToLeave(signer, &requestToLeaveProto)
err := m.communitiesManager.HandleCommunityRequestToLeave(signer, requestToLeaveProto)
if err != nil {
return err
}
@ -1621,7 +1652,7 @@ func (m *Messenger) handleWrappedCommunityDescriptionMessage(payload []byte) (*c
return m.communitiesManager.HandleWrappedCommunityDescriptionMessage(payload)
}
func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editMessage EditMessage) error {
func (m *Messenger) handleEditMessage(state *ReceivedMessageState, editMessage EditMessage) error {
if err := ValidateEditMessage(editMessage.EditMessage); err != nil {
return err
}
@ -1630,7 +1661,7 @@ func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editMessage E
originalMessage, err := m.getMessageFromResponseOrDatabase(state.Response, messageID)
if err == common.ErrRecordNotFound {
return m.persistence.SaveEdit(editMessage)
return m.persistence.SaveEdit(&editMessage)
} else if err != nil {
return err
}
@ -1649,13 +1680,13 @@ func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editMessage E
// Check that edit should be applied
if originalMessage.EditedAt >= editMessage.Clock {
return m.persistence.SaveEdit(editMessage)
return m.persistence.SaveEdit(&editMessage)
}
// applyEditMessage modifies the message. Changing the variable name to make it clearer
editedMessage := originalMessage
// Update message and return it
err = m.applyEditMessage(&editMessage.EditMessage, editedMessage)
err = m.applyEditMessage(editMessage.EditMessage, editedMessage)
if err != nil {
return err
}
@ -1708,7 +1739,19 @@ func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editMessage E
return nil
}
func (m *Messenger) HandleDeleteMessage(state *ReceivedMessageState, deleteMessage DeleteMessage) error {
func (m *Messenger) HandleEditMessage(state *ReceivedMessageState, editProto *protobuf.EditMessage, statusMessage *v1protocol.StatusMessage) error {
return m.handleEditMessage(state, EditMessage{
EditMessage: editProto,
From: state.CurrentMessageState.Contact.ID,
ID: state.CurrentMessageState.MessageID,
SigPubKey: state.CurrentMessageState.PublicKey,
})
}
func (m *Messenger) handleDeleteMessage(state *ReceivedMessageState, deleteMessage *DeleteMessage) error {
if deleteMessage == nil {
return nil
}
if err := ValidateDeleteMessage(deleteMessage.DeleteMessage); err != nil {
return err
}
@ -1841,6 +1884,15 @@ func (m *Messenger) HandleDeleteMessage(state *ReceivedMessageState, deleteMessa
return nil
}
func (m *Messenger) HandleDeleteMessage(state *ReceivedMessageState, deleteProto *protobuf.DeleteMessage, statusMessage *v1protocol.StatusMessage) error {
return m.handleDeleteMessage(state, &DeleteMessage{
DeleteMessage: deleteProto,
From: state.CurrentMessageState.Contact.ID,
ID: state.CurrentMessageState.MessageID,
SigPubKey: state.CurrentMessageState.PublicKey,
})
}
func (m *Messenger) getMessageFromResponseOrDatabase(response *MessengerResponse, messageID string) (*common.Message, error) {
originalMessage := response.GetMessage(messageID)
// otherwise pull from database
@ -1851,7 +1903,7 @@ func (m *Messenger) getMessageFromResponseOrDatabase(response *MessengerResponse
return m.persistence.MessageByID(messageID)
}
func (m *Messenger) HandleDeleteForMeMessage(state *ReceivedMessageState, deleteForMeMessage protobuf.DeleteForMeMessage) error {
func (m *Messenger) HandleSyncDeleteForMeMessage(state *ReceivedMessageState, deleteForMeMessage *protobuf.SyncDeleteForMeMessage, statusMessage *v1protocol.StatusMessage) error {
if err := ValidateDeleteForMeMessage(deleteForMeMessage); err != nil {
return err
}
@ -1861,7 +1913,7 @@ func (m *Messenger) HandleDeleteForMeMessage(state *ReceivedMessageState, delete
originalMessage, err := m.getMessageFromResponseOrDatabase(state.Response, messageID)
if err == common.ErrRecordNotFound {
return m.persistence.SaveOrUpdateDeleteForMeMessage(&deleteForMeMessage)
return m.persistence.SaveOrUpdateDeleteForMeMessage(deleteForMeMessage)
} else if err != nil {
return err
}
@ -1938,7 +1990,8 @@ func handleContactRequestChatMessage(receivedMessage *common.Message, contact *C
func (m *Messenger) handleChatMessage(state *ReceivedMessageState, forceSeen bool) error {
logger := m.logger.With(zap.String("site", "handleChatMessage"))
if err := ValidateReceivedChatMessage(&state.CurrentMessageState.Message, state.CurrentMessageState.WhisperTimestamp); err != nil {
logger.Info("state", zap.Any("state", state))
if err := ValidateReceivedChatMessage(state.CurrentMessageState.Message, state.CurrentMessageState.WhisperTimestamp); err != nil {
logger.Warn("failed to validate message", zap.Error(err))
return err
}
@ -2209,7 +2262,8 @@ func (m *Messenger) handleChatMessage(state *ReceivedMessageState, forceSeen boo
return nil
}
func (m *Messenger) HandleChatMessage(state *ReceivedMessageState) error {
func (m *Messenger) HandleChatMessage(state *ReceivedMessageState, message *protobuf.ChatMessage, statusMessage *v1protocol.StatusMessage) error {
state.CurrentMessageState.Message = message
return m.handleChatMessage(state, false)
}
@ -2244,13 +2298,13 @@ func (m *Messenger) addActivityCenterNotification(response *MessengerResponse, n
return nil
}
func (m *Messenger) HandleRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.RequestAddressForTransaction) error {
err := ValidateReceivedRequestAddressForTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleRequestAddressForTransaction(messageState *ReceivedMessageState, command *protobuf.RequestAddressForTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedRequestAddressForTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: command.Clock,
Timestamp: messageState.CurrentMessageState.WhisperTimestamp,
Text: "Request address for transaction",
@ -2269,7 +2323,7 @@ func (m *Messenger) HandleRequestAddressForTransaction(messageState *ReceivedMes
return m.handleCommandMessage(messageState, message)
}
func (m *Messenger) handleSyncSetting(messageState *ReceivedMessageState, message *protobuf.SyncSetting) error {
func (m *Messenger) HandleSyncSetting(messageState *ReceivedMessageState, message *protobuf.SyncSetting, statusMessage *v1protocol.StatusMessage) error {
settingField, err := m.extractAndSaveSyncSetting(message)
if err != nil {
return err
@ -2300,7 +2354,7 @@ func (m *Messenger) handleSyncSetting(messageState *ReceivedMessageState, messag
return nil
}
func (m *Messenger) handleSyncAccountCustomizationColor(state *ReceivedMessageState, message protobuf.SyncAccountCustomizationColor) error {
func (m *Messenger) HandleSyncAccountCustomizationColor(state *ReceivedMessageState, message *protobuf.SyncAccountCustomizationColor, statusMessage *v1protocol.StatusMessage) error {
err := m.multiAccounts.UpdateAccountCustomizationColor(message.GetKeyUid(), message.GetCustomizationColor(), message.GetUpdatedAt())
if err != nil {
return err
@ -2310,13 +2364,13 @@ func (m *Messenger) handleSyncAccountCustomizationColor(state *ReceivedMessageSt
return nil
}
func (m *Messenger) HandleRequestTransaction(messageState *ReceivedMessageState, command protobuf.RequestTransaction) error {
err := ValidateReceivedRequestTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleRequestTransaction(messageState *ReceivedMessageState, command *protobuf.RequestTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedRequestTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: command.Clock,
Timestamp: messageState.CurrentMessageState.WhisperTimestamp,
Text: "Request transaction",
@ -2336,8 +2390,8 @@ func (m *Messenger) HandleRequestTransaction(messageState *ReceivedMessageState,
return m.handleCommandMessage(messageState, message)
}
func (m *Messenger) HandleAcceptRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.AcceptRequestAddressForTransaction) error {
err := ValidateReceivedAcceptRequestAddressForTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleAcceptRequestAddressForTransaction(messageState *ReceivedMessageState, command *protobuf.AcceptRequestAddressForTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedAcceptRequestAddressForTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
@ -2387,8 +2441,8 @@ func (m *Messenger) HandleAcceptRequestAddressForTransaction(messageState *Recei
return m.handleCommandMessage(messageState, initialMessage)
}
func (m *Messenger) HandleSendTransaction(messageState *ReceivedMessageState, command protobuf.SendTransaction) error {
err := ValidateReceivedSendTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleSendTransaction(messageState *ReceivedMessageState, command *protobuf.SendTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedSendTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
@ -2407,8 +2461,8 @@ func (m *Messenger) HandleSendTransaction(messageState *ReceivedMessageState, co
return m.persistence.SaveTransactionToValidate(transactionToValidate)
}
func (m *Messenger) HandleDeclineRequestAddressForTransaction(messageState *ReceivedMessageState, command protobuf.DeclineRequestAddressForTransaction) error {
err := ValidateReceivedDeclineRequestAddressForTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleDeclineRequestAddressForTransaction(messageState *ReceivedMessageState, command *protobuf.DeclineRequestAddressForTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedDeclineRequestAddressForTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
@ -2449,8 +2503,8 @@ func (m *Messenger) HandleDeclineRequestAddressForTransaction(messageState *Rece
return m.handleCommandMessage(messageState, oldMessage)
}
func (m *Messenger) HandleDeclineRequestTransaction(messageState *ReceivedMessageState, command protobuf.DeclineRequestTransaction) error {
err := ValidateReceivedDeclineRequestTransaction(&command, messageState.CurrentMessageState.WhisperTimestamp)
func (m *Messenger) HandleDeclineRequestTransaction(messageState *ReceivedMessageState, command *protobuf.DeclineRequestTransaction, statusMessage *v1protocol.StatusMessage) error {
err := ValidateReceivedDeclineRequestTransaction(command, messageState.CurrentMessageState.WhisperTimestamp)
if err != nil {
return err
}
@ -2639,9 +2693,9 @@ func (m *Messenger) messageExists(messageID string, existingMessagesMap map[stri
return false, nil
}
func (m *Messenger) HandleEmojiReaction(state *ReceivedMessageState, pbEmojiR protobuf.EmojiReaction) error {
func (m *Messenger) HandleEmojiReaction(state *ReceivedMessageState, pbEmojiR *protobuf.EmojiReaction, statusMessage *v1protocol.StatusMessage) error {
logger := m.logger.With(zap.String("site", "HandleEmojiReaction"))
if err := ValidateReceivedEmojiReaction(&pbEmojiR, state.Timesource.GetCurrentTime()); err != nil {
if err := ValidateReceivedEmojiReaction(pbEmojiR, state.Timesource.GetCurrentTime()); err != nil {
logger.Error("invalid emoji reaction", zap.Error(err))
return err
}
@ -2693,7 +2747,7 @@ func (m *Messenger) HandleEmojiReaction(state *ReceivedMessageState, pbEmojiR pr
return nil
}
func (m *Messenger) HandleGroupChatInvitation(state *ReceivedMessageState, pbGHInvitations protobuf.GroupChatInvitation) error {
func (m *Messenger) HandleGroupChatInvitation(state *ReceivedMessageState, pbGHInvitations *protobuf.GroupChatInvitation, statusMessage *v1protocol.StatusMessage) error {
allowed, err := m.isMessageAllowedFrom(state.CurrentMessageState.Contact.ID, nil)
if err != nil {
return err
@ -2703,7 +2757,7 @@ func (m *Messenger) HandleGroupChatInvitation(state *ReceivedMessageState, pbGHI
return ErrMessageNotAllowed
}
logger := m.logger.With(zap.String("site", "HandleGroupChatInvitation"))
if err := ValidateReceivedGroupChatInvitation(&pbGHInvitations); err != nil {
if err := ValidateReceivedGroupChatInvitation(pbGHInvitations); err != nil {
logger.Error("invalid group chat invitation", zap.Error(err))
return err
}
@ -2743,9 +2797,16 @@ func (m *Messenger) HandleGroupChatInvitation(state *ReceivedMessageState, pbGHI
return nil
}
func (m *Messenger) HandleContactCodeAdvertisement(state *ReceivedMessageState, cca *protobuf.ContactCodeAdvertisement, statusMessage *v1protocol.StatusMessage) error {
if cca.ChatIdentity == nil {
return nil
}
return m.HandleChatIdentity(state, cca.ChatIdentity, nil)
}
// HandleChatIdentity handles an incoming protobuf.ChatIdentity
// extracts contact information stored in the protobuf and adds it to the user's contact for update.
func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.ChatIdentity) error {
func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci *protobuf.ChatIdentity, statusMessage *v1protocol.StatusMessage) error {
s, err := m.settings.GetSettings()
if err != nil {
return err
@ -2795,7 +2856,7 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
}
}
clockChanged, imagesChanged, err := m.persistence.SaveContactChatIdentity(contact.ID, &ci)
clockChanged, imagesChanged, err := m.persistence.SaveContactChatIdentity(contact.ID, ci)
if err != nil {
return err
}
@ -2854,7 +2915,7 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci protobuf.
return nil
}
func (m *Messenger) HandleAnonymousMetricBatch(amb protobuf.AnonymousMetricBatch) error {
func (m *Messenger) HandleAnonymousMetricBatch(state *ReceivedMessageState, amb *protobuf.AnonymousMetricBatch, statusMessage *v1protocol.StatusMessage) error {
// TODO
return nil
@ -2876,7 +2937,7 @@ func (m *Messenger) checkForEdits(message *common.Message) error {
for _, e := range edits {
if e.Clock >= message.Clock {
// Update message and return it
err := m.applyEditMessage(&e.EditMessage, message)
err := m.applyEditMessage(e.EditMessage, message)
if err != nil {
return err
}
@ -2945,7 +3006,7 @@ func (m *Messenger) checkForDeleteForMes(message *common.Message) error {
return err
}
var messageDeleteForMes []*protobuf.DeleteForMeMessage
var messageDeleteForMes []*protobuf.SyncDeleteForMeMessage
applyDelete := false
for _, messageToCheck := range messagesToCheck {
if !applyDelete {
@ -3288,8 +3349,8 @@ func (m *Messenger) handleSyncKeypair(message *protobuf.SyncKeypair, fromLocalPa
return dbKeypair, nil
}
func (m *Messenger) HandleSyncAccountsPositions(state *ReceivedMessageState, message protobuf.SyncAccountsPositions) error {
accs, err := m.handleSyncAccountsPositions(&message)
func (m *Messenger) HandleSyncAccountsPositions(state *ReceivedMessageState, message *protobuf.SyncAccountsPositions, statusMessage *v1protocol.StatusMessage) error {
accs, err := m.handleSyncAccountsPositions(message)
if err != nil {
if err == ErrTryingToApplyOldWalletAccountsOrder ||
err == accounts.ErrAccountWrongPosition ||
@ -3306,8 +3367,8 @@ func (m *Messenger) HandleSyncAccountsPositions(state *ReceivedMessageState, mes
return nil
}
func (m *Messenger) HandleSyncWatchOnlyAccount(state *ReceivedMessageState, message protobuf.SyncAccount) error {
acc, err := m.handleSyncWatchOnlyAccount(&message, false)
func (m *Messenger) HandleSyncAccount(state *ReceivedMessageState, message *protobuf.SyncAccount, statusMessage *v1protocol.StatusMessage) error {
acc, err := m.handleSyncWatchOnlyAccount(message, false)
if err != nil {
if err == ErrTryingToStoreOldWalletAccount {
return nil
@ -3320,8 +3381,12 @@ func (m *Messenger) HandleSyncWatchOnlyAccount(state *ReceivedMessageState, mess
return nil
}
func (m *Messenger) HandleSyncKeypair(state *ReceivedMessageState, message protobuf.SyncKeypair, fromLocalPairing bool) error {
kp, err := m.handleSyncKeypair(&message, fromLocalPairing)
func (m *Messenger) HandleSyncKeypair(state *ReceivedMessageState, message *protobuf.SyncKeypair, statusMessage *v1protocol.StatusMessage) error {
return m.handleSyncKeypairInternal(state, message, false)
}
func (m *Messenger) handleSyncKeypairInternal(state *ReceivedMessageState, message *protobuf.SyncKeypair, fromLocalPairing bool) error {
kp, err := m.handleSyncKeypair(message, fromLocalPairing)
if err != nil {
if err == ErrTryingToStoreOldKeypair {
return nil
@ -3334,7 +3399,7 @@ func (m *Messenger) HandleSyncKeypair(state *ReceivedMessageState, message proto
return nil
}
func (m *Messenger) HandleSyncContactRequestDecision(state *ReceivedMessageState, message protobuf.SyncContactRequestDecision) error {
func (m *Messenger) HandleSyncContactRequestDecision(state *ReceivedMessageState, message *protobuf.SyncContactRequestDecision, statusMessage *v1protocol.StatusMessage) error {
var err error
var response *MessengerResponse
@ -3351,3 +3416,144 @@ func (m *Messenger) HandleSyncContactRequestDecision(state *ReceivedMessageState
return nil
}
func (m *Messenger) HandlePushNotificationRegistration(state *ReceivedMessageState, encryptedRegistration []byte, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationServer == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationServer.HandlePushNotificationRegistration(publicKey, encryptedRegistration)
}
func (m *Messenger) HandlePushNotificationResponse(state *ReceivedMessageState, message *protobuf.PushNotificationResponse, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationClient == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationClient.HandlePushNotificationResponse(publicKey, message)
}
func (m *Messenger) HandlePushNotificationRegistrationResponse(state *ReceivedMessageState, message *protobuf.PushNotificationRegistrationResponse, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationClient == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationClient.HandlePushNotificationRegistrationResponse(publicKey, message)
}
func (m *Messenger) HandlePushNotificationQuery(state *ReceivedMessageState, message *protobuf.PushNotificationQuery, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationServer == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationServer.HandlePushNotificationQuery(publicKey, statusMessage.ID, message)
}
func (m *Messenger) HandlePushNotificationQueryResponse(state *ReceivedMessageState, message *protobuf.PushNotificationQueryResponse, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationClient == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationClient.HandlePushNotificationQueryResponse(publicKey, message)
}
func (m *Messenger) HandlePushNotificationRequest(state *ReceivedMessageState, message *protobuf.PushNotificationRequest, statusMessage *v1protocol.StatusMessage) error {
if m.pushNotificationServer == nil {
return nil
}
publicKey := state.CurrentMessageState.PublicKey
return m.pushNotificationServer.HandlePushNotificationRequest(publicKey, statusMessage.ID, message)
}
func (m *Messenger) HandleCommunityDescription(state *ReceivedMessageState, message *protobuf.CommunityDescription, statusMessage *v1protocol.StatusMessage) error {
err := m.handleCommunityDescription(state, state.CurrentMessageState.PublicKey, message, statusMessage.DecryptedPayload)
if err != nil {
m.logger.Warn("failed to handle CommunityDescription", zap.Error(err))
return err
}
//if community was among requested ones, send its info and remove filter
for communityID := range m.requestedCommunities {
if _, ok := state.Response.communities[communityID]; ok {
m.passStoredCommunityInfoToSignalHandler(communityID)
}
}
return nil
}
func (m *Messenger) HandleSyncBookmark(state *ReceivedMessageState, message *protobuf.SyncBookmark, statusMessage *v1protocol.StatusMessage) error {
bookmark := &browsers.Bookmark{
URL: message.Url,
Name: message.Name,
ImageURL: message.ImageUrl,
Removed: message.Removed,
Clock: message.Clock,
}
state.AllBookmarks[message.Url] = bookmark
return nil
}
func (m *Messenger) HandleSyncClearHistory(state *ReceivedMessageState, message *protobuf.SyncClearHistory, statusMessage *v1protocol.StatusMessage) error {
chatID := message.ChatId
existingChat, ok := state.AllChats.Load(chatID)
if !ok {
return ErrChatNotFound
}
if existingChat.DeletedAtClockValue >= message.ClearedAt {
return nil
}
err := m.persistence.ClearHistoryFromSyncMessage(existingChat, message.ClearedAt)
if err != nil {
return err
}
if existingChat.Public() {
err = m.transport.ClearProcessedMessageIDsCache()
if err != nil {
return err
}
}
state.AllChats.Store(chatID, existingChat)
state.Response.AddChat(existingChat)
state.Response.AddClearedHistory(&ClearedHistory{
ClearedAt: message.ClearedAt,
ChatID: chatID,
})
return nil
}
func (m *Messenger) HandleSyncTrustedUser(state *ReceivedMessageState, message *protobuf.SyncTrustedUser, statusMessage *v1protocol.StatusMessage) error {
updated, err := m.verificationDatabase.UpsertTrustStatus(message.Id, verification.TrustStatus(message.Status), message.Clock)
if err != nil {
return err
}
if updated {
state.AllTrustStatus[message.Id] = verification.TrustStatus(message.Status)
contact, ok := m.allContacts.Load(message.Id)
if !ok {
m.logger.Info("contact not found")
return nil
}
contact.TrustStatus = verification.TrustStatus(message.Status)
m.allContacts.Store(contact.ID, contact)
state.ModifiedContacts.Store(contact.ID, true)
}
return nil
}
func (m *Messenger) HandleCommunityMessageArchiveMagnetlink(state *ReceivedMessageState, message *protobuf.CommunityMessageArchiveMagnetlink, statusMessage *v1protocol.StatusMessage) error {
return m.HandleHistoryArchiveMagnetlinkMessage(state, state.CurrentMessageState.PublicKey, message.MagnetUri, message.Clock)
}

View File

@ -184,7 +184,7 @@ func (s *EventToSystemMessageSuite) TestHandleMembershipUpdate() {
AllChats: s.m.allChats,
}
err = s.m.HandleMembershipUpdate(state, nil, *rawMembershipUpdateMessage2, defaultSystemMessagesTranslations)
err = s.m.HandleMembershipUpdate(state, nil, rawMembershipUpdateMessage2, defaultSystemMessagesTranslations)
s.Require().NoError(err)
s.Require().Len(state.Response.Notifications(), 1)
s.Require().Equal(state.Response.Notifications()[0].Category, localnotifications.CategoryGroupInvite)
@ -202,7 +202,7 @@ func (s *EventToSystemMessageSuite) TestHandleMembershipUpdate() {
// If the same response is handled, it should not show another notification & the chat should remain inactive
state.Response = &MessengerResponse{}
err = s.m.HandleMembershipUpdate(state, chat, *rawMembershipUpdateMessage2, defaultSystemMessagesTranslations)
err = s.m.HandleMembershipUpdate(state, chat, rawMembershipUpdateMessage2, defaultSystemMessagesTranslations)
s.Require().NoError(err)
s.Require().Len(state.Response.Notifications(), 0)
s.Require().Len(state.Response.Chats(), 1)

File diff suppressed because it is too large Load Diff

View File

@ -563,7 +563,7 @@ func (m *Messenger) calculateGapForChat(chat *Chat, from uint32) (*common.Messag
timestamp := m.getTimesource().GetCurrentTime()
message := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: chat.ID,
Text: "Gap message",
MessageType: protobuf.MessageType_SYSTEM_MESSAGE_GAP,

View File

@ -54,7 +54,7 @@ func (m *Messenger) EditMessage(ctx context.Context, request *requests.EditMessa
clock, _ := chat.NextClockAndTimestamp(m.getTimesource())
editMessage := &EditMessage{}
editMessage := NewEditMessage()
editMessage.Text = request.Text
editMessage.ContentType = request.ContentType
@ -62,7 +62,7 @@ func (m *Messenger) EditMessage(ctx context.Context, request *requests.EditMessa
editMessage.MessageId = message.ID
editMessage.Clock = clock
err = m.applyEditMessage(&editMessage.EditMessage, message)
err = m.applyEditMessage(editMessage.EditMessage, message)
if err != nil {
return nil, err
}
@ -180,7 +180,7 @@ func (m *Messenger) DeleteMessageAndSend(ctx context.Context, messageID string)
clock, _ := chat.NextClockAndTimestamp(m.getTimesource())
deleteMessage := &DeleteMessage{}
deleteMessage := NewDeleteMessage()
deleteMessage.ChatId = message.ChatId
deleteMessage.MessageId = messageID
deleteMessage.Clock = clock
@ -297,7 +297,7 @@ func (m *Messenger) DeleteMessageForMeAndSync(ctx context.Context, localChatID s
response.AddChat(chat)
err = m.withChatClock(func(chatID string, clock uint64) error {
deletedForMeMessage := &protobuf.DeleteForMeMessage{
deletedForMeMessage := &protobuf.SyncDeleteForMeMessage{
MessageId: messageID,
Clock: clock,
}
@ -341,7 +341,7 @@ func (m *Messenger) applyEditMessage(editMessage *protobuf.EditMessage, message
// Save original message as edit so we can retrieve history
if message.EditedAt == 0 {
originalEdit := EditMessage{}
originalEdit := NewEditMessage()
originalEdit.Clock = message.Clock
originalEdit.LocalChatID = message.LocalChatID
originalEdit.MessageId = message.ID
@ -447,7 +447,7 @@ func (m *Messenger) SendOneToOneMessage(request *requests.SendOneToOneMessage) (
}
}
message := &common.Message{}
message := common.NewMessage()
message.Text = request.Message
message.ChatId = chatID
message.ContentType = protobuf.ChatMessage_TEXT_PLAIN
@ -467,7 +467,7 @@ func (m *Messenger) SendGroupChatMessage(request *requests.SendGroupChatMessage)
return nil, ErrChatNotFound
}
message := &common.Message{}
message := common.NewMessage()
message.Text = request.Message
message.ChatId = chatID
message.ContentType = protobuf.ChatMessage_TEXT_PLAIN

View File

@ -45,9 +45,8 @@ func (s *MessengerPinMessageSuite) TestPinMessage() {
s.Require().NoError(err)
s.Require().Len(response.Chats(), 1)
pinMessage := &common.PinMessage{
LocalChatID: theirChat.ID,
}
pinMessage := common.NewPinMessage()
pinMessage.LocalChatID = theirChat.ID
pinMessage.MessageId = inputMessage.ID
pinMessage.Pinned = true
pinMessage.ChatId = theirChat.ID
@ -133,7 +132,7 @@ func (s *MessengerPinMessageSuite) TestPinMessageOutOfOrder() {
&Contact{ID: s.m.myHexIdentity()},
1000,
handlePinMessageResponse,
unpinMessage,
&unpinMessage,
)
s.Require().NoError(err)
@ -156,7 +155,7 @@ func (s *MessengerPinMessageSuite) TestPinMessageOutOfOrder() {
&Contact{ID: s.m.myHexIdentity()},
1000,
handlePinMessageResponse,
pinMessage,
&pinMessage,
)
s.Require().NoError(err)
@ -180,7 +179,7 @@ func (s *MessengerPinMessageSuite) TestPinMessageOutOfOrder() {
&Contact{ID: s.m.myHexIdentity()},
1000,
handlePinMessageResponse,
pinMessage,
&pinMessage,
)
s.Require().NoError(err)

View File

@ -87,7 +87,7 @@ func (m *Messenger) sendPinMessage(ctx context.Context, message *common.PinMessa
return nil, err
}
chatMessage := &common.Message{
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: message.Clock,
Timestamp: m.getTimesource().GetCurrentTime(),
ChatId: chat.ID,

View File

@ -9,6 +9,7 @@ import (
gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/protobuf"
v1protocol "github.com/status-im/status-go/protocol/v1"
"github.com/status-im/status-go/services/wallet"
)
@ -33,14 +34,14 @@ func (m *Messenger) garbageCollectRemovedSavedAddresses() error {
return m.savedAddressesManager.DeleteSoftRemovedSavedAddresses(uint64(time.Now().AddDate(0, 0, -30).Unix()))
}
func (m *Messenger) dispatchSyncSavedAddress(ctx context.Context, syncMessage protobuf.SyncSavedAddress, rawMessageHandler RawMessageHandler) error {
func (m *Messenger) dispatchSyncSavedAddress(ctx context.Context, syncMessage *protobuf.SyncSavedAddress, rawMessageHandler RawMessageHandler) error {
if !m.hasPairedDevices() {
return nil
}
clock, chat := m.getLastClockWithRelatedChat()
encodedMessage, err := proto.Marshal(&syncMessage)
encodedMessage, err := proto.Marshal(syncMessage)
if err != nil {
return err
}
@ -62,7 +63,7 @@ func (m *Messenger) dispatchSyncSavedAddress(ctx context.Context, syncMessage pr
}
func (m *Messenger) syncNewSavedAddress(ctx context.Context, savedAddress *wallet.SavedAddress, updateClock uint64, rawMessageHandler RawMessageHandler) error {
return m.dispatchSyncSavedAddress(ctx, protobuf.SyncSavedAddress{
return m.dispatchSyncSavedAddress(ctx, &protobuf.SyncSavedAddress{
Address: savedAddress.Address.Bytes(),
Name: savedAddress.Name,
Favourite: savedAddress.Favourite,
@ -75,7 +76,7 @@ func (m *Messenger) syncNewSavedAddress(ctx context.Context, savedAddress *walle
}
func (m *Messenger) syncDeletedSavedAddress(ctx context.Context, address gethcommon.Address, ens string, isTest bool, updateClock uint64, rawMessageHandler RawMessageHandler) error {
return m.dispatchSyncSavedAddress(ctx, protobuf.SyncSavedAddress{
return m.dispatchSyncSavedAddress(ctx, &protobuf.SyncSavedAddress{
Address: address.Bytes(),
UpdateClock: updateClock,
Removed: true,
@ -97,7 +98,7 @@ func (m *Messenger) syncSavedAddress(ctx context.Context, savedAddress wallet.Sa
return
}
func (m *Messenger) handleSyncSavedAddress(state *ReceivedMessageState, syncMessage protobuf.SyncSavedAddress) (err error) {
func (m *Messenger) HandleSyncSavedAddress(state *ReceivedMessageState, syncMessage *protobuf.SyncSavedAddress, statusMessage *v1protocol.StatusMessage) (err error) {
address := gethcommon.BytesToAddress(syncMessage.Address)
if syncMessage.Removed {
_, err = m.savedAddressesManager.DeleteSavedAddress(

View File

@ -74,7 +74,7 @@ func buildImageMessage(s *MessengerShareMessageSuite, chat Chat) *common.Message
s.Require().NoError(err)
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.ChatId = chat.ID
message.Clock = clock
message.Timestamp = timestamp

View File

@ -13,6 +13,7 @@ import (
"github.com/status-im/status-go/protocol/communities"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/transport"
v1protocol "github.com/status-im/status-go/protocol/v1"
)
func (m *Messenger) GetCurrentUserStatus() (*UserStatus, error) {
@ -231,8 +232,8 @@ func (m *Messenger) SetUserStatus(ctx context.Context, newStatus int, newCustomT
return m.sendUserStatus(ctx, *currStatus)
}
func (m *Messenger) HandleStatusUpdate(state *ReceivedMessageState, statusMessage protobuf.StatusUpdate) error {
if err := ValidateStatusUpdate(statusMessage); err != nil {
func (m *Messenger) HandleStatusUpdate(state *ReceivedMessageState, message *protobuf.StatusUpdate, statusMessage *v1protocol.StatusMessage) error {
if err := ValidateStatusUpdate(message); err != nil {
return err
}
@ -243,17 +244,17 @@ func (m *Messenger) HandleStatusUpdate(state *ReceivedMessageState, statusMessag
return err
}
if currentStatus.Clock >= statusMessage.Clock {
if currentStatus.Clock >= message.Clock {
return nil // older status message, or status does not change ignoring it
}
newStatus := ToUserStatus(statusMessage)
newStatus := ToUserStatus(message)
err = m.settings.SaveSettingField(settings.CurrentUserStatus, newStatus)
if err != nil {
return err
}
state.Response.SetCurrentStatus(newStatus)
} else {
statusUpdate := ToUserStatus(statusMessage)
statusUpdate := ToUserStatus(message)
statusUpdate.PublicKey = state.CurrentMessageState.Contact.ID
err := m.persistence.InsertStatusUpdate(statusUpdate)

View File

@ -43,7 +43,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
state.AllContacts.Store(message.PublicKey, contact)
}
currentMessageState := &CurrentMessageState{
Message: protobuf.ChatMessage{
Message: &protobuf.ChatMessage{
Clock: message.Clock,
},
MessageID: " ", // make it not empty to bypass this validation: https://github.com/status-im/status-go/blob/7cd7430d3141b08f7c455d7918f4160ea8fd0559/protocol/messenger_handler.go#L325
@ -52,7 +52,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
Contact: contact,
}
state.CurrentMessageState = currentMessageState
err = m.HandleContactUpdate(state, message)
err = m.HandleContactUpdate(state, &message, nil)
if err != nil {
m.logger.Warn("failed to HandleContactUpdate when HandleSyncRawMessages", zap.Error(err))
continue
@ -63,13 +63,10 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
addedChat := m.HandleSyncInstallationPublicChat(state, message)
if addedChat != nil {
_, err = m.createPublicChat(addedChat.ID, state.Response)
if err != nil {
m.logger.Error("error createPublicChat when HandleSyncRawMessages", zap.Error(err))
continue
}
err = m.HandleSyncInstallationPublicChat(state, &message, nil)
if err != nil {
m.logger.Error("error createPublicChat when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_CHAT_REMOVED:
var message protobuf.SyncChatRemoved
@ -77,7 +74,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncChatRemoved(state, message)
err = m.HandleSyncChatRemoved(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncChatRemoved when HandleSyncRawMessages", zap.Error(err))
continue
@ -88,7 +85,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncChatMessagesRead(state, message)
err = m.HandleSyncChatMessagesRead(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncChatMessagesRead when HandleSyncRawMessages", zap.Error(err))
continue
@ -99,29 +96,29 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncClearHistory(state, message)
err = m.HandleSyncClearHistory(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncClearHistory when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT:
case protobuf.ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT_V2:
var message protobuf.SyncInstallationContactV2
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.HandleSyncInstallationContact(state, message)
err = m.HandleSyncInstallationContactV2(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncInstallationContact when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_INSTALLATION_COMMUNITY:
var message protobuf.SyncCommunity
var message protobuf.SyncInstallationCommunity
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.handleSyncCommunity(state, message)
err = m.handleSyncInstallationCommunity(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncCommunity when HandleSyncRawMessages", zap.Error(err))
continue
@ -132,7 +129,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncBookmark(state, message)
err = m.HandleSyncBookmark(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncBookmark when HandleSyncRawMessages", zap.Error(err))
continue
@ -143,7 +140,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncTrustedUser(state, message)
err = m.HandleSyncTrustedUser(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncTrustedUser when HandleSyncRawMessages", zap.Error(err))
continue
@ -154,7 +151,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncVerificationRequest(state, message)
err = m.HandleSyncVerificationRequest(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncVerificationRequest when HandleSyncRawMessages", zap.Error(err))
continue
@ -165,18 +162,18 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncSetting(state, &message)
err = m.HandleSyncSetting(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncSetting when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_PROFILE_PICTURE:
case protobuf.ApplicationMetadataMessage_SYNC_PROFILE_PICTURES:
var message protobuf.SyncProfilePictures
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.HandleSyncProfilePictures(state, message)
err = m.HandleSyncProfilePictures(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncProfilePictures when HandleSyncRawMessages", zap.Error(err))
continue
@ -187,7 +184,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncContactRequestDecision(state, message)
err = m.HandleSyncContactRequestDecision(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncContactRequestDecision when HandleSyncRawMessages", zap.Error(err))
continue
@ -198,7 +195,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncWatchOnlyAccount(state, message)
err = m.HandleSyncAccount(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncWatchOnlyAccount when HandleSyncRawMessages", zap.Error(err))
continue
@ -209,7 +206,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncKeypair(state, message, true)
err = m.handleSyncKeypairInternal(state, &message, true)
if err != nil {
m.logger.Error("failed to HandleSyncKeypair when HandleSyncRawMessages", zap.Error(err))
continue
@ -220,7 +217,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncAccountsPositions(state, message)
err = m.HandleSyncAccountsPositions(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncAccountsPositions when HandleSyncRawMessages", zap.Error(err))
continue
@ -231,7 +228,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncSavedAddress(state, message)
err = m.HandleSyncSavedAddress(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncSavedAddress when HandleSyncRawMessages", zap.Error(err))
continue
@ -242,7 +239,7 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.HandleSyncSocialLinks(state, message)
err = m.HandleSyncSocialLinks(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncSocialLinks when HandleSyncRawMessages", zap.Error(err))
continue
@ -253,24 +250,24 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
if err != nil {
return err
}
err = m.handleSyncEnsUsernameDetail(state, message)
err = m.HandleSyncEnsUsernameDetail(state, &message, nil)
if err != nil {
m.logger.Error("failed to handleSyncEnsUsernameDetail when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_DELETE_FOR_ME_MESSAGE:
var message protobuf.DeleteForMeMessage
var message protobuf.SyncDeleteForMeMessage
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.HandleDeleteForMeMessage(state, message)
err = m.HandleSyncDeleteForMeMessage(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleDeleteForMeMessage when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_PAIR_INSTALLATION:
var message protobuf.PairInstallation
case protobuf.ApplicationMetadataMessage_SYNC_PAIR_INSTALLATION:
var message protobuf.SyncPairInstallation
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
@ -289,9 +286,9 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
},
}}
m.handleInstallations(installations)
// set WhisperTimestamp to pass the validation in HandlePairInstallation
// set WhisperTimestamp to pass the validation in HandleSyncPairInstallation
state.CurrentMessageState = &CurrentMessageState{WhisperTimestamp: message.Clock}
err = m.HandlePairInstallation(state, message)
err = m.HandleSyncPairInstallation(state, &message, nil)
if err != nil {
return err
}

View File

@ -183,7 +183,7 @@ func (s *MessengerSuite) TestInit() {
func buildAudioMessage(s *MessengerSuite, chat Chat) *common.Message {
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "text-input-message"
message.ChatId = chat.ID
message.Clock = clock
@ -204,7 +204,7 @@ func buildAudioMessage(s *MessengerSuite, chat Chat) *common.Message {
func buildTestMessage(chat Chat) *common.Message {
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.Text = "text-input-message"
message.ChatId = chat.ID
message.Clock = clock
@ -226,7 +226,7 @@ func buildTestMessage(chat Chat) *common.Message {
func buildTestGapMessage(chat Chat) *common.Message {
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.ChatId = chat.ID
message.Clock = clock
message.Timestamp = timestamp
@ -380,7 +380,7 @@ func (s *MessengerSuite) TestSendPrivateOneToOne() {
pkString := hex.EncodeToString(crypto.FromECDSAPub(&recipientKey.PublicKey))
chat := CreateOneToOneChat(pkString, &recipientKey.PublicKey, s.m.transport)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
chat.LastClockValue = uint64(100000000000000)
err = s.m.SaveChat(chat)
@ -416,7 +416,7 @@ func (s *MessengerSuite) TestSendPrivateGroup() {
_, err = s.m.AddMembersToGroupChat(context.Background(), chat.ID, members)
s.NoError(err)
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
chat.LastClockValue = uint64(100000000000000)
err = s.m.SaveChat(chat)
@ -444,7 +444,7 @@ func (s *MessengerSuite) TestSendPrivateEmptyGroup() {
chat := response.Chats()[0]
inputMessage := &common.Message{}
inputMessage := common.NewMessage()
inputMessage.ChatId = chat.ID
chat.LastClockValue = uint64(100000000000000)
err = s.m.SaveChat(chat)
@ -1057,7 +1057,7 @@ func (s *MessengerSuite) TestChatPersistencePublic() {
LastClockValue: 20,
DeletedAtClockValue: 30,
UnviewedMessagesCount: 40,
LastMessage: &common.Message{},
LastMessage: common.NewMessage(),
Highlight: false,
}
@ -1078,7 +1078,7 @@ func (s *MessengerSuite) TestDeleteChat() {
LastClockValue: 20,
DeletedAtClockValue: 30,
UnviewedMessagesCount: 40,
LastMessage: &common.Message{},
LastMessage: common.NewMessage(),
Highlight: false,
}
@ -1102,7 +1102,7 @@ func (s *MessengerSuite) TestChatPersistenceUpdate() {
LastClockValue: 20,
DeletedAtClockValue: 30,
UnviewedMessagesCount: 40,
LastMessage: &common.Message{},
LastMessage: common.NewMessage(),
Highlight: false,
}
@ -1146,7 +1146,7 @@ func (s *MessengerSuite) TestChatPersistenceOneToOne() {
LastClockValue: 20,
DeletedAtClockValue: 30,
UnviewedMessagesCount: 40,
LastMessage: &common.Message{},
LastMessage: common.NewMessage(),
Highlight: false,
}
@ -1234,7 +1234,7 @@ func (s *MessengerSuite) TestChatPersistencePrivateGroupChat() {
LastClockValue: 20,
DeletedAtClockValue: 30,
UnviewedMessagesCount: 40,
LastMessage: &common.Message{},
LastMessage: common.NewMessage(),
Highlight: false,
}
s.Require().NoError(s.m.SaveChat(chat))
@ -1320,7 +1320,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-1",
LocalChatID: chat2.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 1,
Text: "test-1",
Clock: 1,
@ -1330,7 +1330,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-2",
LocalChatID: chat2.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 2,
Text: "test-2",
Clock: 2,
@ -1340,7 +1340,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-3",
LocalChatID: chat2.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 3,
Text: "test-3",
Clock: 3,
@ -1351,7 +1351,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-4",
LocalChatID: chat2.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 4,
Text: "test-4",
Clock: 4,
@ -1362,7 +1362,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-5",
LocalChatID: chat2.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 5,
Text: "test-5",
Clock: 5,
@ -1373,7 +1373,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-6",
LocalChatID: chat3.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 6,
Text: "test-6",
Clock: 6,
@ -1384,7 +1384,7 @@ func (s *MessengerSuite) TestBlockContact() {
{
ID: "test-7",
LocalChatID: chat3.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ContentType: 7,
Text: "test-7",
Clock: 7,
@ -2161,7 +2161,7 @@ func (s *MessengerSuite) TestMessageJSON() {
ID: "test-1",
LocalChatID: "local-chat-id",
Alias: "alias",
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
ChatId: "remote-chat-id",
ContentType: 0,
Text: "test-1",
@ -2417,7 +2417,7 @@ func buildImageWithAlbumIDMessage(chat Chat, albumID string) (*common.Message, e
}
clock, timestamp := chat.NextClockAndTimestamp(&testTimeSource{})
message := &common.Message{}
message := common.NewMessage()
message.ChatId = chat.ID
message.Clock = clock
message.Timestamp = timestamp

File diff suppressed because it is too large Load Diff

View File

@ -384,7 +384,7 @@ func (db sqlitePersistence) chats(tx *sql.Tx) (chats []*Chat, err error) {
// Restore last message
if lastMessageBytes != nil {
message := &common.Message{}
message := common.NewMessage()
if err = json.Unmarshal(lastMessageBytes, message); err != nil {
return
}
@ -529,7 +529,7 @@ func (db sqlitePersistence) Chat(chatID string) (*Chat, error) {
// Restore last message
if lastMessageBytes != nil {
message := &common.Message{}
message := common.NewMessage()
if err = json.Unmarshal(lastMessageBytes, message); err != nil {
return nil, err
}

View File

@ -178,7 +178,7 @@ func TestMessageByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(i),
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
From: testPK,
@ -189,7 +189,7 @@ func TestMessageByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(count + i),
LocalChatID: "other-chat",
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
@ -205,7 +205,7 @@ func TestMessageByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(count*2 + i),
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
@ -261,7 +261,7 @@ func TestFirstUnseenMessageIDByChatID(t *testing.T) {
{
ID: "1",
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: 1,
Text: "some-text"},
From: testPK,
@ -270,7 +270,7 @@ func TestFirstUnseenMessageIDByChatID(t *testing.T) {
{
ID: "2",
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: 2,
Text: "some-text"},
From: testPK,
@ -279,7 +279,7 @@ func TestFirstUnseenMessageIDByChatID(t *testing.T) {
{
ID: "3",
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: 3,
Text: "some-text"},
From: testPK,
@ -336,7 +336,7 @@ func TestOldestMessageWhisperTimestampByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(i),
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
WhisperTimestamp: uint64(i + 10),
@ -368,7 +368,7 @@ func TestPinMessageByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(i),
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
From: testPK,
@ -381,11 +381,10 @@ func TestPinMessageByChatID(t *testing.T) {
from = "them"
}
pinMessage := &common.PinMessage{
ID: strconv.Itoa(i),
LocalChatID: chatID,
From: from,
}
pinMessage := common.NewPinMessage()
pinMessage.ID = strconv.Itoa(i)
pinMessage.LocalChatID = chatID
pinMessage.From = from
pinMessage.MessageId = strconv.Itoa(i)
pinMessage.Clock = 111
@ -395,11 +394,12 @@ func TestPinMessageByChatID(t *testing.T) {
if i%200 == 0 {
// unpin a message
unpinMessage := &common.PinMessage{
ID: strconv.Itoa(i),
LocalChatID: chatID,
From: testPK,
}
unpinMessage := common.NewPinMessage()
unpinMessage.ID = strconv.Itoa(i)
unpinMessage.LocalChatID = chatID
unpinMessage.From = testPK
pinMessage.MessageId = strconv.Itoa(i)
unpinMessage.Clock = 333
unpinMessage.Pinned = false
@ -407,11 +407,11 @@ func TestPinMessageByChatID(t *testing.T) {
pinnedMessagesCount--
// pinned before the unpin
pinMessage2 := &common.PinMessage{
ID: strconv.Itoa(i),
LocalChatID: chatID,
From: testPK,
}
pinMessage2 := common.NewPinMessage()
pinMessage2.ID = strconv.Itoa(i)
pinMessage2.LocalChatID = chatID
pinMessage2.From = testPK
pinMessage2.MessageId = strconv.Itoa(i)
pinMessage2.Clock = 222
pinMessage2.Pinned = true
@ -424,7 +424,7 @@ func TestPinMessageByChatID(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(messagesCount + i),
LocalChatID: "chat-without-pinned-messages",
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
},
@ -485,7 +485,7 @@ func TestMessageReplies(t *testing.T) {
message1 := &common.Message{
ID: "id-1",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-1",
Clock: uint64(1),
},
@ -494,7 +494,7 @@ func TestMessageReplies(t *testing.T) {
message2 := &common.Message{
ID: "id-2",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-2",
Clock: uint64(2),
ResponseTo: "id-1",
@ -506,7 +506,7 @@ func TestMessageReplies(t *testing.T) {
message3 := &common.Message{
ID: "id-3",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-3",
Clock: uint64(3),
ResponseTo: "non-existing",
@ -519,7 +519,7 @@ func TestMessageReplies(t *testing.T) {
ID: "id-4",
LocalChatID: chatID,
Deleted: true,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-4",
Clock: uint64(4),
},
@ -530,7 +530,7 @@ func TestMessageReplies(t *testing.T) {
message5 := &common.Message{
ID: "id-5",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-4",
Clock: uint64(5),
ResponseTo: "id-4",
@ -576,7 +576,7 @@ func TestMessageByChatIDWithTheSameClocks(t *testing.T) {
messages = append(messages, &common.Message{
ID: strconv.Itoa(i),
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: clock,
},
From: testPK,
@ -815,7 +815,7 @@ func TestPersistenceEmojiReactions(t *testing.T) {
// Insert normal emoji reaction
require.NoError(t, p.SaveEmojiReaction(&EmojiReaction{
EmojiReaction: protobuf.EmojiReaction{
EmojiReaction: &protobuf.EmojiReaction{
Clock: 1,
MessageId: id3,
ChatId: chatID,
@ -827,7 +827,7 @@ func TestPersistenceEmojiReactions(t *testing.T) {
// Insert retracted emoji reaction
require.NoError(t, p.SaveEmojiReaction(&EmojiReaction{
EmojiReaction: protobuf.EmojiReaction{
EmojiReaction: &protobuf.EmojiReaction{
Clock: 1,
MessageId: id3,
ChatId: chatID,
@ -840,7 +840,7 @@ func TestPersistenceEmojiReactions(t *testing.T) {
// Insert retracted emoji reaction out of pagination
require.NoError(t, p.SaveEmojiReaction(&EmojiReaction{
EmojiReaction: protobuf.EmojiReaction{
EmojiReaction: &protobuf.EmojiReaction{
Clock: 1,
MessageId: id1,
ChatId: chatID,
@ -852,7 +852,7 @@ func TestPersistenceEmojiReactions(t *testing.T) {
// Insert retracted emoji reaction out of pagination
require.NoError(t, p.SaveEmojiReaction(&EmojiReaction{
EmojiReaction: protobuf.EmojiReaction{
EmojiReaction: &protobuf.EmojiReaction{
Clock: 1,
MessageId: id1,
ChatId: chatID,
@ -864,7 +864,7 @@ func TestPersistenceEmojiReactions(t *testing.T) {
// Wrong local chat id
require.NoError(t, p.SaveEmojiReaction(&EmojiReaction{
EmojiReaction: protobuf.EmojiReaction{
EmojiReaction: &protobuf.EmojiReaction{
Clock: 1,
MessageId: id1,
ChatId: chatID,
@ -902,7 +902,7 @@ func insertMinimalMessage(p *sqlitePersistence, id string) error {
return p.SaveMessages([]*common.Message{{
ID: id,
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
}})
}
@ -912,7 +912,7 @@ func insertMinimalDeletedMessage(p *sqlitePersistence, id string) error {
ID: id,
Deleted: true,
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
}})
}
@ -922,7 +922,7 @@ func insertMinimalDeletedForMeMessage(p *sqlitePersistence, id string) error {
ID: id,
DeletedForMe: true,
LocalChatID: testPublicChatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
}})
}
@ -974,7 +974,7 @@ func insertMinimalDiscordMessage(p *sqlitePersistence, id string, discordMessage
ID: id,
LocalChatID: testPublicChatID,
From: testPK,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "some-text",
ContentType: protobuf.ChatMessage_DISCORD_MESSAGE,
ChatId: testPublicChatID,
@ -1021,7 +1021,7 @@ func TestSaveChat(t *testing.T) {
p := newSQLitePersistence(db)
chat := CreatePublicChat("test-chat", &testTimeSource{})
chat.LastMessage = &common.Message{}
chat.LastMessage = common.NewMessage()
err = p.SaveChat(*chat)
require.NoError(t, err)
@ -1044,7 +1044,7 @@ func TestSaveMentions(t *testing.T) {
message := common.Message{
ID: "1",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
Mentions: []string{pkString},
}
@ -1179,7 +1179,7 @@ func TestSaveLinks(t *testing.T) {
message := common.Message{
ID: "1",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
Links: []string{"https://github.com/status-im/status-mobile"},
}
@ -1205,7 +1205,7 @@ func TestSaveWithUnfurledLinks(t *testing.T) {
ID: "1",
LocalChatID: chatID,
From: testPK,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "some-text",
UnfurledLinks: []*protobuf.UnfurledLink{
{
@ -1244,7 +1244,7 @@ func TestHideMessage(t *testing.T) {
message := &common.Message{
ID: "id-1",
LocalChatID: chatID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Text: "content-1",
Clock: uint64(1),
},
@ -1278,7 +1278,7 @@ func TestDeactivatePublicChat(t *testing.T) {
lastMessage := common.Message{
ID: "0x01",
LocalChatID: publicChatID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
}
lastMessage.Clock = 20
@ -1348,7 +1348,7 @@ func TestDeactivateOneToOneChat(t *testing.T) {
lastMessage := common.Message{
ID: "0x01",
LocalChatID: chat.ID,
ChatMessage: protobuf.ChatMessage{Text: "some-text"},
ChatMessage: &protobuf.ChatMessage{Text: "some-text"},
From: testPK,
}
lastMessage.Clock = 20
@ -1530,7 +1530,7 @@ func TestSaveCommunityChat(t *testing.T) {
}
chat := CreateCommunityChat("test-or-gid", "test-chat-id", communityChat, &testTimeSource{})
chat.LastMessage = &common.Message{}
chat.LastMessage = common.NewMessage()
err = p.SaveChat(*chat)
require.NoError(t, err)
@ -1717,7 +1717,7 @@ func TestCountActiveChattersInCommunity(t *testing.T) {
messages = append(messages, &common.Message{
ID: fmt.Sprintf("%smsg%d", chat.Name, i),
LocalChatID: chat.ID,
ChatMessage: protobuf.ChatMessage{
ChatMessage: &protobuf.ChatMessage{
Clock: uint64(i),
Timestamp: uint64(i + offset),
},

View File

@ -1,28 +1,32 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: anon_metrics.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
math "math"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// AnonymousMetric represents a single metric data point
type AnonymousMetric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// id is the unique id of the metric message
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// event is the app metric event type
@ -36,153 +40,243 @@ type AnonymousMetric struct {
// session_id is the id of the session the metric was recorded in
SessionId string `protobuf:"bytes,6,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// created_at is the datetime at which the metric was stored in the local db
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
}
func (m *AnonymousMetric) Reset() { *m = AnonymousMetric{} }
func (m *AnonymousMetric) String() string { return proto.CompactTextString(m) }
func (*AnonymousMetric) ProtoMessage() {}
func (x *AnonymousMetric) Reset() {
*x = AnonymousMetric{}
if protoimpl.UnsafeEnabled {
mi := &file_anon_metrics_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AnonymousMetric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnonymousMetric) ProtoMessage() {}
func (x *AnonymousMetric) ProtoReflect() protoreflect.Message {
mi := &file_anon_metrics_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AnonymousMetric.ProtoReflect.Descriptor instead.
func (*AnonymousMetric) Descriptor() ([]byte, []int) {
return fileDescriptor_4be044a92fa0408c, []int{0}
return file_anon_metrics_proto_rawDescGZIP(), []int{0}
}
func (m *AnonymousMetric) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnonymousMetric.Unmarshal(m, b)
}
func (m *AnonymousMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnonymousMetric.Marshal(b, m, deterministic)
}
func (m *AnonymousMetric) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnonymousMetric.Merge(m, src)
}
func (m *AnonymousMetric) XXX_Size() int {
return xxx_messageInfo_AnonymousMetric.Size(m)
}
func (m *AnonymousMetric) XXX_DiscardUnknown() {
xxx_messageInfo_AnonymousMetric.DiscardUnknown(m)
}
var xxx_messageInfo_AnonymousMetric proto.InternalMessageInfo
func (m *AnonymousMetric) GetId() string {
if m != nil {
return m.Id
func (x *AnonymousMetric) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *AnonymousMetric) GetEvent() string {
if m != nil {
return m.Event
func (x *AnonymousMetric) GetEvent() string {
if x != nil {
return x.Event
}
return ""
}
func (m *AnonymousMetric) GetValue() []byte {
if m != nil {
return m.Value
func (x *AnonymousMetric) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
func (m *AnonymousMetric) GetAppVersion() string {
if m != nil {
return m.AppVersion
func (x *AnonymousMetric) GetAppVersion() string {
if x != nil {
return x.AppVersion
}
return ""
}
func (m *AnonymousMetric) GetOs() string {
if m != nil {
return m.Os
func (x *AnonymousMetric) GetOs() string {
if x != nil {
return x.Os
}
return ""
}
func (m *AnonymousMetric) GetSessionId() string {
if m != nil {
return m.SessionId
func (x *AnonymousMetric) GetSessionId() string {
if x != nil {
return x.SessionId
}
return ""
}
func (m *AnonymousMetric) GetCreatedAt() *timestamppb.Timestamp {
if m != nil {
return m.CreatedAt
func (x *AnonymousMetric) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
// AnonymousMetricBatch represents a batch of AnonymousMetrics allowing broadcast of AnonymousMetrics with fewer messages
type AnonymousMetricBatch struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// metrics is an array of AnonymousMetric metrics
Metrics []*AnonymousMetric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Metrics []*AnonymousMetric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
}
func (m *AnonymousMetricBatch) Reset() { *m = AnonymousMetricBatch{} }
func (m *AnonymousMetricBatch) String() string { return proto.CompactTextString(m) }
func (*AnonymousMetricBatch) ProtoMessage() {}
func (x *AnonymousMetricBatch) Reset() {
*x = AnonymousMetricBatch{}
if protoimpl.UnsafeEnabled {
mi := &file_anon_metrics_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AnonymousMetricBatch) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AnonymousMetricBatch) ProtoMessage() {}
func (x *AnonymousMetricBatch) ProtoReflect() protoreflect.Message {
mi := &file_anon_metrics_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AnonymousMetricBatch.ProtoReflect.Descriptor instead.
func (*AnonymousMetricBatch) Descriptor() ([]byte, []int) {
return fileDescriptor_4be044a92fa0408c, []int{1}
return file_anon_metrics_proto_rawDescGZIP(), []int{1}
}
func (m *AnonymousMetricBatch) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnonymousMetricBatch.Unmarshal(m, b)
}
func (m *AnonymousMetricBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnonymousMetricBatch.Marshal(b, m, deterministic)
}
func (m *AnonymousMetricBatch) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnonymousMetricBatch.Merge(m, src)
}
func (m *AnonymousMetricBatch) XXX_Size() int {
return xxx_messageInfo_AnonymousMetricBatch.Size(m)
}
func (m *AnonymousMetricBatch) XXX_DiscardUnknown() {
xxx_messageInfo_AnonymousMetricBatch.DiscardUnknown(m)
}
var xxx_messageInfo_AnonymousMetricBatch proto.InternalMessageInfo
func (m *AnonymousMetricBatch) GetMetrics() []*AnonymousMetric {
if m != nil {
return m.Metrics
func (x *AnonymousMetricBatch) GetMetrics() []*AnonymousMetric {
if x != nil {
return x.Metrics
}
return nil
}
func init() {
proto.RegisterType((*AnonymousMetric)(nil), "protobuf.AnonymousMetric")
proto.RegisterType((*AnonymousMetricBatch)(nil), "protobuf.AnonymousMetricBatch")
var File_anon_metrics_proto protoreflect.FileDescriptor
var file_anon_metrics_proto_rawDesc = []byte{
0x0a, 0x12, 0x61, 0x6e, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x1f,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xd8, 0x01, 0x0a, 0x0f, 0x41, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x74,
0x72, 0x69, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12,
0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x73,
0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x4b, 0x0a, 0x14, 0x41, 0x6e,
0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x42, 0x61, 0x74,
0x63, 0x68, 0x12, 0x33, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07,
0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("anon_metrics.proto", fileDescriptor_4be044a92fa0408c)
var (
file_anon_metrics_proto_rawDescOnce sync.Once
file_anon_metrics_proto_rawDescData = file_anon_metrics_proto_rawDesc
)
func file_anon_metrics_proto_rawDescGZIP() []byte {
file_anon_metrics_proto_rawDescOnce.Do(func() {
file_anon_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_anon_metrics_proto_rawDescData)
})
return file_anon_metrics_proto_rawDescData
}
var fileDescriptor_4be044a92fa0408c = []byte{
// 269 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x3d, 0x6b, 0xc3, 0x30,
0x10, 0x86, 0x51, 0xd2, 0x24, 0xf5, 0xb9, 0x1f, 0x20, 0x32, 0xa8, 0x81, 0x12, 0x93, 0xc9, 0x93,
0x0d, 0xc9, 0x54, 0x3a, 0x25, 0x5b, 0x29, 0x5d, 0x4c, 0xe9, 0xd0, 0xc5, 0x28, 0xb6, 0x9a, 0x0a,
0x62, 0x9d, 0xb0, 0x64, 0x43, 0xff, 0x69, 0x7f, 0x4e, 0xb1, 0x64, 0x51, 0xc8, 0x24, 0xdd, 0xa3,
0xf7, 0x5e, 0x78, 0x04, 0x94, 0x2b, 0x54, 0x65, 0x23, 0x6c, 0x2b, 0x2b, 0x93, 0xe9, 0x16, 0x2d,
0xd2, 0x6b, 0x77, 0x1c, 0xbb, 0xaf, 0xd5, 0xfa, 0x84, 0x78, 0x3a, 0x8b, 0x3c, 0x80, 0xdc, 0xca,
0x46, 0x18, 0xcb, 0x1b, 0xed, 0xa3, 0x9b, 0x5f, 0x02, 0xf7, 0x7b, 0x85, 0xea, 0xa7, 0xc1, 0xce,
0xbc, 0xb9, 0x16, 0x7a, 0x07, 0x13, 0x59, 0x33, 0x92, 0x90, 0x34, 0x2a, 0x26, 0xb2, 0xa6, 0x4b,
0x98, 0x89, 0x5e, 0x28, 0xcb, 0x26, 0x0e, 0xf9, 0x61, 0xa0, 0x3d, 0x3f, 0x77, 0x82, 0x4d, 0x13,
0x92, 0xde, 0x14, 0x7e, 0xa0, 0x6b, 0x88, 0xb9, 0xd6, 0x65, 0x2f, 0x5a, 0x23, 0x51, 0xb1, 0x2b,
0xb7, 0x01, 0x5c, 0xeb, 0x0f, 0x4f, 0x86, 0x72, 0x34, 0x6c, 0xe6, 0xcb, 0xd1, 0xd0, 0x47, 0x00,
0x23, 0xcc, 0xf0, 0x54, 0xca, 0x9a, 0xcd, 0x1d, 0x8f, 0x46, 0xf2, 0x52, 0xd3, 0x27, 0x80, 0xaa,
0x15, 0xdc, 0x8a, 0xba, 0xe4, 0x96, 0x2d, 0x12, 0x92, 0xc6, 0xdb, 0x55, 0xe6, 0xad, 0xb2, 0x60,
0x95, 0xbd, 0x07, 0xab, 0x22, 0x1a, 0xd3, 0x7b, 0xbb, 0x79, 0x85, 0xe5, 0x85, 0xd9, 0x81, 0xdb,
0xea, 0x9b, 0xee, 0x60, 0x31, 0x7e, 0x17, 0x23, 0xc9, 0x34, 0x8d, 0xb7, 0x0f, 0xff, 0x45, 0x17,
0x0b, 0x45, 0x48, 0x1e, 0x6e, 0x3f, 0xe3, 0x2c, 0x7f, 0x0e, 0xb9, 0xe3, 0xdc, 0xdd, 0x76, 0x7f,
0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x86, 0xa1, 0x32, 0x7e, 0x01, 0x00, 0x00,
var file_anon_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_anon_metrics_proto_goTypes = []interface{}{
(*AnonymousMetric)(nil), // 0: protobuf.AnonymousMetric
(*AnonymousMetricBatch)(nil), // 1: protobuf.AnonymousMetricBatch
(*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
}
var file_anon_metrics_proto_depIdxs = []int32{
2, // 0: protobuf.AnonymousMetric.created_at:type_name -> google.protobuf.Timestamp
0, // 1: protobuf.AnonymousMetricBatch.metrics:type_name -> protobuf.AnonymousMetric
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_anon_metrics_proto_init() }
func file_anon_metrics_proto_init() {
if File_anon_metrics_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_anon_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AnonymousMetric); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_anon_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AnonymousMetricBatch); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_anon_metrics_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_anon_metrics_proto_goTypes,
DependencyIndexes: file_anon_metrics_proto_depIdxs,
MessageInfos: file_anon_metrics_proto_msgTypes,
}.Build()
File_anon_metrics_proto = out.File
file_anon_metrics_proto_rawDesc = nil
file_anon_metrics_proto_goTypes = nil
file_anon_metrics_proto_depIdxs = nil
}

View File

@ -1,41 +1,42 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: application_metadata_message.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ApplicationMetadataMessage_Type int32
const (
ApplicationMetadataMessage_UNKNOWN ApplicationMetadataMessage_Type = 0
ApplicationMetadataMessage_CHAT_MESSAGE ApplicationMetadataMessage_Type = 1
ApplicationMetadataMessage_CONTACT_UPDATE ApplicationMetadataMessage_Type = 2
ApplicationMetadataMessage_MEMBERSHIP_UPDATE_MESSAGE ApplicationMetadataMessage_Type = 3
ApplicationMetadataMessage_PAIR_INSTALLATION ApplicationMetadataMessage_Type = 4
ApplicationMetadataMessage_SYNC_INSTALLATION ApplicationMetadataMessage_Type = 5
ApplicationMetadataMessage_UNKNOWN ApplicationMetadataMessage_Type = 0
ApplicationMetadataMessage_CHAT_MESSAGE ApplicationMetadataMessage_Type = 1
ApplicationMetadataMessage_CONTACT_UPDATE ApplicationMetadataMessage_Type = 2
ApplicationMetadataMessage_MEMBERSHIP_UPDATE_MESSAGE ApplicationMetadataMessage_Type = 3
ApplicationMetadataMessage_SYNC_PAIR_INSTALLATION ApplicationMetadataMessage_Type = 4
// Deprecated: Marked as deprecated in application_metadata_message.proto.
ApplicationMetadataMessage_DEPRECATED_SYNC_INSTALLATION ApplicationMetadataMessage_Type = 5
ApplicationMetadataMessage_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 6
ApplicationMetadataMessage_ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 7
ApplicationMetadataMessage_DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION ApplicationMetadataMessage_Type = 8
ApplicationMetadataMessage_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 9
ApplicationMetadataMessage_SEND_TRANSACTION ApplicationMetadataMessage_Type = 10
ApplicationMetadataMessage_DECLINE_REQUEST_TRANSACTION ApplicationMetadataMessage_Type = 11
ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT ApplicationMetadataMessage_Type = 12
ApplicationMetadataMessage_SYNC_INSTALLATION_CONTACT_V2 ApplicationMetadataMessage_Type = 12
ApplicationMetadataMessage_SYNC_INSTALLATION_ACCOUNT ApplicationMetadataMessage_Type = 13
ApplicationMetadataMessage_SYNC_INSTALLATION_PUBLIC_CHAT ApplicationMetadataMessage_Type = 14
ApplicationMetadataMessage_CONTACT_CODE_ADVERTISEMENT ApplicationMetadataMessage_Type = 15
@ -49,7 +50,8 @@ const (
ApplicationMetadataMessage_GROUP_CHAT_INVITATION ApplicationMetadataMessage_Type = 23
ApplicationMetadataMessage_CHAT_IDENTITY ApplicationMetadataMessage_Type = 24
ApplicationMetadataMessage_COMMUNITY_DESCRIPTION ApplicationMetadataMessage_Type = 25
ApplicationMetadataMessage_COMMUNITY_INVITATION ApplicationMetadataMessage_Type = 26 // Deprecated: Do not use.
// Deprecated: Marked as deprecated in application_metadata_message.proto.
ApplicationMetadataMessage_COMMUNITY_INVITATION ApplicationMetadataMessage_Type = 26
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_JOIN ApplicationMetadataMessage_Type = 27
ApplicationMetadataMessage_PIN_MESSAGE ApplicationMetadataMessage_Type = 28
ApplicationMetadataMessage_EDIT_MESSAGE ApplicationMetadataMessage_Type = 29
@ -66,8 +68,8 @@ const (
ApplicationMetadataMessage_SYNC_BOOKMARK ApplicationMetadataMessage_Type = 40
ApplicationMetadataMessage_SYNC_CLEAR_HISTORY ApplicationMetadataMessage_Type = 41
ApplicationMetadataMessage_SYNC_SETTING ApplicationMetadataMessage_Type = 42
ApplicationMetadataMessage_COMMUNITY_ARCHIVE_MAGNETLINK ApplicationMetadataMessage_Type = 43
ApplicationMetadataMessage_SYNC_PROFILE_PICTURE ApplicationMetadataMessage_Type = 44
ApplicationMetadataMessage_COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK ApplicationMetadataMessage_Type = 43
ApplicationMetadataMessage_SYNC_PROFILE_PICTURES ApplicationMetadataMessage_Type = 44
ApplicationMetadataMessage_SYNC_ACCOUNT ApplicationMetadataMessage_Type = 45
ApplicationMetadataMessage_ACCEPT_CONTACT_REQUEST ApplicationMetadataMessage_Type = 46
ApplicationMetadataMessage_RETRACT_CONTACT_REQUEST ApplicationMetadataMessage_Type = 47
@ -87,7 +89,7 @@ const (
ApplicationMetadataMessage_SYNC_KEYPAIR ApplicationMetadataMessage_Type = 62
ApplicationMetadataMessage_SYNC_SOCIAL_LINKS ApplicationMetadataMessage_Type = 63
ApplicationMetadataMessage_SYNC_ENS_USERNAME_DETAIL ApplicationMetadataMessage_Type = 64
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_NOTIFICATION ApplicationMetadataMessage_Type = 65
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_NOTIFICATIONS ApplicationMetadataMessage_Type = 65
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE ApplicationMetadataMessage_Type = 66
ApplicationMetadataMessage_COMMUNITY_EVENTS_MESSAGE ApplicationMetadataMessage_Type = 67
ApplicationMetadataMessage_COMMUNITY_EDIT_SHARED_ADDRESSES ApplicationMetadataMessage_Type = 68
@ -97,297 +99,468 @@ const (
ApplicationMetadataMessage_COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE ApplicationMetadataMessage_Type = 72
)
var ApplicationMetadataMessage_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_MESSAGE",
2: "CONTACT_UPDATE",
3: "MEMBERSHIP_UPDATE_MESSAGE",
4: "PAIR_INSTALLATION",
5: "SYNC_INSTALLATION",
6: "REQUEST_ADDRESS_FOR_TRANSACTION",
7: "ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION",
8: "DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION",
9: "REQUEST_TRANSACTION",
10: "SEND_TRANSACTION",
11: "DECLINE_REQUEST_TRANSACTION",
12: "SYNC_INSTALLATION_CONTACT",
13: "SYNC_INSTALLATION_ACCOUNT",
14: "SYNC_INSTALLATION_PUBLIC_CHAT",
15: "CONTACT_CODE_ADVERTISEMENT",
16: "PUSH_NOTIFICATION_REGISTRATION",
17: "PUSH_NOTIFICATION_REGISTRATION_RESPONSE",
18: "PUSH_NOTIFICATION_QUERY",
19: "PUSH_NOTIFICATION_QUERY_RESPONSE",
20: "PUSH_NOTIFICATION_REQUEST",
21: "PUSH_NOTIFICATION_RESPONSE",
22: "EMOJI_REACTION",
23: "GROUP_CHAT_INVITATION",
24: "CHAT_IDENTITY",
25: "COMMUNITY_DESCRIPTION",
26: "COMMUNITY_INVITATION",
27: "COMMUNITY_REQUEST_TO_JOIN",
28: "PIN_MESSAGE",
29: "EDIT_MESSAGE",
30: "STATUS_UPDATE",
31: "DELETE_MESSAGE",
32: "SYNC_INSTALLATION_COMMUNITY",
33: "ANONYMOUS_METRIC_BATCH",
34: "SYNC_CHAT_REMOVED",
35: "SYNC_CHAT_MESSAGES_READ",
36: "BACKUP",
37: "SYNC_ACTIVITY_CENTER_READ",
38: "SYNC_ACTIVITY_CENTER_ACCEPTED",
39: "SYNC_ACTIVITY_CENTER_DISMISSED",
40: "SYNC_BOOKMARK",
41: "SYNC_CLEAR_HISTORY",
42: "SYNC_SETTING",
43: "COMMUNITY_ARCHIVE_MAGNETLINK",
44: "SYNC_PROFILE_PICTURE",
45: "SYNC_ACCOUNT",
46: "ACCEPT_CONTACT_REQUEST",
47: "RETRACT_CONTACT_REQUEST",
48: "COMMUNITY_REQUEST_TO_JOIN_RESPONSE",
49: "SYNC_COMMUNITY_SETTINGS",
50: "REQUEST_CONTACT_VERIFICATION",
51: "ACCEPT_CONTACT_VERIFICATION",
52: "DECLINE_CONTACT_VERIFICATION",
53: "SYNC_TRUSTED_USER",
54: "SYNC_VERIFICATION_REQUEST",
56: "SYNC_CONTACT_REQUEST_DECISION",
57: "COMMUNITY_REQUEST_TO_LEAVE",
58: "SYNC_DELETE_FOR_ME_MESSAGE",
59: "SYNC_SAVED_ADDRESS",
60: "COMMUNITY_CANCEL_REQUEST_TO_JOIN",
61: "CANCEL_CONTACT_VERIFICATION",
62: "SYNC_KEYPAIR",
63: "SYNC_SOCIAL_LINKS",
64: "SYNC_ENS_USERNAME_DETAIL",
65: "SYNC_ACTIVITY_CENTER_NOTIFICATION",
66: "SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE",
67: "COMMUNITY_EVENTS_MESSAGE",
68: "COMMUNITY_EDIT_SHARED_ADDRESSES",
69: "SYNC_ACCOUNT_CUSTOMIZATION_COLOR",
70: "SYNC_ACCOUNTS_POSITIONS",
71: "COMMUNITY_EVENTS_MESSAGE_REJECTED",
72: "COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE",
}
// Enum value maps for ApplicationMetadataMessage_Type.
var (
ApplicationMetadataMessage_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_MESSAGE",
2: "CONTACT_UPDATE",
3: "MEMBERSHIP_UPDATE_MESSAGE",
4: "SYNC_PAIR_INSTALLATION",
5: "DEPRECATED_SYNC_INSTALLATION",
6: "REQUEST_ADDRESS_FOR_TRANSACTION",
7: "ACCEPT_REQUEST_ADDRESS_FOR_TRANSACTION",
8: "DECLINE_REQUEST_ADDRESS_FOR_TRANSACTION",
9: "REQUEST_TRANSACTION",
10: "SEND_TRANSACTION",
11: "DECLINE_REQUEST_TRANSACTION",
12: "SYNC_INSTALLATION_CONTACT_V2",
13: "SYNC_INSTALLATION_ACCOUNT",
14: "SYNC_INSTALLATION_PUBLIC_CHAT",
15: "CONTACT_CODE_ADVERTISEMENT",
16: "PUSH_NOTIFICATION_REGISTRATION",
17: "PUSH_NOTIFICATION_REGISTRATION_RESPONSE",
18: "PUSH_NOTIFICATION_QUERY",
19: "PUSH_NOTIFICATION_QUERY_RESPONSE",
20: "PUSH_NOTIFICATION_REQUEST",
21: "PUSH_NOTIFICATION_RESPONSE",
22: "EMOJI_REACTION",
23: "GROUP_CHAT_INVITATION",
24: "CHAT_IDENTITY",
25: "COMMUNITY_DESCRIPTION",
26: "COMMUNITY_INVITATION",
27: "COMMUNITY_REQUEST_TO_JOIN",
28: "PIN_MESSAGE",
29: "EDIT_MESSAGE",
30: "STATUS_UPDATE",
31: "DELETE_MESSAGE",
32: "SYNC_INSTALLATION_COMMUNITY",
33: "ANONYMOUS_METRIC_BATCH",
34: "SYNC_CHAT_REMOVED",
35: "SYNC_CHAT_MESSAGES_READ",
36: "BACKUP",
37: "SYNC_ACTIVITY_CENTER_READ",
38: "SYNC_ACTIVITY_CENTER_ACCEPTED",
39: "SYNC_ACTIVITY_CENTER_DISMISSED",
40: "SYNC_BOOKMARK",
41: "SYNC_CLEAR_HISTORY",
42: "SYNC_SETTING",
43: "COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK",
44: "SYNC_PROFILE_PICTURES",
45: "SYNC_ACCOUNT",
46: "ACCEPT_CONTACT_REQUEST",
47: "RETRACT_CONTACT_REQUEST",
48: "COMMUNITY_REQUEST_TO_JOIN_RESPONSE",
49: "SYNC_COMMUNITY_SETTINGS",
50: "REQUEST_CONTACT_VERIFICATION",
51: "ACCEPT_CONTACT_VERIFICATION",
52: "DECLINE_CONTACT_VERIFICATION",
53: "SYNC_TRUSTED_USER",
54: "SYNC_VERIFICATION_REQUEST",
56: "SYNC_CONTACT_REQUEST_DECISION",
57: "COMMUNITY_REQUEST_TO_LEAVE",
58: "SYNC_DELETE_FOR_ME_MESSAGE",
59: "SYNC_SAVED_ADDRESS",
60: "COMMUNITY_CANCEL_REQUEST_TO_JOIN",
61: "CANCEL_CONTACT_VERIFICATION",
62: "SYNC_KEYPAIR",
63: "SYNC_SOCIAL_LINKS",
64: "SYNC_ENS_USERNAME_DETAIL",
65: "SYNC_ACTIVITY_CENTER_NOTIFICATIONS",
66: "SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE",
67: "COMMUNITY_EVENTS_MESSAGE",
68: "COMMUNITY_EDIT_SHARED_ADDRESSES",
69: "SYNC_ACCOUNT_CUSTOMIZATION_COLOR",
70: "SYNC_ACCOUNTS_POSITIONS",
71: "COMMUNITY_EVENTS_MESSAGE_REJECTED",
72: "COMMUNITY_PRIVILEGED_USER_SYNC_MESSAGE",
}
ApplicationMetadataMessage_Type_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_MESSAGE": 1,
"CONTACT_UPDATE": 2,
"MEMBERSHIP_UPDATE_MESSAGE": 3,
"SYNC_PAIR_INSTALLATION": 4,
"DEPRECATED_SYNC_INSTALLATION": 5,
"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,
"SYNC_INSTALLATION_PUBLIC_CHAT": 14,
"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,
"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,
"SYNC_ACTIVITY_CENTER_NOTIFICATIONS": 65,
"SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE": 66,
"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,
}
)
var ApplicationMetadataMessage_Type_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_MESSAGE": 1,
"CONTACT_UPDATE": 2,
"MEMBERSHIP_UPDATE_MESSAGE": 3,
"PAIR_INSTALLATION": 4,
"SYNC_INSTALLATION": 5,
"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": 12,
"SYNC_INSTALLATION_ACCOUNT": 13,
"SYNC_INSTALLATION_PUBLIC_CHAT": 14,
"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,
"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_ARCHIVE_MAGNETLINK": 43,
"SYNC_PROFILE_PICTURE": 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,
"SYNC_ACTIVITY_CENTER_NOTIFICATION": 65,
"SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE": 66,
"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,
func (x ApplicationMetadataMessage_Type) Enum() *ApplicationMetadataMessage_Type {
p := new(ApplicationMetadataMessage_Type)
*p = x
return p
}
func (x ApplicationMetadataMessage_Type) String() string {
return proto.EnumName(ApplicationMetadataMessage_Type_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ApplicationMetadataMessage_Type) Descriptor() protoreflect.EnumDescriptor {
return file_application_metadata_message_proto_enumTypes[0].Descriptor()
}
func (ApplicationMetadataMessage_Type) Type() protoreflect.EnumType {
return &file_application_metadata_message_proto_enumTypes[0]
}
func (x ApplicationMetadataMessage_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ApplicationMetadataMessage_Type.Descriptor instead.
func (ApplicationMetadataMessage_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad09a6406fcf24c7, []int{0, 0}
return file_application_metadata_message_proto_rawDescGZIP(), []int{0, 0}
}
type ApplicationMetadataMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Signature of the payload field
Signature []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
// This is the encoded protobuf of the application level message, i.e ChatMessage
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// The type of protobuf message sent
Type ApplicationMetadataMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=protobuf.ApplicationMetadataMessage_Type" json:"type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Type ApplicationMetadataMessage_Type `protobuf:"varint,3,opt,name=type,proto3,enum=protobuf.ApplicationMetadataMessage_Type" json:"type,omitempty"`
}
func (m *ApplicationMetadataMessage) Reset() { *m = ApplicationMetadataMessage{} }
func (m *ApplicationMetadataMessage) String() string { return proto.CompactTextString(m) }
func (*ApplicationMetadataMessage) ProtoMessage() {}
func (x *ApplicationMetadataMessage) Reset() {
*x = ApplicationMetadataMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_application_metadata_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ApplicationMetadataMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ApplicationMetadataMessage) ProtoMessage() {}
func (x *ApplicationMetadataMessage) ProtoReflect() protoreflect.Message {
mi := &file_application_metadata_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ApplicationMetadataMessage.ProtoReflect.Descriptor instead.
func (*ApplicationMetadataMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ad09a6406fcf24c7, []int{0}
return file_application_metadata_message_proto_rawDescGZIP(), []int{0}
}
func (m *ApplicationMetadataMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ApplicationMetadataMessage.Unmarshal(m, b)
}
func (m *ApplicationMetadataMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ApplicationMetadataMessage.Marshal(b, m, deterministic)
}
func (m *ApplicationMetadataMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ApplicationMetadataMessage.Merge(m, src)
}
func (m *ApplicationMetadataMessage) XXX_Size() int {
return xxx_messageInfo_ApplicationMetadataMessage.Size(m)
}
func (m *ApplicationMetadataMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ApplicationMetadataMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ApplicationMetadataMessage proto.InternalMessageInfo
func (m *ApplicationMetadataMessage) GetSignature() []byte {
if m != nil {
return m.Signature
func (x *ApplicationMetadataMessage) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
func (m *ApplicationMetadataMessage) GetPayload() []byte {
if m != nil {
return m.Payload
func (x *ApplicationMetadataMessage) GetPayload() []byte {
if x != nil {
return x.Payload
}
return nil
}
func (m *ApplicationMetadataMessage) GetType() ApplicationMetadataMessage_Type {
if m != nil {
return m.Type
func (x *ApplicationMetadataMessage) GetType() ApplicationMetadataMessage_Type {
if x != nil {
return x.Type
}
return ApplicationMetadataMessage_UNKNOWN
}
func init() {
proto.RegisterEnum("protobuf.ApplicationMetadataMessage_Type", ApplicationMetadataMessage_Type_name, ApplicationMetadataMessage_Type_value)
proto.RegisterType((*ApplicationMetadataMessage)(nil), "protobuf.ApplicationMetadataMessage")
var File_application_metadata_message_proto protoreflect.FileDescriptor
var file_application_metadata_message_proto_rawDesc = []byte{
0x0a, 0x22, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x80,
0x12, 0x0a, 0x1a, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a,
0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x22, 0xea, 0x10, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a,
0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x48,
0x41, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e,
0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x02,
0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x48, 0x49, 0x50, 0x5f, 0x55,
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12,
0x1a, 0x0a, 0x16, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x49, 0x4e, 0x53,
0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x12, 0x24, 0x0a, 0x1c, 0x44,
0x45, 0x50, 0x52, 0x45, 0x43, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49,
0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x05, 0x1a, 0x02, 0x08,
0x01, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44,
0x52, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43,
0x54, 0x49, 0x4f, 0x4e, 0x10, 0x06, 0x12, 0x2a, 0x0a, 0x26, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54,
0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53,
0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e,
0x10, 0x07, 0x12, 0x2b, 0x0a, 0x27, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x52, 0x45,
0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x46, 0x4f,
0x52, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x08, 0x12,
0x17, 0x0a, 0x13, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53,
0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x4e, 0x44,
0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0a, 0x12, 0x1f,
0x0a, 0x1b, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53,
0x54, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x0b, 0x12,
0x20, 0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41,
0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x32, 0x10,
0x0c, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c,
0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x0d,
0x12, 0x21, 0x0a, 0x1d, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c,
0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41,
0x54, 0x10, 0x0e, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x43,
0x4f, 0x44, 0x45, 0x5f, 0x41, 0x44, 0x56, 0x45, 0x52, 0x54, 0x49, 0x53, 0x45, 0x4d, 0x45, 0x4e,
0x54, 0x10, 0x0f, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49,
0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52,
0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x55, 0x53, 0x48, 0x5f,
0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x47,
0x49, 0x53, 0x54, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e,
0x53, 0x45, 0x10, 0x11, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54,
0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10,
0x12, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49,
0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x51, 0x55, 0x45, 0x52, 0x59, 0x5f, 0x52, 0x45, 0x53,
0x50, 0x4f, 0x4e, 0x53, 0x45, 0x10, 0x13, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x55, 0x53, 0x48, 0x5f,
0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x51,
0x55, 0x45, 0x53, 0x54, 0x10, 0x14, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4e,
0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50,
0x4f, 0x4e, 0x53, 0x45, 0x10, 0x15, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x4d, 0x4f, 0x4a, 0x49, 0x5f,
0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x16, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x52,
0x4f, 0x55, 0x50, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x41, 0x54,
0x49, 0x4f, 0x4e, 0x10, 0x17, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x49, 0x44,
0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x10, 0x18, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d,
0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x10, 0x19, 0x12, 0x1c, 0x0a, 0x14, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59,
0x5f, 0x49, 0x4e, 0x56, 0x49, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x1a, 0x1a, 0x02, 0x08,
0x01, 0x12, 0x1d, 0x0a, 0x19, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52,
0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x1b,
0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x49, 0x4e, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10,
0x1c, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47,
0x45, 0x10, 0x1d, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x50,
0x44, 0x41, 0x54, 0x45, 0x10, 0x1e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45,
0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1f, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x10, 0x20, 0x12, 0x1a, 0x0a, 0x16, 0x41,
0x4e, 0x4f, 0x4e, 0x59, 0x4d, 0x4f, 0x55, 0x53, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f,
0x42, 0x41, 0x54, 0x43, 0x48, 0x10, 0x21, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x59, 0x4e, 0x43, 0x5f,
0x43, 0x48, 0x41, 0x54, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x22, 0x12, 0x1b,
0x0a, 0x17, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53,
0x41, 0x47, 0x45, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x23, 0x12, 0x0a, 0x0a, 0x06, 0x42,
0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x24, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x59, 0x4e, 0x43, 0x5f,
0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f,
0x52, 0x45, 0x41, 0x44, 0x10, 0x25, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41,
0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x41,
0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x26, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x59, 0x4e,
0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45,
0x52, 0x5f, 0x44, 0x49, 0x53, 0x4d, 0x49, 0x53, 0x53, 0x45, 0x44, 0x10, 0x27, 0x12, 0x11, 0x0a,
0x0d, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x42, 0x4f, 0x4f, 0x4b, 0x4d, 0x41, 0x52, 0x4b, 0x10, 0x28,
0x12, 0x16, 0x0a, 0x12, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x5f, 0x48,
0x49, 0x53, 0x54, 0x4f, 0x52, 0x59, 0x10, 0x29, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x59, 0x4e, 0x43,
0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x2a, 0x12, 0x28, 0x0a, 0x24, 0x43, 0x4f,
0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f,
0x41, 0x52, 0x43, 0x48, 0x49, 0x56, 0x45, 0x5f, 0x4d, 0x41, 0x47, 0x4e, 0x45, 0x54, 0x4c, 0x49,
0x4e, 0x4b, 0x10, 0x2b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x52, 0x4f,
0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x49, 0x43, 0x54, 0x55, 0x52, 0x45, 0x53, 0x10, 0x2c, 0x12,
0x10, 0x0a, 0x0c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10,
0x2d, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
0x41, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x2e, 0x12, 0x1b, 0x0a,
0x17, 0x52, 0x45, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54,
0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x2f, 0x12, 0x26, 0x0a, 0x22, 0x43, 0x4f,
0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f,
0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x53, 0x50, 0x4f, 0x4e, 0x53, 0x45,
0x10, 0x30, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55,
0x4e, 0x49, 0x54, 0x59, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x53, 0x10, 0x31, 0x12,
0x20, 0x0a, 0x1c, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41,
0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10,
0x32, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
0x41, 0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x10, 0x33, 0x12, 0x20, 0x0a, 0x1c, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x43, 0x4f,
0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49,
0x4f, 0x4e, 0x10, 0x34, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x54, 0x52, 0x55,
0x53, 0x54, 0x45, 0x44, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x35, 0x12, 0x1d, 0x0a, 0x19, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x36, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
0x53, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x38, 0x12, 0x1e, 0x0a,
0x1a, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x10, 0x39, 0x12, 0x1e, 0x0a,
0x1a, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x46, 0x4f, 0x52,
0x5f, 0x4d, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x3a, 0x12, 0x16, 0x0a,
0x12, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x41, 0x56, 0x45, 0x44, 0x5f, 0x41, 0x44, 0x44, 0x52,
0x45, 0x53, 0x53, 0x10, 0x3b, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49,
0x54, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53,
0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x3c, 0x12, 0x1f, 0x0a, 0x1b, 0x43,
0x41, 0x4e, 0x43, 0x45, 0x4c, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x5f, 0x56, 0x45,
0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x3d, 0x12, 0x10, 0x0a, 0x0c,
0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4b, 0x45, 0x59, 0x50, 0x41, 0x49, 0x52, 0x10, 0x3e, 0x12, 0x15,
0x0a, 0x11, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x53, 0x4f, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x4c, 0x49,
0x4e, 0x4b, 0x53, 0x10, 0x3f, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x45, 0x4e,
0x53, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49,
0x4c, 0x10, 0x40, 0x12, 0x26, 0x0a, 0x22, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49,
0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x49,
0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x41, 0x12, 0x2b, 0x0a, 0x27, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e,
0x54, 0x45, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e,
0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x42, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x4f, 0x4d, 0x4d,
0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x53, 0x5f, 0x4d, 0x45, 0x53,
0x53, 0x41, 0x47, 0x45, 0x10, 0x43, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e,
0x49, 0x54, 0x59, 0x5f, 0x45, 0x44, 0x49, 0x54, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x45, 0x44, 0x5f,
0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x45, 0x53, 0x10, 0x44, 0x12, 0x24, 0x0a, 0x20, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x5f, 0x43, 0x55, 0x53, 0x54,
0x4f, 0x4d, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x10,
0x45, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e,
0x54, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x46, 0x12, 0x25,
0x0a, 0x21, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x56, 0x45, 0x4e,
0x54, 0x53, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43,
0x54, 0x45, 0x44, 0x10, 0x47, 0x12, 0x2a, 0x0a, 0x26, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49,
0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x49, 0x4c, 0x45, 0x47, 0x45, 0x44, 0x5f, 0x55, 0x53,
0x45, 0x52, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10,
0x48, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("application_metadata_message.proto", fileDescriptor_ad09a6406fcf24c7)
var (
file_application_metadata_message_proto_rawDescOnce sync.Once
file_application_metadata_message_proto_rawDescData = file_application_metadata_message_proto_rawDesc
)
func file_application_metadata_message_proto_rawDescGZIP() []byte {
file_application_metadata_message_proto_rawDescOnce.Do(func() {
file_application_metadata_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_application_metadata_message_proto_rawDescData)
})
return file_application_metadata_message_proto_rawDescData
}
var fileDescriptor_ad09a6406fcf24c7 = []byte{
// 1045 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x56, 0x6d, 0x73, 0x13, 0x37,
0x10, 0x6e, 0x42, 0x9a, 0x04, 0xe5, 0x05, 0x45, 0xe4, 0xc5, 0x79, 0x4f, 0x0c, 0x84, 0x00, 0xad,
0x69, 0xa1, 0xed, 0xb4, 0xa5, 0xb4, 0x95, 0x75, 0x1b, 0x5b, 0xf1, 0x9d, 0x74, 0x48, 0x3a, 0x77,
0xcc, 0x17, 0x8d, 0x29, 0x2e, 0x93, 0x19, 0x20, 0x1e, 0x62, 0x3e, 0xe4, 0x27, 0xf6, 0x57, 0xf4,
0xaf, 0x74, 0xf6, 0x7c, 0x2f, 0x4e, 0xe2, 0x90, 0x4f, 0xc9, 0xed, 0x3e, 0xda, 0xd5, 0x3e, 0xfb,
0xec, 0xca, 0xa4, 0xda, 0xed, 0xf7, 0xdf, 0x9f, 0xfc, 0xdd, 0x1d, 0x9c, 0x9c, 0x7e, 0xf4, 0x1f,
0x7a, 0x83, 0xee, 0xdb, 0xee, 0xa0, 0xeb, 0x3f, 0xf4, 0xce, 0xce, 0xba, 0xef, 0x7a, 0xb5, 0xfe,
0xa7, 0xd3, 0xc1, 0x29, 0x9b, 0x4d, 0xff, 0xbc, 0xf9, 0xfc, 0x4f, 0xf5, 0xbf, 0x25, 0xb2, 0xc1,
0xcb, 0x03, 0x51, 0x86, 0x8f, 0x86, 0x70, 0xb6, 0x45, 0x6e, 0x9f, 0x9d, 0xbc, 0xfb, 0xd8, 0x1d,
0x7c, 0xfe, 0xd4, 0xab, 0x4c, 0xec, 0x4d, 0x1c, 0xce, 0x9b, 0xd2, 0xc0, 0x2a, 0x64, 0xa6, 0xdf,
0x3d, 0x7f, 0x7f, 0xda, 0x7d, 0x5b, 0x99, 0x4c, 0x7d, 0xf9, 0x27, 0x7b, 0x49, 0xa6, 0x06, 0xe7,
0xfd, 0x5e, 0xe5, 0xd6, 0xde, 0xc4, 0xe1, 0xe2, 0xb3, 0x47, 0xb5, 0x3c, 0x5f, 0xed, 0xfa, 0x5c,
0x35, 0x77, 0xde, 0xef, 0x99, 0xf4, 0x58, 0xf5, 0x5f, 0x4a, 0xa6, 0xf0, 0x93, 0xcd, 0x91, 0x99,
0x44, 0xb5, 0x94, 0xfe, 0x4b, 0xd1, 0xaf, 0x18, 0x25, 0xf3, 0xa2, 0xc9, 0x9d, 0x8f, 0xc0, 0x5a,
0xde, 0x00, 0x3a, 0xc1, 0x18, 0x59, 0x14, 0x5a, 0x39, 0x2e, 0x9c, 0x4f, 0xe2, 0x80, 0x3b, 0xa0,
0x93, 0x6c, 0x9b, 0xac, 0x47, 0x10, 0xd5, 0xc1, 0xd8, 0xa6, 0x8c, 0x33, 0x73, 0x71, 0xe4, 0x16,
0x5b, 0x21, 0x4b, 0x31, 0x97, 0xc6, 0x4b, 0x65, 0x1d, 0x0f, 0x43, 0xee, 0xa4, 0x56, 0x74, 0x0a,
0xcd, 0xb6, 0xa3, 0xc4, 0x45, 0xf3, 0xd7, 0xec, 0x1e, 0xd9, 0x35, 0xf0, 0x2a, 0x01, 0xeb, 0x3c,
0x0f, 0x02, 0x03, 0xd6, 0xfa, 0x23, 0x6d, 0xbc, 0x33, 0x5c, 0x59, 0x2e, 0x52, 0xd0, 0x34, 0x7b,
0x4c, 0x0e, 0xb8, 0x10, 0x10, 0x3b, 0x7f, 0x13, 0x76, 0x86, 0x3d, 0x21, 0x0f, 0x03, 0x10, 0xa1,
0x54, 0x70, 0x23, 0x78, 0x96, 0xad, 0x91, 0xbb, 0x39, 0x68, 0xd4, 0x71, 0x9b, 0x2d, 0x13, 0x6a,
0x41, 0x05, 0x17, 0xac, 0x84, 0xed, 0x92, 0xcd, 0xcb, 0xb1, 0x47, 0x01, 0x73, 0x48, 0xcd, 0x95,
0x22, 0x7d, 0x46, 0x20, 0x9d, 0x1f, 0xef, 0xe6, 0x42, 0xe8, 0x44, 0x39, 0xba, 0xc0, 0xf6, 0xc9,
0xf6, 0x55, 0x77, 0x9c, 0xd4, 0x43, 0x29, 0x3c, 0xf6, 0x85, 0x2e, 0xb2, 0x1d, 0xb2, 0x91, 0xf7,
0x43, 0xe8, 0x00, 0x3c, 0x0f, 0xda, 0x60, 0x9c, 0xb4, 0x10, 0x81, 0x72, 0xf4, 0x0e, 0xab, 0x92,
0x9d, 0x38, 0xb1, 0x4d, 0xaf, 0xb4, 0x93, 0x47, 0x52, 0x0c, 0x43, 0x18, 0x68, 0x48, 0xeb, 0xcc,
0x90, 0x72, 0x8a, 0x0c, 0x7d, 0x19, 0xe3, 0x0d, 0xd8, 0x58, 0x2b, 0x0b, 0x74, 0x89, 0x6d, 0x92,
0xb5, 0xab, 0xe0, 0x57, 0x09, 0x98, 0x0e, 0x65, 0xec, 0x3e, 0xd9, 0xbb, 0xc6, 0x59, 0x86, 0xb8,
0x8b, 0x55, 0x8f, 0xcb, 0x97, 0xf2, 0x47, 0x97, 0xb1, 0xa4, 0x71, 0xee, 0xec, 0xf8, 0x0a, 0x4a,
0x10, 0x22, 0x7d, 0x2c, 0xbd, 0x81, 0x8c, 0xe7, 0x55, 0xb6, 0x4e, 0x56, 0x1a, 0x46, 0x27, 0x71,
0x4a, 0x8b, 0x97, 0xaa, 0x2d, 0xdd, 0xb0, 0xba, 0x35, 0xb6, 0x44, 0x16, 0x86, 0xc6, 0x00, 0x94,
0x93, 0xae, 0x43, 0x2b, 0x88, 0x16, 0x3a, 0x8a, 0x12, 0x25, 0x5d, 0xc7, 0x07, 0x60, 0x85, 0x91,
0x71, 0x8a, 0x5e, 0x67, 0x5b, 0x64, 0xb9, 0x74, 0x8d, 0xc4, 0xd9, 0xd8, 0x98, 0x9c, 0x9d, 0xc0,
0x9b, 0x97, 0xde, 0xa2, 0xe3, 0xda, 0x1f, 0x6b, 0xa9, 0xe8, 0x26, 0xbb, 0x43, 0xe6, 0x62, 0xa9,
0x0a, 0xe9, 0x6f, 0xe1, 0xfc, 0x40, 0x20, 0xcb, 0xf9, 0xd9, 0xc6, 0xdb, 0x58, 0xc7, 0x5d, 0x62,
0xf3, 0xf1, 0xd9, 0xc1, 0x7a, 0x02, 0x08, 0x61, 0x64, 0x66, 0x76, 0x51, 0x58, 0xe3, 0x74, 0x93,
0xa5, 0xa6, 0x7b, 0x6c, 0x83, 0xac, 0x72, 0xa5, 0x55, 0x27, 0xd2, 0x89, 0xf5, 0x11, 0x38, 0x23,
0x85, 0xaf, 0x73, 0x27, 0x9a, 0x74, 0xbf, 0x98, 0xac, 0xb4, 0x6c, 0x03, 0x91, 0x6e, 0x43, 0x40,
0xab, 0xd8, 0xb9, 0xd2, 0x9c, 0xa5, 0xb2, 0x48, 0x62, 0x40, 0xef, 0x31, 0x42, 0xa6, 0xeb, 0x5c,
0xb4, 0x92, 0x98, 0xde, 0x2f, 0x54, 0x89, 0xec, 0xb6, 0xb1, 0x52, 0x01, 0xca, 0x81, 0x19, 0x42,
0x1f, 0x14, 0xaa, 0xbc, 0xec, 0x1e, 0x4e, 0x24, 0x04, 0xf4, 0x00, 0x55, 0x37, 0x16, 0x12, 0x48,
0x1b, 0x49, 0x6b, 0x21, 0xa0, 0x0f, 0x53, 0x26, 0x10, 0x53, 0xd7, 0xba, 0x15, 0x71, 0xd3, 0xa2,
0x87, 0x6c, 0x95, 0xb0, 0xe1, 0x0d, 0x43, 0xe0, 0xc6, 0x37, 0xa5, 0x75, 0xda, 0x74, 0xe8, 0x23,
0xa4, 0x31, 0xb5, 0x5b, 0x70, 0x4e, 0xaa, 0x06, 0x7d, 0xcc, 0xf6, 0xc8, 0x56, 0xd9, 0x08, 0x6e,
0x44, 0x53, 0xb6, 0xc1, 0x47, 0xbc, 0xa1, 0xc0, 0x85, 0x52, 0xb5, 0xe8, 0x13, 0x56, 0x21, 0xcb,
0xe9, 0x99, 0xd8, 0xe8, 0x23, 0x19, 0x82, 0x8f, 0xa5, 0x70, 0x89, 0x01, 0xfa, 0x4d, 0x11, 0x2d,
0x9f, 0xb3, 0x6f, 0x53, 0x32, 0x87, 0xeb, 0x24, 0x9f, 0xa5, 0x5c, 0x8d, 0x35, 0x64, 0xcd, 0x80,
0x33, 0xc3, 0x01, 0xbb, 0xe8, 0x7c, 0xca, 0x0e, 0x48, 0xf5, 0x5a, 0x3d, 0x94, 0x92, 0xfd, 0xae,
0xa4, 0xbe, 0x00, 0x67, 0xa5, 0x58, 0xfa, 0x3d, 0xd6, 0x92, 0x1f, 0xcd, 0x33, 0xb4, 0xc1, 0x14,
0xd2, 0xa7, 0xcf, 0x50, 0x0d, 0x97, 0xee, 0x77, 0x01, 0xf0, 0x1c, 0x43, 0xe4, 0x7b, 0x68, 0x2c,
0xe2, 0x87, 0x42, 0x13, 0xce, 0x24, 0xd6, 0x41, 0xe0, 0x13, 0x0b, 0x86, 0xfe, 0x58, 0xb4, 0x7a,
0x14, 0x5d, 0xd4, 0xf7, 0x53, 0xd1, 0xea, 0x4b, 0x95, 0xfb, 0x00, 0x84, 0xb4, 0x18, 0xf8, 0xe7,
0xe1, 0x02, 0x1a, 0x43, 0x41, 0x08, 0xbc, 0x0d, 0xf4, 0x17, 0xf4, 0xa7, 0x21, 0x32, 0x89, 0xe3,
0xca, 0x8d, 0x4a, 0xa5, 0xff, 0x5a, 0xf4, 0xdc, 0xf2, 0x36, 0x04, 0xf9, 0x66, 0xa6, 0x2f, 0x70,
0x95, 0x94, 0x71, 0x05, 0x57, 0x02, 0xc2, 0x2b, 0x13, 0xf7, 0x1b, 0x32, 0x93, 0xf9, 0xc6, 0xd6,
0xfd, 0xb2, 0x68, 0x76, 0x0b, 0x3a, 0xf8, 0x08, 0xd1, 0xdf, 0x0b, 0x26, 0xac, 0x16, 0x92, 0x87,
0x1e, 0xe5, 0x62, 0xe9, 0x1f, 0x6c, 0x8b, 0x54, 0x52, 0x33, 0x28, 0x9b, 0x92, 0xa3, 0x78, 0x04,
0x3e, 0x00, 0xc7, 0x65, 0x48, 0xff, 0x64, 0x0f, 0xc8, 0xfe, 0x58, 0x41, 0x8f, 0xee, 0x28, 0xca,
0x71, 0x93, 0xde, 0x08, 0xf3, 0x38, 0xff, 0x40, 0xeb, 0x98, 0xb1, 0xac, 0x10, 0xda, 0xa0, 0x9c,
0x2d, 0x78, 0x11, 0xf8, 0x0e, 0x8e, 0x78, 0x71, 0x89, 0xd8, 0x26, 0x37, 0x25, 0x45, 0x60, 0x69,
0x80, 0x24, 0x8d, 0x4a, 0xd9, 0x8b, 0xc4, 0x3a, 0x1d, 0xc9, 0xd7, 0xf9, 0xbe, 0x08, 0xb5, 0xa1,
0x50, 0xa8, 0x2f, 0x43, 0x59, 0x1f, 0x6b, 0x2b, 0x11, 0x61, 0xe9, 0x11, 0x56, 0x76, 0xdd, 0x2d,
0xbc, 0x81, 0x63, 0x10, 0x38, 0xd1, 0x0d, 0x7c, 0x71, 0x4b, 0x58, 0x6c, 0x64, 0x5b, 0x86, 0xd0,
0xc8, 0x74, 0xe4, 0xd3, 0xe8, 0xf9, 0xd5, 0x9b, 0xf5, 0x85, 0xd7, 0x73, 0xb5, 0xa7, 0x2f, 0xf2,
0x1f, 0x20, 0x6f, 0xa6, 0xd3, 0xff, 0x9e, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x78, 0xda, 0xcb,
0xc2, 0x27, 0x09, 0x00, 0x00,
var file_application_metadata_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_application_metadata_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_application_metadata_message_proto_goTypes = []interface{}{
(ApplicationMetadataMessage_Type)(0), // 0: protobuf.ApplicationMetadataMessage.Type
(*ApplicationMetadataMessage)(nil), // 1: protobuf.ApplicationMetadataMessage
}
var file_application_metadata_message_proto_depIdxs = []int32{
0, // 0: protobuf.ApplicationMetadataMessage.type:type_name -> protobuf.ApplicationMetadataMessage.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_application_metadata_message_proto_init() }
func file_application_metadata_message_proto_init() {
if File_application_metadata_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_application_metadata_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ApplicationMetadataMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_application_metadata_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_application_metadata_message_proto_goTypes,
DependencyIndexes: file_application_metadata_message_proto_depIdxs,
EnumInfos: file_application_metadata_message_proto_enumTypes,
MessageInfos: file_application_metadata_message_proto_msgTypes,
}.Build()
File_application_metadata_message_proto = out.File
file_application_metadata_message_proto_rawDesc = nil
file_application_metadata_message_proto_goTypes = nil
file_application_metadata_message_proto_depIdxs = nil
}

View File

@ -17,15 +17,15 @@ message ApplicationMetadataMessage {
CHAT_MESSAGE = 1;
CONTACT_UPDATE = 2;
MEMBERSHIP_UPDATE_MESSAGE = 3;
PAIR_INSTALLATION = 4;
SYNC_INSTALLATION = 5;
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 = 12;
SYNC_INSTALLATION_CONTACT_V2 = 12;
SYNC_INSTALLATION_ACCOUNT = 13;
SYNC_INSTALLATION_PUBLIC_CHAT = 14;
CONTACT_CODE_ADVERTISEMENT = 15;
@ -56,8 +56,8 @@ message ApplicationMetadataMessage {
SYNC_BOOKMARK = 40;
SYNC_CLEAR_HISTORY = 41;
SYNC_SETTING = 42;
COMMUNITY_ARCHIVE_MAGNETLINK = 43;
SYNC_PROFILE_PICTURE = 44;
COMMUNITY_MESSAGE_ARCHIVE_MAGNETLINK = 43;
SYNC_PROFILE_PICTURES = 44;
SYNC_ACCOUNT = 45;
ACCEPT_CONTACT_REQUEST = 46;
RETRACT_CONTACT_REQUEST = 47;
@ -77,7 +77,7 @@ message ApplicationMetadataMessage {
SYNC_KEYPAIR = 62;
SYNC_SOCIAL_LINKS = 63;
SYNC_ENS_USERNAME_DETAIL = 64;
SYNC_ACTIVITY_CENTER_NOTIFICATION = 65;
SYNC_ACTIVITY_CENTER_NOTIFICATIONS = 65;
SYNC_ACTIVITY_CENTER_NOTIFICATION_STATE = 66;
COMMUNITY_EVENTS_MESSAGE = 67;
COMMUNITY_EDIT_SHARED_ADDRESSES = 68;

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: chat_identity.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// SourceType are the predefined types of image source allowed
type IdentityImage_SourceType int32
@ -34,28 +34,53 @@ const (
IdentityImage_ENS_AVATAR IdentityImage_SourceType = 2
)
var IdentityImage_SourceType_name = map[int32]string{
0: "UNKNOWN_SOURCE_TYPE",
1: "RAW_PAYLOAD",
2: "ENS_AVATAR",
}
// Enum value maps for IdentityImage_SourceType.
var (
IdentityImage_SourceType_name = map[int32]string{
0: "UNKNOWN_SOURCE_TYPE",
1: "RAW_PAYLOAD",
2: "ENS_AVATAR",
}
IdentityImage_SourceType_value = map[string]int32{
"UNKNOWN_SOURCE_TYPE": 0,
"RAW_PAYLOAD": 1,
"ENS_AVATAR": 2,
}
)
var IdentityImage_SourceType_value = map[string]int32{
"UNKNOWN_SOURCE_TYPE": 0,
"RAW_PAYLOAD": 1,
"ENS_AVATAR": 2,
func (x IdentityImage_SourceType) Enum() *IdentityImage_SourceType {
p := new(IdentityImage_SourceType)
*p = x
return p
}
func (x IdentityImage_SourceType) String() string {
return proto.EnumName(IdentityImage_SourceType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (IdentityImage_SourceType) Descriptor() protoreflect.EnumDescriptor {
return file_chat_identity_proto_enumTypes[0].Descriptor()
}
func (IdentityImage_SourceType) Type() protoreflect.EnumType {
return &file_chat_identity_proto_enumTypes[0]
}
func (x IdentityImage_SourceType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use IdentityImage_SourceType.Descriptor instead.
func (IdentityImage_SourceType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_7a652489000a5879, []int{1, 0}
return file_chat_identity_proto_rawDescGZIP(), []int{1, 0}
}
// ChatIdentity represents the user defined identity associated with their public chat key
type ChatIdentity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Lamport timestamp of the message
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// ens_name is the valid ENS name associated with the chat key
@ -72,102 +97,110 @@ type ChatIdentity struct {
// first known message timestamp in seconds (valid only for community chats for now)
// 0 - unknown
// 1 - no messages
FirstMessageTimestamp uint32 `protobuf:"varint,9,opt,name=first_message_timestamp,json=firstMessageTimestamp,proto3" json:"first_message_timestamp,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
FirstMessageTimestamp uint32 `protobuf:"varint,9,opt,name=first_message_timestamp,json=firstMessageTimestamp,proto3" json:"first_message_timestamp,omitempty"`
}
func (m *ChatIdentity) Reset() { *m = ChatIdentity{} }
func (m *ChatIdentity) String() string { return proto.CompactTextString(m) }
func (*ChatIdentity) ProtoMessage() {}
func (x *ChatIdentity) Reset() {
*x = ChatIdentity{}
if protoimpl.UnsafeEnabled {
mi := &file_chat_identity_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChatIdentity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChatIdentity) ProtoMessage() {}
func (x *ChatIdentity) ProtoReflect() protoreflect.Message {
mi := &file_chat_identity_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChatIdentity.ProtoReflect.Descriptor instead.
func (*ChatIdentity) Descriptor() ([]byte, []int) {
return fileDescriptor_7a652489000a5879, []int{0}
return file_chat_identity_proto_rawDescGZIP(), []int{0}
}
func (m *ChatIdentity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChatIdentity.Unmarshal(m, b)
}
func (m *ChatIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChatIdentity.Marshal(b, m, deterministic)
}
func (m *ChatIdentity) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChatIdentity.Merge(m, src)
}
func (m *ChatIdentity) XXX_Size() int {
return xxx_messageInfo_ChatIdentity.Size(m)
}
func (m *ChatIdentity) XXX_DiscardUnknown() {
xxx_messageInfo_ChatIdentity.DiscardUnknown(m)
}
var xxx_messageInfo_ChatIdentity proto.InternalMessageInfo
func (m *ChatIdentity) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *ChatIdentity) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *ChatIdentity) GetEnsName() string {
if m != nil {
return m.EnsName
func (x *ChatIdentity) GetEnsName() string {
if x != nil {
return x.EnsName
}
return ""
}
func (m *ChatIdentity) GetImages() map[string]*IdentityImage {
if m != nil {
return m.Images
func (x *ChatIdentity) GetImages() map[string]*IdentityImage {
if x != nil {
return x.Images
}
return nil
}
func (m *ChatIdentity) GetDisplayName() string {
if m != nil {
return m.DisplayName
func (x *ChatIdentity) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *ChatIdentity) GetDescription() string {
if m != nil {
return m.Description
func (x *ChatIdentity) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *ChatIdentity) GetColor() string {
if m != nil {
return m.Color
func (x *ChatIdentity) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (m *ChatIdentity) GetEmoji() string {
if m != nil {
return m.Emoji
func (x *ChatIdentity) GetEmoji() string {
if x != nil {
return x.Emoji
}
return ""
}
func (m *ChatIdentity) GetSocialLinks() []*SocialLink {
if m != nil {
return m.SocialLinks
func (x *ChatIdentity) GetSocialLinks() []*SocialLink {
if x != nil {
return x.SocialLinks
}
return nil
}
func (m *ChatIdentity) GetFirstMessageTimestamp() uint32 {
if m != nil {
return m.FirstMessageTimestamp
func (x *ChatIdentity) GetFirstMessageTimestamp() uint32 {
if x != nil {
return x.FirstMessageTimestamp
}
return 0
}
// ProfileImage represents data associated with a user's profile image
type IdentityImage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// payload is a context based payload for the profile image data,
// context is determined by the `source_type`
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
@ -178,165 +211,287 @@ type IdentityImage struct {
// encryption_keys is a list of encrypted keys that can be used to decrypted an encrypted payload
EncryptionKeys [][]byte `protobuf:"bytes,4,rep,name=encryption_keys,json=encryptionKeys,proto3" json:"encryption_keys,omitempty"`
// encrypted signals the encryption state of the payload, default is false.
Encrypted bool `protobuf:"varint,5,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Encrypted bool `protobuf:"varint,5,opt,name=encrypted,proto3" json:"encrypted,omitempty"`
}
func (m *IdentityImage) Reset() { *m = IdentityImage{} }
func (m *IdentityImage) String() string { return proto.CompactTextString(m) }
func (*IdentityImage) ProtoMessage() {}
func (x *IdentityImage) Reset() {
*x = IdentityImage{}
if protoimpl.UnsafeEnabled {
mi := &file_chat_identity_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IdentityImage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IdentityImage) ProtoMessage() {}
func (x *IdentityImage) ProtoReflect() protoreflect.Message {
mi := &file_chat_identity_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IdentityImage.ProtoReflect.Descriptor instead.
func (*IdentityImage) Descriptor() ([]byte, []int) {
return fileDescriptor_7a652489000a5879, []int{1}
return file_chat_identity_proto_rawDescGZIP(), []int{1}
}
func (m *IdentityImage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IdentityImage.Unmarshal(m, b)
}
func (m *IdentityImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_IdentityImage.Marshal(b, m, deterministic)
}
func (m *IdentityImage) XXX_Merge(src proto.Message) {
xxx_messageInfo_IdentityImage.Merge(m, src)
}
func (m *IdentityImage) XXX_Size() int {
return xxx_messageInfo_IdentityImage.Size(m)
}
func (m *IdentityImage) XXX_DiscardUnknown() {
xxx_messageInfo_IdentityImage.DiscardUnknown(m)
}
var xxx_messageInfo_IdentityImage proto.InternalMessageInfo
func (m *IdentityImage) GetPayload() []byte {
if m != nil {
return m.Payload
func (x *IdentityImage) GetPayload() []byte {
if x != nil {
return x.Payload
}
return nil
}
func (m *IdentityImage) GetSourceType() IdentityImage_SourceType {
if m != nil {
return m.SourceType
func (x *IdentityImage) GetSourceType() IdentityImage_SourceType {
if x != nil {
return x.SourceType
}
return IdentityImage_UNKNOWN_SOURCE_TYPE
}
func (m *IdentityImage) GetImageType() ImageType {
if m != nil {
return m.ImageType
func (x *IdentityImage) GetImageType() ImageType {
if x != nil {
return x.ImageType
}
return ImageType_UNKNOWN_IMAGE_TYPE
}
func (m *IdentityImage) GetEncryptionKeys() [][]byte {
if m != nil {
return m.EncryptionKeys
func (x *IdentityImage) GetEncryptionKeys() [][]byte {
if x != nil {
return x.EncryptionKeys
}
return nil
}
func (m *IdentityImage) GetEncrypted() bool {
if m != nil {
return m.Encrypted
func (x *IdentityImage) GetEncrypted() bool {
if x != nil {
return x.Encrypted
}
return false
}
// SocialLinks represents social link assosiated with given chat identity (personal/community)
type SocialLink struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
}
func (m *SocialLink) Reset() { *m = SocialLink{} }
func (m *SocialLink) String() string { return proto.CompactTextString(m) }
func (*SocialLink) ProtoMessage() {}
func (x *SocialLink) Reset() {
*x = SocialLink{}
if protoimpl.UnsafeEnabled {
mi := &file_chat_identity_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SocialLink) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SocialLink) ProtoMessage() {}
func (x *SocialLink) ProtoReflect() protoreflect.Message {
mi := &file_chat_identity_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SocialLink.ProtoReflect.Descriptor instead.
func (*SocialLink) Descriptor() ([]byte, []int) {
return fileDescriptor_7a652489000a5879, []int{2}
return file_chat_identity_proto_rawDescGZIP(), []int{2}
}
func (m *SocialLink) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SocialLink.Unmarshal(m, b)
}
func (m *SocialLink) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SocialLink.Marshal(b, m, deterministic)
}
func (m *SocialLink) XXX_Merge(src proto.Message) {
xxx_messageInfo_SocialLink.Merge(m, src)
}
func (m *SocialLink) XXX_Size() int {
return xxx_messageInfo_SocialLink.Size(m)
}
func (m *SocialLink) XXX_DiscardUnknown() {
xxx_messageInfo_SocialLink.DiscardUnknown(m)
}
var xxx_messageInfo_SocialLink proto.InternalMessageInfo
func (m *SocialLink) GetText() string {
if m != nil {
return m.Text
func (x *SocialLink) GetText() string {
if x != nil {
return x.Text
}
return ""
}
func (m *SocialLink) GetUrl() string {
if m != nil {
return m.Url
func (x *SocialLink) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func init() {
proto.RegisterEnum("protobuf.IdentityImage_SourceType", IdentityImage_SourceType_name, IdentityImage_SourceType_value)
proto.RegisterType((*ChatIdentity)(nil), "protobuf.ChatIdentity")
proto.RegisterMapType((map[string]*IdentityImage)(nil), "protobuf.ChatIdentity.ImagesEntry")
proto.RegisterType((*IdentityImage)(nil), "protobuf.IdentityImage")
proto.RegisterType((*SocialLink)(nil), "protobuf.SocialLink")
var File_chat_identity_proto protoreflect.FileDescriptor
var file_chat_identity_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a,
0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x03, 0x0a,
0x0c, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c,
0x6f, 0x63, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3a,
0x0a, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64,
0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x06, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69,
0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x18, 0x07,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x12, 0x37, 0x0a, 0x0c, 0x73,
0x6f, 0x63, 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x4c,
0x69, 0x6e, 0x6b, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x1a, 0x52, 0x0a, 0x0b,
0x49, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,
0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xb1, 0x02, 0x0a, 0x0d, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x43, 0x0a, 0x0b,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x22, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70,
0x65, 0x12, 0x32, 0x0a, 0x0a, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e,
0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c,
0x0a, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x08, 0x52, 0x09, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x22, 0x46, 0x0a, 0x0a,
0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x41, 0x57, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f,
0x41, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x45, 0x4e, 0x53, 0x5f, 0x41, 0x56, 0x41, 0x54,
0x41, 0x52, 0x10, 0x02, 0x22, 0x32, 0x0a, 0x0a, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x4c, 0x69,
0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("chat_identity.proto", fileDescriptor_7a652489000a5879)
var (
file_chat_identity_proto_rawDescOnce sync.Once
file_chat_identity_proto_rawDescData = file_chat_identity_proto_rawDesc
)
func file_chat_identity_proto_rawDescGZIP() []byte {
file_chat_identity_proto_rawDescOnce.Do(func() {
file_chat_identity_proto_rawDescData = protoimpl.X.CompressGZIP(file_chat_identity_proto_rawDescData)
})
return file_chat_identity_proto_rawDescData
}
var fileDescriptor_7a652489000a5879 = []byte{
// 520 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x52, 0x4f, 0x6f, 0xda, 0x4e,
0x10, 0xfd, 0x19, 0x13, 0xfe, 0x8c, 0x81, 0xa0, 0x25, 0x3f, 0xe1, 0x46, 0x3d, 0xb8, 0x5c, 0xca,
0xa5, 0xae, 0x44, 0xa5, 0xb6, 0x4a, 0x4f, 0x2e, 0xa5, 0x52, 0x94, 0x14, 0xa2, 0x85, 0x34, 0x4a,
0x2f, 0xab, 0x8d, 0xd9, 0x24, 0x5b, 0xfc, 0x4f, 0xde, 0xa5, 0xaa, 0x3f, 0x56, 0xbe, 0x61, 0xe5,
0xb1, 0x1d, 0x93, 0x93, 0xdf, 0xbc, 0x37, 0xfb, 0x76, 0x76, 0x9e, 0x61, 0xe4, 0x3f, 0x72, 0xcd,
0xe4, 0x56, 0x44, 0x5a, 0xea, 0xcc, 0x4d, 0xd2, 0x58, 0xc7, 0xa4, 0x83, 0x9f, 0xbb, 0xfd, 0xfd,
0xa9, 0x25, 0xa2, 0x7d, 0xa8, 0x0a, 0x7a, 0xf2, 0x64, 0x42, 0x6f, 0xfe, 0xc8, 0xf5, 0x79, 0xd9,
0x4d, 0x4e, 0xe0, 0xc8, 0x0f, 0x62, 0x7f, 0x67, 0x1b, 0x8e, 0x31, 0x6d, 0xd2, 0xa2, 0x20, 0xaf,
0xa0, 0x23, 0x22, 0xc5, 0x22, 0x1e, 0x0a, 0xbb, 0xe1, 0x18, 0xd3, 0x2e, 0x6d, 0x8b, 0x48, 0x2d,
0x79, 0x28, 0xc8, 0x19, 0xb4, 0x64, 0xc8, 0x1f, 0x84, 0xb2, 0x4d, 0xc7, 0x9c, 0x5a, 0xb3, 0x89,
0x5b, 0xdd, 0xe4, 0x1e, 0x1a, 0xbb, 0xe7, 0xd8, 0xb4, 0x88, 0x74, 0x9a, 0xd1, 0xf2, 0x04, 0x79,
0x03, 0xbd, 0xad, 0x54, 0x49, 0xc0, 0xb3, 0xc2, 0xba, 0x89, 0xd6, 0x56, 0xc9, 0xa1, 0xbd, 0x03,
0xd6, 0x56, 0x28, 0x3f, 0x95, 0x89, 0x96, 0x71, 0x64, 0x1f, 0x95, 0x1d, 0x35, 0x85, 0x13, 0xc7,
0x41, 0x9c, 0xda, 0x2d, 0xd4, 0x8a, 0x22, 0x67, 0x45, 0x18, 0xff, 0x96, 0x76, 0xbb, 0x60, 0xb1,
0x20, 0x9f, 0xa0, 0xa7, 0x62, 0x5f, 0xf2, 0x80, 0x05, 0x32, 0xda, 0x29, 0xbb, 0x83, 0x23, 0x9f,
0xd4, 0x23, 0xaf, 0x51, 0xbd, 0x94, 0xd1, 0x8e, 0x5a, 0xea, 0x19, 0x2b, 0xf2, 0x11, 0xc6, 0xf7,
0x32, 0x55, 0x9a, 0x85, 0x42, 0x29, 0xfe, 0x20, 0x98, 0x96, 0xa1, 0x50, 0x9a, 0x87, 0x89, 0xdd,
0x75, 0x8c, 0x69, 0x9f, 0xfe, 0x8f, 0xf2, 0x8f, 0x42, 0xdd, 0x54, 0xe2, 0x29, 0x05, 0xeb, 0xe0,
0xe1, 0x64, 0x08, 0xe6, 0x4e, 0x64, 0xb8, 0xdb, 0x2e, 0xcd, 0x21, 0x79, 0x07, 0x47, 0x7f, 0x78,
0xb0, 0x2f, 0xd6, 0x6a, 0xcd, 0xc6, 0xf5, 0x28, 0xd5, 0xe6, 0xf0, 0x3c, 0x2d, 0xba, 0xce, 0x1a,
0x9f, 0x8d, 0xc9, 0x53, 0x03, 0xfa, 0x2f, 0x44, 0x62, 0x43, 0x3b, 0xe1, 0x59, 0x10, 0xf3, 0x2d,
0x5a, 0xf7, 0x68, 0x55, 0x92, 0x39, 0x58, 0x2a, 0xde, 0xa7, 0xbe, 0x60, 0x3a, 0x4b, 0x8a, 0x4b,
0x06, 0x87, 0x11, 0xbd, 0xf0, 0x71, 0xd7, 0xd8, 0xba, 0xc9, 0x12, 0x41, 0x41, 0x3d, 0x63, 0x32,
0x03, 0xc0, 0xc0, 0x0a, 0x0f, 0x13, 0x3d, 0x46, 0x07, 0x1e, 0xb9, 0x86, 0x87, 0xba, 0xb2, 0x82,
0xe4, 0x2d, 0x1c, 0x8b, 0xc8, 0x4f, 0x33, 0xcc, 0x88, 0xed, 0x44, 0xa6, 0xec, 0xa6, 0x63, 0x4e,
0x7b, 0x74, 0x50, 0xd3, 0x17, 0x22, 0x53, 0xe4, 0x35, 0x74, 0x4b, 0x46, 0x6c, 0x31, 0xde, 0x0e,
0xad, 0x89, 0xc9, 0x77, 0x80, 0x7a, 0x28, 0x32, 0x86, 0xd1, 0xf5, 0xf2, 0x62, 0xb9, 0xba, 0x59,
0xb2, 0xf5, 0xea, 0x9a, 0xce, 0x17, 0x6c, 0x73, 0x7b, 0xb5, 0x18, 0xfe, 0x47, 0x8e, 0xc1, 0xa2,
0xde, 0x0d, 0xbb, 0xf2, 0x6e, 0x2f, 0x57, 0xde, 0xb7, 0xa1, 0x41, 0x06, 0x00, 0x8b, 0xe5, 0x9a,
0x79, 0x3f, 0xbd, 0x8d, 0x47, 0x87, 0x8d, 0xc9, 0x2c, 0xf7, 0xa9, 0xe2, 0x24, 0x04, 0x9a, 0x5a,
0xfc, 0xd5, 0x65, 0x0e, 0x88, 0xf3, 0x68, 0xf6, 0x69, 0x50, 0xfe, 0xdd, 0x39, 0xfc, 0xda, 0xff,
0x65, 0xb9, 0xef, 0xbf, 0x54, 0xcf, 0xbc, 0x6b, 0x21, 0xfa, 0xf0, 0x2f, 0x00, 0x00, 0xff, 0xff,
0x4e, 0xae, 0x6d, 0x0e, 0x5f, 0x03, 0x00, 0x00,
var file_chat_identity_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_chat_identity_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_chat_identity_proto_goTypes = []interface{}{
(IdentityImage_SourceType)(0), // 0: protobuf.IdentityImage.SourceType
(*ChatIdentity)(nil), // 1: protobuf.ChatIdentity
(*IdentityImage)(nil), // 2: protobuf.IdentityImage
(*SocialLink)(nil), // 3: protobuf.SocialLink
nil, // 4: protobuf.ChatIdentity.ImagesEntry
(ImageType)(0), // 5: protobuf.ImageType
}
var file_chat_identity_proto_depIdxs = []int32{
4, // 0: protobuf.ChatIdentity.images:type_name -> protobuf.ChatIdentity.ImagesEntry
3, // 1: protobuf.ChatIdentity.social_links:type_name -> protobuf.SocialLink
0, // 2: protobuf.IdentityImage.source_type:type_name -> protobuf.IdentityImage.SourceType
5, // 3: protobuf.IdentityImage.image_type:type_name -> protobuf.ImageType
2, // 4: protobuf.ChatIdentity.ImagesEntry.value:type_name -> protobuf.IdentityImage
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_chat_identity_proto_init() }
func file_chat_identity_proto_init() {
if File_chat_identity_proto != nil {
return
}
file_enums_proto_init()
if !protoimpl.UnsafeEnabled {
file_chat_identity_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChatIdentity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chat_identity_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IdentityImage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_chat_identity_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SocialLink); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_chat_identity_proto_rawDesc,
NumEnums: 1,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_chat_identity_proto_goTypes,
DependencyIndexes: file_chat_identity_proto_depIdxs,
EnumInfos: file_chat_identity_proto_enumTypes,
MessageInfos: file_chat_identity_proto_msgTypes,
}.Build()
File_chat_identity_proto = out.File
file_chat_identity_proto_rawDesc = nil
file_chat_identity_proto_goTypes = nil
file_chat_identity_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@ message DeleteMessage {
string deleted_by = 6;
}
message DeleteForMeMessage {
message SyncDeleteForMeMessage {
uint64 clock = 1;
string message_id = 2;
}

View File

@ -1,435 +1,630 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: command.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RequestAddressForTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
ChatId string `protobuf:"bytes,4,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
ChatId string `protobuf:"bytes,4,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *RequestAddressForTransaction) Reset() { *m = RequestAddressForTransaction{} }
func (m *RequestAddressForTransaction) String() string { return proto.CompactTextString(m) }
func (*RequestAddressForTransaction) ProtoMessage() {}
func (x *RequestAddressForTransaction) Reset() {
*x = RequestAddressForTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestAddressForTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestAddressForTransaction) ProtoMessage() {}
func (x *RequestAddressForTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestAddressForTransaction.ProtoReflect.Descriptor instead.
func (*RequestAddressForTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{0}
return file_command_proto_rawDescGZIP(), []int{0}
}
func (m *RequestAddressForTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestAddressForTransaction.Unmarshal(m, b)
}
func (m *RequestAddressForTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RequestAddressForTransaction.Marshal(b, m, deterministic)
}
func (m *RequestAddressForTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_RequestAddressForTransaction.Merge(m, src)
}
func (m *RequestAddressForTransaction) XXX_Size() int {
return xxx_messageInfo_RequestAddressForTransaction.Size(m)
}
func (m *RequestAddressForTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_RequestAddressForTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_RequestAddressForTransaction proto.InternalMessageInfo
func (m *RequestAddressForTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *RequestAddressForTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *RequestAddressForTransaction) GetValue() string {
if m != nil {
return m.Value
func (x *RequestAddressForTransaction) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (m *RequestAddressForTransaction) GetContract() string {
if m != nil {
return m.Contract
func (x *RequestAddressForTransaction) GetContract() string {
if x != nil {
return x.Contract
}
return ""
}
func (m *RequestAddressForTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *RequestAddressForTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
type AcceptRequestAddressForTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
ChatId string `protobuf:"bytes,4,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
ChatId string `protobuf:"bytes,4,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *AcceptRequestAddressForTransaction) Reset() { *m = AcceptRequestAddressForTransaction{} }
func (m *AcceptRequestAddressForTransaction) String() string { return proto.CompactTextString(m) }
func (*AcceptRequestAddressForTransaction) ProtoMessage() {}
func (x *AcceptRequestAddressForTransaction) Reset() {
*x = AcceptRequestAddressForTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AcceptRequestAddressForTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AcceptRequestAddressForTransaction) ProtoMessage() {}
func (x *AcceptRequestAddressForTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AcceptRequestAddressForTransaction.ProtoReflect.Descriptor instead.
func (*AcceptRequestAddressForTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{1}
return file_command_proto_rawDescGZIP(), []int{1}
}
func (m *AcceptRequestAddressForTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AcceptRequestAddressForTransaction.Unmarshal(m, b)
}
func (m *AcceptRequestAddressForTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AcceptRequestAddressForTransaction.Marshal(b, m, deterministic)
}
func (m *AcceptRequestAddressForTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_AcceptRequestAddressForTransaction.Merge(m, src)
}
func (m *AcceptRequestAddressForTransaction) XXX_Size() int {
return xxx_messageInfo_AcceptRequestAddressForTransaction.Size(m)
}
func (m *AcceptRequestAddressForTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_AcceptRequestAddressForTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_AcceptRequestAddressForTransaction proto.InternalMessageInfo
func (m *AcceptRequestAddressForTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *AcceptRequestAddressForTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *AcceptRequestAddressForTransaction) GetId() string {
if m != nil {
return m.Id
func (x *AcceptRequestAddressForTransaction) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *AcceptRequestAddressForTransaction) GetAddress() string {
if m != nil {
return m.Address
func (x *AcceptRequestAddressForTransaction) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (m *AcceptRequestAddressForTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *AcceptRequestAddressForTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
type DeclineRequestAddressForTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *DeclineRequestAddressForTransaction) Reset() { *m = DeclineRequestAddressForTransaction{} }
func (m *DeclineRequestAddressForTransaction) String() string { return proto.CompactTextString(m) }
func (*DeclineRequestAddressForTransaction) ProtoMessage() {}
func (x *DeclineRequestAddressForTransaction) Reset() {
*x = DeclineRequestAddressForTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeclineRequestAddressForTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeclineRequestAddressForTransaction) ProtoMessage() {}
func (x *DeclineRequestAddressForTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeclineRequestAddressForTransaction.ProtoReflect.Descriptor instead.
func (*DeclineRequestAddressForTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{2}
return file_command_proto_rawDescGZIP(), []int{2}
}
func (m *DeclineRequestAddressForTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeclineRequestAddressForTransaction.Unmarshal(m, b)
}
func (m *DeclineRequestAddressForTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeclineRequestAddressForTransaction.Marshal(b, m, deterministic)
}
func (m *DeclineRequestAddressForTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeclineRequestAddressForTransaction.Merge(m, src)
}
func (m *DeclineRequestAddressForTransaction) XXX_Size() int {
return xxx_messageInfo_DeclineRequestAddressForTransaction.Size(m)
}
func (m *DeclineRequestAddressForTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_DeclineRequestAddressForTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_DeclineRequestAddressForTransaction proto.InternalMessageInfo
func (m *DeclineRequestAddressForTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *DeclineRequestAddressForTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *DeclineRequestAddressForTransaction) GetId() string {
if m != nil {
return m.Id
func (x *DeclineRequestAddressForTransaction) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *DeclineRequestAddressForTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *DeclineRequestAddressForTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
type DeclineRequestTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *DeclineRequestTransaction) Reset() { *m = DeclineRequestTransaction{} }
func (m *DeclineRequestTransaction) String() string { return proto.CompactTextString(m) }
func (*DeclineRequestTransaction) ProtoMessage() {}
func (x *DeclineRequestTransaction) Reset() {
*x = DeclineRequestTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeclineRequestTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeclineRequestTransaction) ProtoMessage() {}
func (x *DeclineRequestTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeclineRequestTransaction.ProtoReflect.Descriptor instead.
func (*DeclineRequestTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{3}
return file_command_proto_rawDescGZIP(), []int{3}
}
func (m *DeclineRequestTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeclineRequestTransaction.Unmarshal(m, b)
}
func (m *DeclineRequestTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeclineRequestTransaction.Marshal(b, m, deterministic)
}
func (m *DeclineRequestTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeclineRequestTransaction.Merge(m, src)
}
func (m *DeclineRequestTransaction) XXX_Size() int {
return xxx_messageInfo_DeclineRequestTransaction.Size(m)
}
func (m *DeclineRequestTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_DeclineRequestTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_DeclineRequestTransaction proto.InternalMessageInfo
func (m *DeclineRequestTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *DeclineRequestTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *DeclineRequestTransaction) GetId() string {
if m != nil {
return m.Id
func (x *DeclineRequestTransaction) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *DeclineRequestTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *DeclineRequestTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
type RequestTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"`
ChatId string `protobuf:"bytes,5,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"`
ChatId string `protobuf:"bytes,5,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *RequestTransaction) Reset() { *m = RequestTransaction{} }
func (m *RequestTransaction) String() string { return proto.CompactTextString(m) }
func (*RequestTransaction) ProtoMessage() {}
func (x *RequestTransaction) Reset() {
*x = RequestTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestTransaction) ProtoMessage() {}
func (x *RequestTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestTransaction.ProtoReflect.Descriptor instead.
func (*RequestTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{4}
return file_command_proto_rawDescGZIP(), []int{4}
}
func (m *RequestTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestTransaction.Unmarshal(m, b)
}
func (m *RequestTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RequestTransaction.Marshal(b, m, deterministic)
}
func (m *RequestTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_RequestTransaction.Merge(m, src)
}
func (m *RequestTransaction) XXX_Size() int {
return xxx_messageInfo_RequestTransaction.Size(m)
}
func (m *RequestTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_RequestTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_RequestTransaction proto.InternalMessageInfo
func (m *RequestTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *RequestTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *RequestTransaction) GetAddress() string {
if m != nil {
return m.Address
func (x *RequestTransaction) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (m *RequestTransaction) GetValue() string {
if m != nil {
return m.Value
func (x *RequestTransaction) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (m *RequestTransaction) GetContract() string {
if m != nil {
return m.Contract
func (x *RequestTransaction) GetContract() string {
if x != nil {
return x.Contract
}
return ""
}
func (m *RequestTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *RequestTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
type SendTransaction struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
TransactionHash string `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
ChatId string `protobuf:"bytes,5,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
TransactionHash string `protobuf:"bytes,3,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
ChatId string `protobuf:"bytes,5,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
}
func (m *SendTransaction) Reset() { *m = SendTransaction{} }
func (m *SendTransaction) String() string { return proto.CompactTextString(m) }
func (*SendTransaction) ProtoMessage() {}
func (x *SendTransaction) Reset() {
*x = SendTransaction{}
if protoimpl.UnsafeEnabled {
mi := &file_command_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SendTransaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendTransaction) ProtoMessage() {}
func (x *SendTransaction) ProtoReflect() protoreflect.Message {
mi := &file_command_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendTransaction.ProtoReflect.Descriptor instead.
func (*SendTransaction) Descriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{5}
return file_command_proto_rawDescGZIP(), []int{5}
}
func (m *SendTransaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SendTransaction.Unmarshal(m, b)
}
func (m *SendTransaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SendTransaction.Marshal(b, m, deterministic)
}
func (m *SendTransaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_SendTransaction.Merge(m, src)
}
func (m *SendTransaction) XXX_Size() int {
return xxx_messageInfo_SendTransaction.Size(m)
}
func (m *SendTransaction) XXX_DiscardUnknown() {
xxx_messageInfo_SendTransaction.DiscardUnknown(m)
}
var xxx_messageInfo_SendTransaction proto.InternalMessageInfo
func (m *SendTransaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *SendTransaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *SendTransaction) GetId() string {
if m != nil {
return m.Id
func (x *SendTransaction) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *SendTransaction) GetTransactionHash() string {
if m != nil {
return m.TransactionHash
func (x *SendTransaction) GetTransactionHash() string {
if x != nil {
return x.TransactionHash
}
return ""
}
func (m *SendTransaction) GetSignature() []byte {
if m != nil {
return m.Signature
func (x *SendTransaction) GetSignature() []byte {
if x != nil {
return x.Signature
}
return nil
}
func (m *SendTransaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *SendTransaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
func init() {
proto.RegisterType((*RequestAddressForTransaction)(nil), "protobuf.RequestAddressForTransaction")
proto.RegisterType((*AcceptRequestAddressForTransaction)(nil), "protobuf.AcceptRequestAddressForTransaction")
proto.RegisterType((*DeclineRequestAddressForTransaction)(nil), "protobuf.DeclineRequestAddressForTransaction")
proto.RegisterType((*DeclineRequestTransaction)(nil), "protobuf.DeclineRequestTransaction")
proto.RegisterType((*RequestTransaction)(nil), "protobuf.RequestTransaction")
proto.RegisterType((*SendTransaction)(nil), "protobuf.SendTransaction")
var File_command_proto protoreflect.FileDescriptor
var file_command_proto_rawDesc = []byte{
0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x7f, 0x0a, 0x1c, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x72,
0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f,
0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22, 0x7d, 0x0a, 0x22, 0x41, 0x63,
0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x23, 0x44, 0x65, 0x63,
0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69,
0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22,
0x5a, 0x0a, 0x19, 0x44, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f,
0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22, 0x8f, 0x01, 0x0a, 0x12,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28,
0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x61, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74,
0x72, 0x61, 0x63, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x22, 0x99, 0x01,
0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61,
0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("command.proto", fileDescriptor_213c0bb044472049)
var (
file_command_proto_rawDescOnce sync.Once
file_command_proto_rawDescData = file_command_proto_rawDesc
)
func file_command_proto_rawDescGZIP() []byte {
file_command_proto_rawDescOnce.Do(func() {
file_command_proto_rawDescData = protoimpl.X.CompressGZIP(file_command_proto_rawDescData)
})
return file_command_proto_rawDescData
}
var fileDescriptor_213c0bb044472049 = []byte{
// 301 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x3d, 0x4f, 0xf3, 0x30,
0x10, 0xc7, 0x95, 0x97, 0xbe, 0xdd, 0xf3, 0x94, 0x22, 0x0b, 0x89, 0x80, 0x3a, 0x54, 0x61, 0x29,
0x4b, 0x19, 0x18, 0x99, 0x8a, 0x10, 0x82, 0x35, 0x30, 0x75, 0xa9, 0xdc, 0xb3, 0x21, 0x16, 0xa9,
0x5d, 0x6c, 0x87, 0x0d, 0xf1, 0x11, 0x98, 0xf9, 0xb6, 0xa8, 0x4e, 0xda, 0x26, 0x43, 0x24, 0x40,
0x9d, 0xec, 0xff, 0x9d, 0xee, 0xfe, 0x3f, 0xdf, 0x19, 0xfa, 0xa8, 0x96, 0x4b, 0x2a, 0xd9, 0x64,
0xa5, 0x95, 0x55, 0xa4, 0xeb, 0x8e, 0x45, 0xfe, 0x14, 0x7f, 0xc0, 0x30, 0xe1, 0xaf, 0x39, 0x37,
0x76, 0xca, 0x98, 0xe6, 0xc6, 0xdc, 0x2a, 0xfd, 0xa8, 0xa9, 0x34, 0x14, 0xad, 0x50, 0x92, 0x1c,
0x41, 0x0b, 0x33, 0x85, 0x2f, 0x91, 0x37, 0xf2, 0xc6, 0x61, 0x52, 0x88, 0x75, 0xf4, 0x8d, 0x66,
0x39, 0x8f, 0xfc, 0x91, 0x37, 0xee, 0x25, 0x85, 0x20, 0xa7, 0xd0, 0x45, 0x25, 0xad, 0xa6, 0x68,
0xa3, 0xc0, 0x25, 0xb6, 0x9a, 0x1c, 0x43, 0x07, 0x53, 0x6a, 0xe7, 0x82, 0x45, 0xa1, 0x4b, 0xb5,
0xd7, 0xf2, 0x9e, 0xc5, 0xef, 0x10, 0x4f, 0x11, 0xf9, 0xca, 0xfe, 0x01, 0xe3, 0x00, 0x7c, 0xc1,
0x4a, 0x06, 0x5f, 0x30, 0x12, 0x41, 0x87, 0x16, 0xe5, 0xa5, 0xff, 0x46, 0x36, 0xdb, 0x33, 0x38,
0xbb, 0xe1, 0x98, 0x09, 0xc9, 0xf7, 0xe0, 0x5f, 0x71, 0x09, 0x6a, 0x2e, 0x33, 0x38, 0xa9, 0xbb,
0xec, 0xb1, 0xf7, 0xa7, 0x07, 0xe4, 0xc7, 0x5d, 0x2b, 0x13, 0xf2, 0xeb, 0x13, 0xda, 0xae, 0x34,
0x68, 0x5a, 0x69, 0xd8, 0xbc, 0xd2, 0x56, 0x8d, 0xe8, 0xcb, 0x83, 0xc1, 0x03, 0x97, 0xec, 0xf7,
0x8f, 0x3c, 0x87, 0x43, 0xbb, 0x2b, 0x9a, 0xa7, 0xd4, 0xa4, 0x25, 0xcf, 0xa0, 0x12, 0xbf, 0xa3,
0x26, 0x25, 0x43, 0xe8, 0x19, 0xf1, 0x2c, 0xa9, 0xcd, 0x35, 0x77, 0x68, 0xff, 0x93, 0x5d, 0xa0,
0x91, 0xed, 0xba, 0x3f, 0xfb, 0x37, 0xb9, 0xb8, 0xda, 0x7c, 0xff, 0x45, 0xdb, 0xdd, 0x2e, 0xbf,
0x03, 0x00, 0x00, 0xff, 0xff, 0x88, 0x09, 0x02, 0x5a, 0x20, 0x03, 0x00, 0x00,
var file_command_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_command_proto_goTypes = []interface{}{
(*RequestAddressForTransaction)(nil), // 0: protobuf.RequestAddressForTransaction
(*AcceptRequestAddressForTransaction)(nil), // 1: protobuf.AcceptRequestAddressForTransaction
(*DeclineRequestAddressForTransaction)(nil), // 2: protobuf.DeclineRequestAddressForTransaction
(*DeclineRequestTransaction)(nil), // 3: protobuf.DeclineRequestTransaction
(*RequestTransaction)(nil), // 4: protobuf.RequestTransaction
(*SendTransaction)(nil), // 5: protobuf.SendTransaction
}
var file_command_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_command_proto_init() }
func file_command_proto_init() {
if File_command_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_command_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestAddressForTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_command_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AcceptRequestAddressForTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_command_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeclineRequestAddressForTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_command_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeclineRequestTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_command_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_command_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SendTransaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_command_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_command_proto_goTypes,
DependencyIndexes: file_command_proto_depIdxs,
MessageInfos: file_command_proto_msgTypes,
}.Build()
File_command_proto = out.File
file_command_proto_rawDesc = nil
file_command_proto_goTypes = nil
file_command_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -134,7 +134,7 @@ message CommunityRequestToJoin {
repeated RevealedAccount revealed_accounts = 6;
}
message CommunityEditRevealedAccounts {
message CommunityEditSharedAddresses {
uint64 clock = 1;
bytes community_id = 2;
repeated RevealedAccount revealed_accounts = 3;

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: community_privileged_user_sync_message.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CommunityPrivilegedUserSyncMessage_EventType int32
@ -29,135 +29,248 @@ const (
CommunityPrivilegedUserSyncMessage_ADD_COMMUNITY_TOKENS CommunityPrivilegedUserSyncMessage_EventType = 3
)
var CommunityPrivilegedUserSyncMessage_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN",
2: "CONTROL_NODE_REJECT_REQUEST_TO_JOIN",
3: "ADD_COMMUNITY_TOKENS",
}
// Enum value maps for CommunityPrivilegedUserSyncMessage_EventType.
var (
CommunityPrivilegedUserSyncMessage_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN",
2: "CONTROL_NODE_REJECT_REQUEST_TO_JOIN",
3: "ADD_COMMUNITY_TOKENS",
}
CommunityPrivilegedUserSyncMessage_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN": 1,
"CONTROL_NODE_REJECT_REQUEST_TO_JOIN": 2,
"ADD_COMMUNITY_TOKENS": 3,
}
)
var CommunityPrivilegedUserSyncMessage_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CONTROL_NODE_ACCEPT_REQUEST_TO_JOIN": 1,
"CONTROL_NODE_REJECT_REQUEST_TO_JOIN": 2,
"ADD_COMMUNITY_TOKENS": 3,
func (x CommunityPrivilegedUserSyncMessage_EventType) Enum() *CommunityPrivilegedUserSyncMessage_EventType {
p := new(CommunityPrivilegedUserSyncMessage_EventType)
*p = x
return p
}
func (x CommunityPrivilegedUserSyncMessage_EventType) String() string {
return proto.EnumName(CommunityPrivilegedUserSyncMessage_EventType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommunityPrivilegedUserSyncMessage_EventType) Descriptor() protoreflect.EnumDescriptor {
return file_community_privileged_user_sync_message_proto_enumTypes[0].Descriptor()
}
func (CommunityPrivilegedUserSyncMessage_EventType) Type() protoreflect.EnumType {
return &file_community_privileged_user_sync_message_proto_enumTypes[0]
}
func (x CommunityPrivilegedUserSyncMessage_EventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommunityPrivilegedUserSyncMessage_EventType.Descriptor instead.
func (CommunityPrivilegedUserSyncMessage_EventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_158595055b4cfee2, []int{0, 0}
return file_community_privileged_user_sync_message_proto_rawDescGZIP(), []int{0, 0}
}
type CommunityPrivilegedUserSyncMessage struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Type CommunityPrivilegedUserSyncMessage_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=protobuf.CommunityPrivilegedUserSyncMessage_EventType" json:"type,omitempty"`
CommunityId []byte `protobuf:"bytes,3,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
RequestToJoin map[string]*CommunityRequestToJoin `protobuf:"bytes,4,rep,name=request_to_join,json=requestToJoin,proto3" json:"request_to_join,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
CommunityTokens []*CommunityToken `protobuf:"bytes,5,rep,name=community_tokens,json=communityTokens,proto3" json:"community_tokens,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Type CommunityPrivilegedUserSyncMessage_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=protobuf.CommunityPrivilegedUserSyncMessage_EventType" json:"type,omitempty"`
CommunityId []byte `protobuf:"bytes,3,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
RequestToJoin map[string]*CommunityRequestToJoin `protobuf:"bytes,4,rep,name=request_to_join,json=requestToJoin,proto3" json:"request_to_join,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
CommunityTokens []*CommunityToken `protobuf:"bytes,5,rep,name=community_tokens,json=communityTokens,proto3" json:"community_tokens,omitempty"`
}
func (m *CommunityPrivilegedUserSyncMessage) Reset() { *m = CommunityPrivilegedUserSyncMessage{} }
func (m *CommunityPrivilegedUserSyncMessage) String() string { return proto.CompactTextString(m) }
func (*CommunityPrivilegedUserSyncMessage) ProtoMessage() {}
func (x *CommunityPrivilegedUserSyncMessage) Reset() {
*x = CommunityPrivilegedUserSyncMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_community_privileged_user_sync_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CommunityPrivilegedUserSyncMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommunityPrivilegedUserSyncMessage) ProtoMessage() {}
func (x *CommunityPrivilegedUserSyncMessage) ProtoReflect() protoreflect.Message {
mi := &file_community_privileged_user_sync_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CommunityPrivilegedUserSyncMessage.ProtoReflect.Descriptor instead.
func (*CommunityPrivilegedUserSyncMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_158595055b4cfee2, []int{0}
return file_community_privileged_user_sync_message_proto_rawDescGZIP(), []int{0}
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Unmarshal(m, b)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Marshal(b, m, deterministic)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Merge(m, src)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_Size() int {
return xxx_messageInfo_CommunityPrivilegedUserSyncMessage.Size(m)
}
func (m *CommunityPrivilegedUserSyncMessage) XXX_DiscardUnknown() {
xxx_messageInfo_CommunityPrivilegedUserSyncMessage.DiscardUnknown(m)
}
var xxx_messageInfo_CommunityPrivilegedUserSyncMessage proto.InternalMessageInfo
func (m *CommunityPrivilegedUserSyncMessage) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *CommunityPrivilegedUserSyncMessage) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *CommunityPrivilegedUserSyncMessage) GetType() CommunityPrivilegedUserSyncMessage_EventType {
if m != nil {
return m.Type
func (x *CommunityPrivilegedUserSyncMessage) GetType() CommunityPrivilegedUserSyncMessage_EventType {
if x != nil {
return x.Type
}
return CommunityPrivilegedUserSyncMessage_UNKNOWN
}
func (m *CommunityPrivilegedUserSyncMessage) GetCommunityId() []byte {
if m != nil {
return m.CommunityId
func (x *CommunityPrivilegedUserSyncMessage) GetCommunityId() []byte {
if x != nil {
return x.CommunityId
}
return nil
}
func (m *CommunityPrivilegedUserSyncMessage) GetRequestToJoin() map[string]*CommunityRequestToJoin {
if m != nil {
return m.RequestToJoin
func (x *CommunityPrivilegedUserSyncMessage) GetRequestToJoin() map[string]*CommunityRequestToJoin {
if x != nil {
return x.RequestToJoin
}
return nil
}
func (m *CommunityPrivilegedUserSyncMessage) GetCommunityTokens() []*CommunityToken {
if m != nil {
return m.CommunityTokens
func (x *CommunityPrivilegedUserSyncMessage) GetCommunityTokens() []*CommunityToken {
if x != nil {
return x.CommunityTokens
}
return nil
}
func init() {
proto.RegisterEnum("protobuf.CommunityPrivilegedUserSyncMessage_EventType", CommunityPrivilegedUserSyncMessage_EventType_name, CommunityPrivilegedUserSyncMessage_EventType_value)
proto.RegisterType((*CommunityPrivilegedUserSyncMessage)(nil), "protobuf.CommunityPrivilegedUserSyncMessage")
proto.RegisterMapType((map[string]*CommunityRequestToJoin)(nil), "protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry")
var File_community_privileged_user_sync_message_proto protoreflect.FileDescriptor
var file_community_privileged_user_sync_message_proto_rawDesc = []byte{
0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x69, 0x76,
0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x79, 0x6e, 0x63,
0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e,
0x69, 0x74, 0x69, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x6f, 0x6d,
0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xc2, 0x04, 0x0a, 0x22, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79,
0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x79,
0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f,
0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x4a, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69,
0x74, 0x79, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72,
0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63,
0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, 0x67,
0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6a, 0x6f, 0x69,
0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x50, 0x72, 0x69, 0x76,
0x69, 0x6c, 0x65, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a,
0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x43, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x75,
0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6d,
0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x1a, 0x62, 0x0a, 0x12,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x6b, 0x65, 0x79, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43,
0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54,
0x6f, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x84, 0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b,
0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x27, 0x0a, 0x23, 0x43,
0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x45,
0x50, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f,
0x49, 0x4e, 0x10, 0x01, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x4f, 0x4c, 0x5f,
0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55,
0x45, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x18, 0x0a,
0x14, 0x41, 0x44, 0x44, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x54,
0x4f, 0x4b, 0x45, 0x4e, 0x53, 0x10, 0x03, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("community_privileged_user_sync_message.proto", fileDescriptor_158595055b4cfee2)
var (
file_community_privileged_user_sync_message_proto_rawDescOnce sync.Once
file_community_privileged_user_sync_message_proto_rawDescData = file_community_privileged_user_sync_message_proto_rawDesc
)
func file_community_privileged_user_sync_message_proto_rawDescGZIP() []byte {
file_community_privileged_user_sync_message_proto_rawDescOnce.Do(func() {
file_community_privileged_user_sync_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_community_privileged_user_sync_message_proto_rawDescData)
})
return file_community_privileged_user_sync_message_proto_rawDescData
}
var fileDescriptor_158595055b4cfee2 = []byte{
// 403 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0x49, 0x93, 0x02, 0x73, 0x36, 0x16, 0xac, 0x21, 0x45, 0x3d, 0x85, 0x72, 0x20, 0x07,
0x14, 0xa4, 0x22, 0x4d, 0x08, 0x0e, 0x68, 0xa4, 0x3e, 0x34, 0xa3, 0xf6, 0x70, 0x1d, 0x21, 0xb8,
0x58, 0x6b, 0x6a, 0xaa, 0xd0, 0xd6, 0x0e, 0xb1, 0x53, 0x29, 0x77, 0x3e, 0x19, 0x9f, 0x0c, 0x2d,
0x51, 0x3a, 0x46, 0x2b, 0xa1, 0x9d, 0xfc, 0xfe, 0x79, 0xfc, 0xfc, 0x5e, 0x3d, 0xe0, 0x55, 0xa6,
0x36, 0x9b, 0x4a, 0xe6, 0xa6, 0xe6, 0x45, 0x99, 0x6f, 0xf3, 0xb5, 0x58, 0x8a, 0x05, 0xaf, 0xb4,
0x28, 0xb9, 0xae, 0x65, 0xc6, 0x37, 0x42, 0xeb, 0xeb, 0xa5, 0x88, 0x8a, 0x52, 0x19, 0x05, 0x1f,
0x37, 0xcf, 0xbc, 0xfa, 0x3e, 0x78, 0xda, 0xfd, 0xcb, 0x85, 0x6e, 0x97, 0x83, 0x67, 0xb7, 0x56,
0x46, 0xad, 0x84, 0x6c, 0xc7, 0xc3, 0xdf, 0x0e, 0x18, 0xc6, 0xdd, 0xe6, 0x6a, 0xc7, 0x48, 0xb5,
0x28, 0x67, 0xb5, 0xcc, 0xa6, 0x2d, 0x00, 0x9e, 0x81, 0x7e, 0xb6, 0x56, 0xd9, 0xca, 0xb7, 0x02,
0x2b, 0x74, 0x68, 0xdb, 0xc0, 0x04, 0x38, 0xa6, 0x2e, 0x84, 0xdf, 0x0b, 0xac, 0xf0, 0xc9, 0xe8,
0x3c, 0xea, 0xf8, 0xd1, 0xff, 0x1d, 0x23, 0xb4, 0x15, 0xd2, 0xb0, 0xba, 0x10, 0xb4, 0xf1, 0x80,
0xcf, 0xc1, 0xf1, 0xed, 0x85, 0xf9, 0xc2, 0xb7, 0x03, 0x2b, 0x3c, 0xa6, 0xee, 0x6e, 0x36, 0x59,
0xc0, 0x25, 0x38, 0x2d, 0xc5, 0xcf, 0x4a, 0x68, 0xc3, 0x8d, 0xe2, 0x3f, 0x54, 0x2e, 0x7d, 0x27,
0xb0, 0x43, 0x77, 0xf4, 0xe1, 0x5e, 0x64, 0xda, 0x7a, 0x30, 0x95, 0xa8, 0x5c, 0x22, 0x69, 0xca,
0x9a, 0x9e, 0x94, 0x7f, 0xcf, 0x60, 0x0c, 0xbc, 0x7f, 0xd2, 0xd2, 0x7e, 0xbf, 0x21, 0xf9, 0x07,
0x48, 0xec, 0x46, 0x40, 0x4f, 0xb3, 0x3b, 0xbd, 0x1e, 0xcc, 0x01, 0xdc, 0x27, 0x41, 0x0f, 0xd8,
0x2b, 0x51, 0x37, 0x31, 0x1e, 0xd1, 0x9b, 0x12, 0x9e, 0x83, 0xfe, 0xf6, 0x7a, 0x5d, 0xb5, 0x29,
0xba, 0xa3, 0xe0, 0x00, 0xe1, 0x8e, 0x0f, 0x6d, 0xe5, 0xef, 0x7a, 0x6f, 0xad, 0xe1, 0x2f, 0x0b,
0x1c, 0xed, 0x82, 0x84, 0x2e, 0x78, 0x94, 0xe2, 0x4b, 0x4c, 0xbe, 0x60, 0xef, 0x01, 0x7c, 0x09,
0x5e, 0xc4, 0x04, 0x33, 0x4a, 0x3e, 0x71, 0x4c, 0xc6, 0x88, 0x5f, 0xc4, 0x31, 0xba, 0x62, 0x9c,
0xa2, 0xcf, 0x29, 0x9a, 0x31, 0xce, 0x08, 0x4f, 0xc8, 0x04, 0x7b, 0xd6, 0x9e, 0x90, 0xa2, 0x04,
0xc5, 0xfb, 0xc2, 0x1e, 0xf4, 0xc1, 0xd9, 0xc5, 0x78, 0xcc, 0x63, 0x32, 0x9d, 0xa6, 0x78, 0xc2,
0xbe, 0x72, 0x46, 0x2e, 0x11, 0x9e, 0x79, 0xf6, 0xc7, 0x93, 0x6f, 0x6e, 0xf4, 0xfa, 0x7d, 0x77,
0xf7, 0xfc, 0x61, 0x53, 0xbd, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x76, 0x02, 0x4a, 0xb3, 0xbe,
0x02, 0x00, 0x00,
var file_community_privileged_user_sync_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_community_privileged_user_sync_message_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_community_privileged_user_sync_message_proto_goTypes = []interface{}{
(CommunityPrivilegedUserSyncMessage_EventType)(0), // 0: protobuf.CommunityPrivilegedUserSyncMessage.EventType
(*CommunityPrivilegedUserSyncMessage)(nil), // 1: protobuf.CommunityPrivilegedUserSyncMessage
nil, // 2: protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry
(*CommunityToken)(nil), // 3: protobuf.CommunityToken
(*CommunityRequestToJoin)(nil), // 4: protobuf.CommunityRequestToJoin
}
var file_community_privileged_user_sync_message_proto_depIdxs = []int32{
0, // 0: protobuf.CommunityPrivilegedUserSyncMessage.type:type_name -> protobuf.CommunityPrivilegedUserSyncMessage.EventType
2, // 1: protobuf.CommunityPrivilegedUserSyncMessage.request_to_join:type_name -> protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry
3, // 2: protobuf.CommunityPrivilegedUserSyncMessage.community_tokens:type_name -> protobuf.CommunityToken
4, // 3: protobuf.CommunityPrivilegedUserSyncMessage.RequestToJoinEntry.value:type_name -> protobuf.CommunityRequestToJoin
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_community_privileged_user_sync_message_proto_init() }
func file_community_privileged_user_sync_message_proto_init() {
if File_community_privileged_user_sync_message_proto != nil {
return
}
file_communities_proto_init()
file_community_token_proto_init()
if !protoimpl.UnsafeEnabled {
file_community_privileged_user_sync_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CommunityPrivilegedUserSyncMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_community_privileged_user_sync_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_community_privileged_user_sync_message_proto_goTypes,
DependencyIndexes: file_community_privileged_user_sync_message_proto_depIdxs,
EnumInfos: file_community_privileged_user_sync_message_proto_enumTypes,
MessageInfos: file_community_privileged_user_sync_message_proto_msgTypes,
}.Build()
File_community_privileged_user_sync_message_proto = out.File
file_community_privileged_user_sync_message_proto_rawDesc = nil
file_community_privileged_user_sync_message_proto_goTypes = nil
file_community_privileged_user_sync_message_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: community_token.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CommunityToken_DeployState int32
@ -29,26 +29,47 @@ const (
CommunityToken_DEPLOYED CommunityToken_DeployState = 3
)
var CommunityToken_DeployState_name = map[int32]string{
0: "UNKNOWN",
1: "FAILED",
2: "IN_PROGRESS",
3: "DEPLOYED",
}
// Enum value maps for CommunityToken_DeployState.
var (
CommunityToken_DeployState_name = map[int32]string{
0: "UNKNOWN",
1: "FAILED",
2: "IN_PROGRESS",
3: "DEPLOYED",
}
CommunityToken_DeployState_value = map[string]int32{
"UNKNOWN": 0,
"FAILED": 1,
"IN_PROGRESS": 2,
"DEPLOYED": 3,
}
)
var CommunityToken_DeployState_value = map[string]int32{
"UNKNOWN": 0,
"FAILED": 1,
"IN_PROGRESS": 2,
"DEPLOYED": 3,
func (x CommunityToken_DeployState) Enum() *CommunityToken_DeployState {
p := new(CommunityToken_DeployState)
*p = x
return p
}
func (x CommunityToken_DeployState) String() string {
return proto.EnumName(CommunityToken_DeployState_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommunityToken_DeployState) Descriptor() protoreflect.EnumDescriptor {
return file_community_token_proto_enumTypes[0].Descriptor()
}
func (CommunityToken_DeployState) Type() protoreflect.EnumType {
return &file_community_token_proto_enumTypes[0]
}
func (x CommunityToken_DeployState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommunityToken_DeployState.Descriptor instead.
func (CommunityToken_DeployState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e2582028caf1a04a, []int{0, 0}
return file_community_token_proto_rawDescGZIP(), []int{0, 0}
}
type CommunityToken_PrivilegesLevel int32
@ -59,227 +80,341 @@ const (
CommunityToken_COMMUNITY_LEVEL CommunityToken_PrivilegesLevel = 2
)
var CommunityToken_PrivilegesLevel_name = map[int32]string{
0: "OWNER_LEVEL",
1: "MASTER_LEVEL",
2: "COMMUNITY_LEVEL",
}
// Enum value maps for CommunityToken_PrivilegesLevel.
var (
CommunityToken_PrivilegesLevel_name = map[int32]string{
0: "OWNER_LEVEL",
1: "MASTER_LEVEL",
2: "COMMUNITY_LEVEL",
}
CommunityToken_PrivilegesLevel_value = map[string]int32{
"OWNER_LEVEL": 0,
"MASTER_LEVEL": 1,
"COMMUNITY_LEVEL": 2,
}
)
var CommunityToken_PrivilegesLevel_value = map[string]int32{
"OWNER_LEVEL": 0,
"MASTER_LEVEL": 1,
"COMMUNITY_LEVEL": 2,
func (x CommunityToken_PrivilegesLevel) Enum() *CommunityToken_PrivilegesLevel {
p := new(CommunityToken_PrivilegesLevel)
*p = x
return p
}
func (x CommunityToken_PrivilegesLevel) String() string {
return proto.EnumName(CommunityToken_PrivilegesLevel_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommunityToken_PrivilegesLevel) Descriptor() protoreflect.EnumDescriptor {
return file_community_token_proto_enumTypes[1].Descriptor()
}
func (CommunityToken_PrivilegesLevel) Type() protoreflect.EnumType {
return &file_community_token_proto_enumTypes[1]
}
func (x CommunityToken_PrivilegesLevel) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommunityToken_PrivilegesLevel.Descriptor instead.
func (CommunityToken_PrivilegesLevel) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e2582028caf1a04a, []int{0, 1}
return file_community_token_proto_rawDescGZIP(), []int{0, 1}
}
type CommunityToken struct {
TokenType CommunityTokenType `protobuf:"varint,1,opt,name=token_type,json=tokenType,proto3,enum=protobuf.CommunityTokenType" json:"token_type,omitempty"`
CommunityId string `protobuf:"bytes,2,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
Supply string `protobuf:"bytes,7,opt,name=supply,proto3" json:"supply,omitempty"`
InfiniteSupply bool `protobuf:"varint,8,opt,name=infinite_supply,json=infiniteSupply,proto3" json:"infinite_supply,omitempty"`
Transferable bool `protobuf:"varint,9,opt,name=transferable,proto3" json:"transferable,omitempty"`
RemoteSelfDestruct bool `protobuf:"varint,10,opt,name=remote_self_destruct,json=remoteSelfDestruct,proto3" json:"remote_self_destruct,omitempty"`
ChainId int32 `protobuf:"varint,11,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
DeployState CommunityToken_DeployState `protobuf:"varint,12,opt,name=deploy_state,json=deployState,proto3,enum=protobuf.CommunityToken_DeployState" json:"deploy_state,omitempty"`
Base64Image string `protobuf:"bytes,13,opt,name=base64_image,json=base64Image,proto3" json:"base64_image,omitempty"`
Decimals int32 `protobuf:"varint,14,opt,name=decimals,proto3" json:"decimals,omitempty"`
Deployer string `protobuf:"bytes,15,opt,name=deployer,proto3" json:"deployer,omitempty"`
PrivilegesLevel CommunityToken_PrivilegesLevel `protobuf:"varint,16,opt,name=privileges_level,json=privilegesLevel,proto3,enum=protobuf.CommunityToken_PrivilegesLevel" json:"privileges_level,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TokenType CommunityTokenType `protobuf:"varint,1,opt,name=token_type,json=tokenType,proto3,enum=protobuf.CommunityTokenType" json:"token_type,omitempty"`
CommunityId string `protobuf:"bytes,2,opt,name=community_id,json=communityId,proto3" json:"community_id,omitempty"`
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Symbol string `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"`
Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
Supply string `protobuf:"bytes,7,opt,name=supply,proto3" json:"supply,omitempty"`
InfiniteSupply bool `protobuf:"varint,8,opt,name=infinite_supply,json=infiniteSupply,proto3" json:"infinite_supply,omitempty"`
Transferable bool `protobuf:"varint,9,opt,name=transferable,proto3" json:"transferable,omitempty"`
RemoteSelfDestruct bool `protobuf:"varint,10,opt,name=remote_self_destruct,json=remoteSelfDestruct,proto3" json:"remote_self_destruct,omitempty"`
ChainId int32 `protobuf:"varint,11,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
DeployState CommunityToken_DeployState `protobuf:"varint,12,opt,name=deploy_state,json=deployState,proto3,enum=protobuf.CommunityToken_DeployState" json:"deploy_state,omitempty"`
Base64Image string `protobuf:"bytes,13,opt,name=base64_image,json=base64Image,proto3" json:"base64_image,omitempty"`
Decimals int32 `protobuf:"varint,14,opt,name=decimals,proto3" json:"decimals,omitempty"`
Deployer string `protobuf:"bytes,15,opt,name=deployer,proto3" json:"deployer,omitempty"`
PrivilegesLevel CommunityToken_PrivilegesLevel `protobuf:"varint,16,opt,name=privileges_level,json=privilegesLevel,proto3,enum=protobuf.CommunityToken_PrivilegesLevel" json:"privileges_level,omitempty"`
}
func (m *CommunityToken) Reset() { *m = CommunityToken{} }
func (m *CommunityToken) String() string { return proto.CompactTextString(m) }
func (*CommunityToken) ProtoMessage() {}
func (x *CommunityToken) Reset() {
*x = CommunityToken{}
if protoimpl.UnsafeEnabled {
mi := &file_community_token_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CommunityToken) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CommunityToken) ProtoMessage() {}
func (x *CommunityToken) ProtoReflect() protoreflect.Message {
mi := &file_community_token_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CommunityToken.ProtoReflect.Descriptor instead.
func (*CommunityToken) Descriptor() ([]byte, []int) {
return fileDescriptor_e2582028caf1a04a, []int{0}
return file_community_token_proto_rawDescGZIP(), []int{0}
}
func (m *CommunityToken) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommunityToken.Unmarshal(m, b)
}
func (m *CommunityToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommunityToken.Marshal(b, m, deterministic)
}
func (m *CommunityToken) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommunityToken.Merge(m, src)
}
func (m *CommunityToken) XXX_Size() int {
return xxx_messageInfo_CommunityToken.Size(m)
}
func (m *CommunityToken) XXX_DiscardUnknown() {
xxx_messageInfo_CommunityToken.DiscardUnknown(m)
}
var xxx_messageInfo_CommunityToken proto.InternalMessageInfo
func (m *CommunityToken) GetTokenType() CommunityTokenType {
if m != nil {
return m.TokenType
func (x *CommunityToken) GetTokenType() CommunityTokenType {
if x != nil {
return x.TokenType
}
return CommunityTokenType_UNKNOWN_TOKEN_TYPE
}
func (m *CommunityToken) GetCommunityId() string {
if m != nil {
return m.CommunityId
func (x *CommunityToken) GetCommunityId() string {
if x != nil {
return x.CommunityId
}
return ""
}
func (m *CommunityToken) GetAddress() string {
if m != nil {
return m.Address
func (x *CommunityToken) GetAddress() string {
if x != nil {
return x.Address
}
return ""
}
func (m *CommunityToken) GetName() string {
if m != nil {
return m.Name
func (x *CommunityToken) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (m *CommunityToken) GetSymbol() string {
if m != nil {
return m.Symbol
func (x *CommunityToken) GetSymbol() string {
if x != nil {
return x.Symbol
}
return ""
}
func (m *CommunityToken) GetDescription() string {
if m != nil {
return m.Description
func (x *CommunityToken) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *CommunityToken) GetSupply() string {
if m != nil {
return m.Supply
func (x *CommunityToken) GetSupply() string {
if x != nil {
return x.Supply
}
return ""
}
func (m *CommunityToken) GetInfiniteSupply() bool {
if m != nil {
return m.InfiniteSupply
func (x *CommunityToken) GetInfiniteSupply() bool {
if x != nil {
return x.InfiniteSupply
}
return false
}
func (m *CommunityToken) GetTransferable() bool {
if m != nil {
return m.Transferable
func (x *CommunityToken) GetTransferable() bool {
if x != nil {
return x.Transferable
}
return false
}
func (m *CommunityToken) GetRemoteSelfDestruct() bool {
if m != nil {
return m.RemoteSelfDestruct
func (x *CommunityToken) GetRemoteSelfDestruct() bool {
if x != nil {
return x.RemoteSelfDestruct
}
return false
}
func (m *CommunityToken) GetChainId() int32 {
if m != nil {
return m.ChainId
func (x *CommunityToken) GetChainId() int32 {
if x != nil {
return x.ChainId
}
return 0
}
func (m *CommunityToken) GetDeployState() CommunityToken_DeployState {
if m != nil {
return m.DeployState
func (x *CommunityToken) GetDeployState() CommunityToken_DeployState {
if x != nil {
return x.DeployState
}
return CommunityToken_UNKNOWN
}
func (m *CommunityToken) GetBase64Image() string {
if m != nil {
return m.Base64Image
func (x *CommunityToken) GetBase64Image() string {
if x != nil {
return x.Base64Image
}
return ""
}
func (m *CommunityToken) GetDecimals() int32 {
if m != nil {
return m.Decimals
func (x *CommunityToken) GetDecimals() int32 {
if x != nil {
return x.Decimals
}
return 0
}
func (m *CommunityToken) GetDeployer() string {
if m != nil {
return m.Deployer
func (x *CommunityToken) GetDeployer() string {
if x != nil {
return x.Deployer
}
return ""
}
func (m *CommunityToken) GetPrivilegesLevel() CommunityToken_PrivilegesLevel {
if m != nil {
return m.PrivilegesLevel
func (x *CommunityToken) GetPrivilegesLevel() CommunityToken_PrivilegesLevel {
if x != nil {
return x.PrivilegesLevel
}
return CommunityToken_OWNER_LEVEL
}
func init() {
proto.RegisterEnum("protobuf.CommunityToken_DeployState", CommunityToken_DeployState_name, CommunityToken_DeployState_value)
proto.RegisterEnum("protobuf.CommunityToken_PrivilegesLevel", CommunityToken_PrivilegesLevel_name, CommunityToken_PrivilegesLevel_value)
proto.RegisterType((*CommunityToken)(nil), "protobuf.CommunityToken")
var File_community_token_proto protoreflect.FileDescriptor
var file_community_token_proto_rawDesc = []byte{
0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x1a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95,
0x06, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x3b, 0x0a, 0x0a, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x54,
0x79, 0x70, 0x65, 0x52, 0x09, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21,
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x49,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x70,
0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x70, 0x70, 0x6c,
0x79, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x75,
0x70, 0x70, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x66, 0x69,
0x6e, 0x69, 0x74, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6c, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72,
0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x30,
0x0a, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65,
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x72, 0x65,
0x6d, 0x6f, 0x74, 0x65, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x0c, 0x64,
0x65, 0x70, 0x6c, 0x6f, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d,
0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6c,
0x6f, 0x79, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53,
0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x36, 0x34, 0x5f, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x62, 0x61, 0x73, 0x65,
0x36, 0x34, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d,
0x61, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d,
0x61, 0x6c, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x18,
0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x65, 0x72, 0x12,
0x53, 0x0a, 0x10, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x5f, 0x6c, 0x65,
0x76, 0x65, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x4c, 0x65,
0x76, 0x65, 0x6c, 0x52, 0x0f, 0x70, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x4c,
0x65, 0x76, 0x65, 0x6c, 0x22, 0x45, 0x0a, 0x0b, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74,
0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b,
0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x0c, 0x0a,
0x08, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x03, 0x22, 0x49, 0x0a, 0x0f, 0x50,
0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x0f,
0x0a, 0x0b, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10, 0x00, 0x12,
0x10, 0x0a, 0x0c, 0x4d, 0x41, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x10,
0x01, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x4c,
0x45, 0x56, 0x45, 0x4c, 0x10, 0x02, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("community_token.proto", fileDescriptor_e2582028caf1a04a)
var (
file_community_token_proto_rawDescOnce sync.Once
file_community_token_proto_rawDescData = file_community_token_proto_rawDesc
)
func file_community_token_proto_rawDescGZIP() []byte {
file_community_token_proto_rawDescOnce.Do(func() {
file_community_token_proto_rawDescData = protoimpl.X.CompressGZIP(file_community_token_proto_rawDescData)
})
return file_community_token_proto_rawDescData
}
var fileDescriptor_e2582028caf1a04a = []byte{
// 509 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4f, 0x6f, 0x9b, 0x40,
0x10, 0xc5, 0x83, 0x93, 0xd8, 0x78, 0x20, 0x06, 0x4d, 0xff, 0x68, 0x1b, 0xf5, 0xe0, 0x5a, 0x95,
0xea, 0x93, 0x5b, 0xb5, 0x55, 0x2f, 0x39, 0xa5, 0x31, 0x8d, 0x50, 0x6d, 0x6c, 0x81, 0xd3, 0x28,
0xbd, 0x20, 0x6c, 0xc6, 0xe9, 0xaa, 0xfc, 0x13, 0xac, 0x23, 0xf1, 0x41, 0xfa, 0x7d, 0x2b, 0x16,
0x43, 0xe3, 0x4a, 0x39, 0xb1, 0xef, 0x37, 0xef, 0xed, 0xce, 0x0c, 0xf0, 0x62, 0x93, 0xc6, 0xf1,
0x2e, 0xe1, 0xa2, 0xf4, 0x45, 0xfa, 0x9b, 0x92, 0x49, 0x96, 0xa7, 0x22, 0x45, 0x55, 0x7e, 0xd6,
0xbb, 0xed, 0xb9, 0x46, 0xc9, 0x2e, 0x2e, 0x6a, 0x3c, 0xfa, 0xd3, 0x85, 0xc1, 0x55, 0x13, 0x58,
0x55, 0x7e, 0xbc, 0x00, 0x90, 0x41, 0x5f, 0x94, 0x19, 0x31, 0x65, 0xa8, 0x8c, 0x07, 0x1f, 0x5f,
0x4f, 0x9a, 0xf8, 0xe4, 0xd0, 0xbd, 0x2a, 0x33, 0x72, 0xfb, 0xa2, 0x39, 0xe2, 0x1b, 0xd0, 0xff,
0xbd, 0xcf, 0x43, 0xd6, 0x19, 0x2a, 0xe3, 0xbe, 0xab, 0xb5, 0xcc, 0x0e, 0x91, 0x41, 0x2f, 0x08,
0xc3, 0x9c, 0x8a, 0x82, 0x1d, 0xcb, 0x6a, 0x23, 0x11, 0xe1, 0x24, 0x09, 0x62, 0x62, 0x27, 0x12,
0xcb, 0x33, 0xbe, 0x84, 0x6e, 0x51, 0xc6, 0xeb, 0x34, 0x62, 0xa7, 0x92, 0xee, 0x15, 0x0e, 0x41,
0x0b, 0xa9, 0xd8, 0xe4, 0x3c, 0x13, 0x3c, 0x4d, 0x58, 0xb7, 0x7e, 0xe7, 0x11, 0x92, 0xc9, 0x5d,
0x96, 0x45, 0x25, 0xeb, 0xed, 0x93, 0x52, 0xe1, 0x3b, 0x30, 0x78, 0xb2, 0xe5, 0x09, 0x17, 0xe4,
0xef, 0x0d, 0xea, 0x50, 0x19, 0xab, 0xee, 0xa0, 0xc1, 0x5e, 0x6d, 0x1c, 0x81, 0x2e, 0xf2, 0x20,
0x29, 0xb6, 0x94, 0x07, 0xeb, 0x88, 0x58, 0x5f, 0xba, 0x0e, 0x18, 0x7e, 0x80, 0xe7, 0x39, 0xc5,
0x69, 0x75, 0x15, 0x45, 0x5b, 0x3f, 0xa4, 0x42, 0xe4, 0xbb, 0x8d, 0x60, 0x20, 0xbd, 0x58, 0xd7,
0x3c, 0x8a, 0xb6, 0xd3, 0x7d, 0x05, 0x5f, 0x81, 0xba, 0xf9, 0x15, 0xf0, 0xa4, 0xda, 0x8e, 0x36,
0x54, 0xc6, 0xa7, 0x6e, 0x4f, 0x6a, 0x3b, 0xc4, 0x6b, 0xd0, 0x43, 0xca, 0xa2, 0xb4, 0xf4, 0x0b,
0x11, 0x08, 0x62, 0xba, 0xdc, 0xfd, 0xdb, 0xa7, 0x76, 0x3f, 0x99, 0x4a, 0xb3, 0x57, 0x79, 0xab,
0xd1, 0x5b, 0x51, 0xfd, 0x85, 0x75, 0x50, 0xd0, 0x97, 0xcf, 0x3e, 0x8f, 0x83, 0x7b, 0x62, 0x67,
0xf5, 0x76, 0x6a, 0x66, 0x57, 0x08, 0xcf, 0x41, 0x0d, 0x69, 0xc3, 0xe3, 0x20, 0x2a, 0xd8, 0x40,
0xb6, 0xd1, 0xea, 0xba, 0x56, 0xdd, 0x46, 0x39, 0x33, 0x64, 0xb4, 0xd5, 0xe8, 0x81, 0x99, 0xe5,
0xfc, 0x81, 0x47, 0x74, 0x4f, 0x85, 0x1f, 0xd1, 0x03, 0x45, 0xcc, 0x94, 0x7d, 0x8e, 0x9f, 0xec,
0x73, 0xd9, 0x06, 0x66, 0x95, 0xdf, 0x35, 0xb2, 0x43, 0x30, 0xb2, 0x40, 0x7b, 0x34, 0x0b, 0x6a,
0xd0, 0xbb, 0x71, 0xbe, 0x3b, 0x8b, 0x5b, 0xc7, 0x3c, 0x42, 0x80, 0xee, 0xb7, 0x4b, 0x7b, 0x66,
0x4d, 0x4d, 0x05, 0x0d, 0xd0, 0x6c, 0xc7, 0x5f, 0xba, 0x8b, 0x6b, 0xd7, 0xf2, 0x3c, 0xb3, 0x83,
0x3a, 0xa8, 0x53, 0x6b, 0x39, 0x5b, 0xdc, 0x59, 0x53, 0xf3, 0x78, 0x64, 0x83, 0xf1, 0xdf, 0x53,
0x55, 0x62, 0x71, 0xeb, 0x58, 0xae, 0x3f, 0xb3, 0x7e, 0x58, 0x33, 0xf3, 0x08, 0x4d, 0xd0, 0xe7,
0x97, 0xde, 0xaa, 0x25, 0x0a, 0x3e, 0x03, 0xe3, 0x6a, 0x31, 0x9f, 0xdf, 0x38, 0xf6, 0xea, 0x6e,
0x0f, 0x3b, 0x5f, 0xcf, 0x7e, 0x6a, 0x93, 0xf7, 0x17, 0xcd, 0x40, 0xeb, 0xae, 0x3c, 0x7d, 0xfa,
0x1b, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x8d, 0x9f, 0x59, 0x5d, 0x03, 0x00, 0x00,
var file_community_token_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_community_token_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_community_token_proto_goTypes = []interface{}{
(CommunityToken_DeployState)(0), // 0: protobuf.CommunityToken.DeployState
(CommunityToken_PrivilegesLevel)(0), // 1: protobuf.CommunityToken.PrivilegesLevel
(*CommunityToken)(nil), // 2: protobuf.CommunityToken
(CommunityTokenType)(0), // 3: protobuf.CommunityTokenType
}
var file_community_token_proto_depIdxs = []int32{
3, // 0: protobuf.CommunityToken.token_type:type_name -> protobuf.CommunityTokenType
0, // 1: protobuf.CommunityToken.deploy_state:type_name -> protobuf.CommunityToken.DeployState
1, // 2: protobuf.CommunityToken.privileges_level:type_name -> protobuf.CommunityToken.PrivilegesLevel
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_community_token_proto_init() }
func file_community_token_proto_init() {
if File_community_token_proto != nil {
return
}
file_enums_proto_init()
if !protoimpl.UnsafeEnabled {
file_community_token_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CommunityToken); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_community_token_proto_rawDesc,
NumEnums: 2,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_community_token_proto_goTypes,
DependencyIndexes: file_community_token_proto_depIdxs,
EnumInfos: file_community_token_proto_enumTypes,
MessageInfos: file_community_token_proto_msgTypes,
}.Build()
File_community_token_proto = out.File
file_community_token_proto_rawDesc = nil
file_community_token_proto_goTypes = nil
file_community_token_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,89 +1,101 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: contact.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ContactRequestPropagatedState struct {
LocalClock uint64 `protobuf:"varint,1,opt,name=local_clock,json=localClock,proto3" json:"local_clock,omitempty"`
LocalState uint64 `protobuf:"varint,2,opt,name=local_state,json=localState,proto3" json:"local_state,omitempty"`
RemoteClock uint64 `protobuf:"varint,3,opt,name=remote_clock,json=remoteClock,proto3" json:"remote_clock,omitempty"`
RemoteState uint64 `protobuf:"varint,4,opt,name=remote_state,json=remoteState,proto3" json:"remote_state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LocalClock uint64 `protobuf:"varint,1,opt,name=local_clock,json=localClock,proto3" json:"local_clock,omitempty"`
LocalState uint64 `protobuf:"varint,2,opt,name=local_state,json=localState,proto3" json:"local_state,omitempty"`
RemoteClock uint64 `protobuf:"varint,3,opt,name=remote_clock,json=remoteClock,proto3" json:"remote_clock,omitempty"`
RemoteState uint64 `protobuf:"varint,4,opt,name=remote_state,json=remoteState,proto3" json:"remote_state,omitempty"`
}
func (m *ContactRequestPropagatedState) Reset() { *m = ContactRequestPropagatedState{} }
func (m *ContactRequestPropagatedState) String() string { return proto.CompactTextString(m) }
func (*ContactRequestPropagatedState) ProtoMessage() {}
func (x *ContactRequestPropagatedState) Reset() {
*x = ContactRequestPropagatedState{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContactRequestPropagatedState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContactRequestPropagatedState) ProtoMessage() {}
func (x *ContactRequestPropagatedState) ProtoReflect() protoreflect.Message {
mi := &file_contact_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContactRequestPropagatedState.ProtoReflect.Descriptor instead.
func (*ContactRequestPropagatedState) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{0}
return file_contact_proto_rawDescGZIP(), []int{0}
}
func (m *ContactRequestPropagatedState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactRequestPropagatedState.Unmarshal(m, b)
}
func (m *ContactRequestPropagatedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactRequestPropagatedState.Marshal(b, m, deterministic)
}
func (m *ContactRequestPropagatedState) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactRequestPropagatedState.Merge(m, src)
}
func (m *ContactRequestPropagatedState) XXX_Size() int {
return xxx_messageInfo_ContactRequestPropagatedState.Size(m)
}
func (m *ContactRequestPropagatedState) XXX_DiscardUnknown() {
xxx_messageInfo_ContactRequestPropagatedState.DiscardUnknown(m)
}
var xxx_messageInfo_ContactRequestPropagatedState proto.InternalMessageInfo
func (m *ContactRequestPropagatedState) GetLocalClock() uint64 {
if m != nil {
return m.LocalClock
func (x *ContactRequestPropagatedState) GetLocalClock() uint64 {
if x != nil {
return x.LocalClock
}
return 0
}
func (m *ContactRequestPropagatedState) GetLocalState() uint64 {
if m != nil {
return m.LocalState
func (x *ContactRequestPropagatedState) GetLocalState() uint64 {
if x != nil {
return x.LocalState
}
return 0
}
func (m *ContactRequestPropagatedState) GetRemoteClock() uint64 {
if m != nil {
return m.RemoteClock
func (x *ContactRequestPropagatedState) GetRemoteClock() uint64 {
if x != nil {
return x.RemoteClock
}
return 0
}
func (m *ContactRequestPropagatedState) GetRemoteState() uint64 {
if m != nil {
return m.RemoteState
func (x *ContactRequestPropagatedState) GetRemoteState() uint64 {
if x != nil {
return x.RemoteState
}
return 0
}
type ContactUpdate struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
EnsName string `protobuf:"bytes,2,opt,name=ens_name,json=ensName,proto3" json:"ens_name,omitempty"`
ProfileImage string `protobuf:"bytes,3,opt,name=profile_image,json=profileImage,proto3" json:"profile_image,omitempty"`
@ -91,212 +103,346 @@ type ContactUpdate struct {
ContactRequestClock uint64 `protobuf:"varint,5,opt,name=contact_request_clock,json=contactRequestClock,proto3" json:"contact_request_clock,omitempty"`
ContactRequestPropagatedState *ContactRequestPropagatedState `protobuf:"bytes,6,opt,name=contact_request_propagated_state,json=contactRequestPropagatedState,proto3" json:"contact_request_propagated_state,omitempty"`
PublicKey string `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ContactUpdate) Reset() { *m = ContactUpdate{} }
func (m *ContactUpdate) String() string { return proto.CompactTextString(m) }
func (*ContactUpdate) ProtoMessage() {}
func (x *ContactUpdate) Reset() {
*x = ContactUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ContactUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ContactUpdate) ProtoMessage() {}
func (x *ContactUpdate) ProtoReflect() protoreflect.Message {
mi := &file_contact_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ContactUpdate.ProtoReflect.Descriptor instead.
func (*ContactUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{1}
return file_contact_proto_rawDescGZIP(), []int{1}
}
func (m *ContactUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContactUpdate.Unmarshal(m, b)
}
func (m *ContactUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContactUpdate.Marshal(b, m, deterministic)
}
func (m *ContactUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContactUpdate.Merge(m, src)
}
func (m *ContactUpdate) XXX_Size() int {
return xxx_messageInfo_ContactUpdate.Size(m)
}
func (m *ContactUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_ContactUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_ContactUpdate proto.InternalMessageInfo
func (m *ContactUpdate) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *ContactUpdate) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *ContactUpdate) GetEnsName() string {
if m != nil {
return m.EnsName
func (x *ContactUpdate) GetEnsName() string {
if x != nil {
return x.EnsName
}
return ""
}
func (m *ContactUpdate) GetProfileImage() string {
if m != nil {
return m.ProfileImage
func (x *ContactUpdate) GetProfileImage() string {
if x != nil {
return x.ProfileImage
}
return ""
}
func (m *ContactUpdate) GetDisplayName() string {
if m != nil {
return m.DisplayName
func (x *ContactUpdate) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *ContactUpdate) GetContactRequestClock() uint64 {
if m != nil {
return m.ContactRequestClock
func (x *ContactUpdate) GetContactRequestClock() uint64 {
if x != nil {
return x.ContactRequestClock
}
return 0
}
func (m *ContactUpdate) GetContactRequestPropagatedState() *ContactRequestPropagatedState {
if m != nil {
return m.ContactRequestPropagatedState
func (x *ContactUpdate) GetContactRequestPropagatedState() *ContactRequestPropagatedState {
if x != nil {
return x.ContactRequestPropagatedState
}
return nil
}
func (m *ContactUpdate) GetPublicKey() string {
if m != nil {
return m.PublicKey
func (x *ContactUpdate) GetPublicKey() string {
if x != nil {
return x.PublicKey
}
return ""
}
type AcceptContactRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
}
func (m *AcceptContactRequest) Reset() { *m = AcceptContactRequest{} }
func (m *AcceptContactRequest) String() string { return proto.CompactTextString(m) }
func (*AcceptContactRequest) ProtoMessage() {}
func (x *AcceptContactRequest) Reset() {
*x = AcceptContactRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AcceptContactRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AcceptContactRequest) ProtoMessage() {}
func (x *AcceptContactRequest) ProtoReflect() protoreflect.Message {
mi := &file_contact_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AcceptContactRequest.ProtoReflect.Descriptor instead.
func (*AcceptContactRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{2}
return file_contact_proto_rawDescGZIP(), []int{2}
}
func (m *AcceptContactRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AcceptContactRequest.Unmarshal(m, b)
}
func (m *AcceptContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AcceptContactRequest.Marshal(b, m, deterministic)
}
func (m *AcceptContactRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AcceptContactRequest.Merge(m, src)
}
func (m *AcceptContactRequest) XXX_Size() int {
return xxx_messageInfo_AcceptContactRequest.Size(m)
}
func (m *AcceptContactRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AcceptContactRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AcceptContactRequest proto.InternalMessageInfo
func (m *AcceptContactRequest) GetId() string {
if m != nil {
return m.Id
func (x *AcceptContactRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *AcceptContactRequest) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *AcceptContactRequest) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
type RetractContactRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
}
func (m *RetractContactRequest) Reset() { *m = RetractContactRequest{} }
func (m *RetractContactRequest) String() string { return proto.CompactTextString(m) }
func (*RetractContactRequest) ProtoMessage() {}
func (x *RetractContactRequest) Reset() {
*x = RetractContactRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RetractContactRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RetractContactRequest) ProtoMessage() {}
func (x *RetractContactRequest) ProtoReflect() protoreflect.Message {
mi := &file_contact_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RetractContactRequest.ProtoReflect.Descriptor instead.
func (*RetractContactRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_a5036fff2565fb15, []int{3}
return file_contact_proto_rawDescGZIP(), []int{3}
}
func (m *RetractContactRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetractContactRequest.Unmarshal(m, b)
}
func (m *RetractContactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetractContactRequest.Marshal(b, m, deterministic)
}
func (m *RetractContactRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetractContactRequest.Merge(m, src)
}
func (m *RetractContactRequest) XXX_Size() int {
return xxx_messageInfo_RetractContactRequest.Size(m)
}
func (m *RetractContactRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RetractContactRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RetractContactRequest proto.InternalMessageInfo
func (m *RetractContactRequest) GetId() string {
if m != nil {
return m.Id
func (x *RetractContactRequest) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *RetractContactRequest) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *RetractContactRequest) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func init() {
proto.RegisterType((*ContactRequestPropagatedState)(nil), "protobuf.ContactRequestPropagatedState")
proto.RegisterType((*ContactUpdate)(nil), "protobuf.ContactUpdate")
proto.RegisterType((*AcceptContactRequest)(nil), "protobuf.AcceptContactRequest")
proto.RegisterType((*RetractContactRequest)(nil), "protobuf.RetractContactRequest")
var File_contact_proto protoreflect.FileDescriptor
var file_contact_proto_rawDesc = []byte{
0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xa7, 0x01, 0x0a, 0x1d, 0x43, 0x6f,
0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70,
0x61, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c,
0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x0b,
0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x04, 0x52, 0x0a, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a,
0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x03, 0x20,
0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, 0x6f, 0x63, 0x6b,
0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x53, 0x74,
0x61, 0x74, 0x65, 0x22, 0xcd, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x65,
0x6e, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65,
0x6e, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64,
0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x32,
0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x63,
0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6c, 0x6f,
0x63, 0x6b, 0x12, 0x70, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x5f, 0x72, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x64,
0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x61, 0x67, 0x61, 0x74, 0x65, 0x64, 0x53,
0x74, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b,
0x65, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x4b, 0x65, 0x79, 0x22, 0x3c, 0x0a, 0x14, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x6f, 0x6e,
0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63,
0x6b, 0x22, 0x3d, 0x0a, 0x15, 0x52, 0x65, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x74,
0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c,
0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b,
0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("contact.proto", fileDescriptor_a5036fff2565fb15)
var (
file_contact_proto_rawDescOnce sync.Once
file_contact_proto_rawDescData = file_contact_proto_rawDesc
)
func file_contact_proto_rawDescGZIP() []byte {
file_contact_proto_rawDescOnce.Do(func() {
file_contact_proto_rawDescData = protoimpl.X.CompressGZIP(file_contact_proto_rawDescData)
})
return file_contact_proto_rawDescData
}
var fileDescriptor_a5036fff2565fb15 = []byte{
// 348 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0x3f, 0x4f, 0xfb, 0x30,
0x14, 0x54, 0xf2, 0xeb, 0xbf, 0xbc, 0x34, 0xbf, 0x21, 0xb4, 0x52, 0x19, 0x2a, 0x4a, 0x18, 0xe8,
0x14, 0xa4, 0x32, 0x02, 0x03, 0x74, 0x42, 0x48, 0x08, 0x19, 0xb1, 0xb0, 0x44, 0xae, 0xf3, 0x5a,
0x45, 0x4d, 0x62, 0xe3, 0xb8, 0x43, 0x3f, 0x11, 0x9f, 0x86, 0xef, 0x84, 0x62, 0xbb, 0x34, 0x65,
0xe8, 0xc0, 0x94, 0xf8, 0x7c, 0xef, 0x7c, 0x77, 0x0f, 0x02, 0xc6, 0x4b, 0x45, 0x99, 0x8a, 0x85,
0xe4, 0x8a, 0x87, 0x3d, 0xfd, 0x59, 0x6c, 0x96, 0xd1, 0xa7, 0x03, 0xe3, 0xb9, 0xb9, 0x23, 0xf8,
0xb1, 0xc1, 0x4a, 0xbd, 0x48, 0x2e, 0xe8, 0x8a, 0x2a, 0x4c, 0x5f, 0x15, 0x55, 0x18, 0x9e, 0x81,
0x9f, 0x73, 0x46, 0xf3, 0x84, 0xe5, 0x9c, 0xad, 0x47, 0xce, 0xc4, 0x99, 0xb6, 0x08, 0x68, 0x68,
0x5e, 0x23, 0x7b, 0x42, 0x55, 0xf3, 0x47, 0x6e, 0x83, 0x60, 0x14, 0xce, 0xa1, 0x2f, 0xb1, 0xe0,
0x0a, 0xad, 0xc4, 0x3f, 0xcd, 0xf0, 0x0d, 0x66, 0x34, 0xf6, 0x14, 0x23, 0xd2, 0x6a, 0x52, 0xb4,
0x4a, 0xf4, 0xe5, 0x42, 0x60, 0x9d, 0xbe, 0x89, 0xb4, 0xd6, 0x1d, 0x40, 0xbb, 0xe9, 0xc9, 0x1c,
0xc2, 0x53, 0xe8, 0x61, 0x59, 0x25, 0x25, 0x2d, 0x8c, 0x17, 0x8f, 0x74, 0xb1, 0xac, 0x9e, 0x69,
0x81, 0xe1, 0x05, 0x04, 0x42, 0xf2, 0x65, 0x96, 0x63, 0x92, 0x15, 0x74, 0x85, 0xda, 0x89, 0x47,
0xfa, 0x16, 0x7c, 0xac, 0xb1, 0xda, 0x4a, 0x9a, 0x55, 0x22, 0xa7, 0x5b, 0xa3, 0xd1, 0xd2, 0x1c,
0xdf, 0x62, 0x5a, 0x67, 0x06, 0x43, 0xdb, 0x67, 0x22, 0x4d, 0x69, 0x36, 0x59, 0x5b, 0x1b, 0x39,
0x61, 0x07, 0x85, 0x9a, 0x84, 0x02, 0x26, 0xbf, 0x67, 0xc4, 0x4f, 0xd3, 0x36, 0x75, 0x67, 0xe2,
0x4c, 0xfd, 0xd9, 0x65, 0xbc, 0xdb, 0x4e, 0x7c, 0x74, 0x33, 0x64, 0xcc, 0x8e, 0x2e, 0x6e, 0x0c,
0x20, 0x36, 0x8b, 0x3c, 0x63, 0xc9, 0x1a, 0xb7, 0xa3, 0xae, 0x8e, 0xe1, 0x19, 0xe4, 0x09, 0xb7,
0xd1, 0x2d, 0x0c, 0xee, 0x19, 0x43, 0xa1, 0x0e, 0x1f, 0x09, 0xff, 0x83, 0x9b, 0xa5, 0xba, 0x52,
0x8f, 0xb8, 0x59, 0xba, 0x6f, 0xd9, 0x6d, 0xb4, 0x1c, 0xdd, 0xc1, 0x90, 0xa0, 0x92, 0x94, 0xfd,
0x69, 0xfc, 0x21, 0x78, 0xf7, 0xe3, 0xab, 0x9b, 0x5d, 0xce, 0x45, 0x47, 0xff, 0x5d, 0x7f, 0x07,
0x00, 0x00, 0xff, 0xff, 0xec, 0x6f, 0x01, 0xce, 0xa7, 0x02, 0x00, 0x00,
var file_contact_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_contact_proto_goTypes = []interface{}{
(*ContactRequestPropagatedState)(nil), // 0: protobuf.ContactRequestPropagatedState
(*ContactUpdate)(nil), // 1: protobuf.ContactUpdate
(*AcceptContactRequest)(nil), // 2: protobuf.AcceptContactRequest
(*RetractContactRequest)(nil), // 3: protobuf.RetractContactRequest
}
var file_contact_proto_depIdxs = []int32{
0, // 0: protobuf.ContactUpdate.contact_request_propagated_state:type_name -> protobuf.ContactRequestPropagatedState
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_contact_proto_init() }
func file_contact_proto_init() {
if File_contact_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_contact_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContactRequestPropagatedState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ContactUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AcceptContactRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RetractContactRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_contact_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_contact_proto_goTypes,
DependencyIndexes: file_contact_proto_depIdxs,
MessageInfos: file_contact_proto_msgTypes,
}.Build()
File_contact_proto = out.File
file_contact_proto_rawDesc = nil
file_contact_proto_goTypes = nil
file_contact_proto_depIdxs = nil
}

View File

@ -1,245 +1,380 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: contact_verification.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RequestContactVerification struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Challenge string `protobuf:"bytes,3,opt,name=challenge,proto3" json:"challenge,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Challenge string `protobuf:"bytes,3,opt,name=challenge,proto3" json:"challenge,omitempty"`
}
func (m *RequestContactVerification) Reset() { *m = RequestContactVerification{} }
func (m *RequestContactVerification) String() string { return proto.CompactTextString(m) }
func (*RequestContactVerification) ProtoMessage() {}
func (x *RequestContactVerification) Reset() {
*x = RequestContactVerification{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_verification_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestContactVerification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestContactVerification) ProtoMessage() {}
func (x *RequestContactVerification) ProtoReflect() protoreflect.Message {
mi := &file_contact_verification_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestContactVerification.ProtoReflect.Descriptor instead.
func (*RequestContactVerification) Descriptor() ([]byte, []int) {
return fileDescriptor_d6997df64de39454, []int{0}
return file_contact_verification_proto_rawDescGZIP(), []int{0}
}
func (m *RequestContactVerification) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestContactVerification.Unmarshal(m, b)
}
func (m *RequestContactVerification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RequestContactVerification.Marshal(b, m, deterministic)
}
func (m *RequestContactVerification) XXX_Merge(src proto.Message) {
xxx_messageInfo_RequestContactVerification.Merge(m, src)
}
func (m *RequestContactVerification) XXX_Size() int {
return xxx_messageInfo_RequestContactVerification.Size(m)
}
func (m *RequestContactVerification) XXX_DiscardUnknown() {
xxx_messageInfo_RequestContactVerification.DiscardUnknown(m)
}
var xxx_messageInfo_RequestContactVerification proto.InternalMessageInfo
func (m *RequestContactVerification) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *RequestContactVerification) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *RequestContactVerification) GetChallenge() string {
if m != nil {
return m.Challenge
func (x *RequestContactVerification) GetChallenge() string {
if x != nil {
return x.Challenge
}
return ""
}
type AcceptContactVerification struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Response string `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Response string `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
}
func (m *AcceptContactVerification) Reset() { *m = AcceptContactVerification{} }
func (m *AcceptContactVerification) String() string { return proto.CompactTextString(m) }
func (*AcceptContactVerification) ProtoMessage() {}
func (x *AcceptContactVerification) Reset() {
*x = AcceptContactVerification{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_verification_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AcceptContactVerification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AcceptContactVerification) ProtoMessage() {}
func (x *AcceptContactVerification) ProtoReflect() protoreflect.Message {
mi := &file_contact_verification_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AcceptContactVerification.ProtoReflect.Descriptor instead.
func (*AcceptContactVerification) Descriptor() ([]byte, []int) {
return fileDescriptor_d6997df64de39454, []int{1}
return file_contact_verification_proto_rawDescGZIP(), []int{1}
}
func (m *AcceptContactVerification) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AcceptContactVerification.Unmarshal(m, b)
}
func (m *AcceptContactVerification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AcceptContactVerification.Marshal(b, m, deterministic)
}
func (m *AcceptContactVerification) XXX_Merge(src proto.Message) {
xxx_messageInfo_AcceptContactVerification.Merge(m, src)
}
func (m *AcceptContactVerification) XXX_Size() int {
return xxx_messageInfo_AcceptContactVerification.Size(m)
}
func (m *AcceptContactVerification) XXX_DiscardUnknown() {
xxx_messageInfo_AcceptContactVerification.DiscardUnknown(m)
}
var xxx_messageInfo_AcceptContactVerification proto.InternalMessageInfo
func (m *AcceptContactVerification) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *AcceptContactVerification) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *AcceptContactVerification) GetId() string {
if m != nil {
return m.Id
func (x *AcceptContactVerification) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (m *AcceptContactVerification) GetResponse() string {
if m != nil {
return m.Response
func (x *AcceptContactVerification) GetResponse() string {
if x != nil {
return x.Response
}
return ""
}
type DeclineContactVerification struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}
func (m *DeclineContactVerification) Reset() { *m = DeclineContactVerification{} }
func (m *DeclineContactVerification) String() string { return proto.CompactTextString(m) }
func (*DeclineContactVerification) ProtoMessage() {}
func (x *DeclineContactVerification) Reset() {
*x = DeclineContactVerification{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_verification_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeclineContactVerification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeclineContactVerification) ProtoMessage() {}
func (x *DeclineContactVerification) ProtoReflect() protoreflect.Message {
mi := &file_contact_verification_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeclineContactVerification.ProtoReflect.Descriptor instead.
func (*DeclineContactVerification) Descriptor() ([]byte, []int) {
return fileDescriptor_d6997df64de39454, []int{2}
return file_contact_verification_proto_rawDescGZIP(), []int{2}
}
func (m *DeclineContactVerification) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeclineContactVerification.Unmarshal(m, b)
}
func (m *DeclineContactVerification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeclineContactVerification.Marshal(b, m, deterministic)
}
func (m *DeclineContactVerification) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeclineContactVerification.Merge(m, src)
}
func (m *DeclineContactVerification) XXX_Size() int {
return xxx_messageInfo_DeclineContactVerification.Size(m)
}
func (m *DeclineContactVerification) XXX_DiscardUnknown() {
xxx_messageInfo_DeclineContactVerification.DiscardUnknown(m)
}
var xxx_messageInfo_DeclineContactVerification proto.InternalMessageInfo
func (m *DeclineContactVerification) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *DeclineContactVerification) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *DeclineContactVerification) GetId() string {
if m != nil {
return m.Id
func (x *DeclineContactVerification) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type CancelContactVerification struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
}
func (m *CancelContactVerification) Reset() { *m = CancelContactVerification{} }
func (m *CancelContactVerification) String() string { return proto.CompactTextString(m) }
func (*CancelContactVerification) ProtoMessage() {}
func (x *CancelContactVerification) Reset() {
*x = CancelContactVerification{}
if protoimpl.UnsafeEnabled {
mi := &file_contact_verification_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CancelContactVerification) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CancelContactVerification) ProtoMessage() {}
func (x *CancelContactVerification) ProtoReflect() protoreflect.Message {
mi := &file_contact_verification_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CancelContactVerification.ProtoReflect.Descriptor instead.
func (*CancelContactVerification) Descriptor() ([]byte, []int) {
return fileDescriptor_d6997df64de39454, []int{3}
return file_contact_verification_proto_rawDescGZIP(), []int{3}
}
func (m *CancelContactVerification) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CancelContactVerification.Unmarshal(m, b)
}
func (m *CancelContactVerification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CancelContactVerification.Marshal(b, m, deterministic)
}
func (m *CancelContactVerification) XXX_Merge(src proto.Message) {
xxx_messageInfo_CancelContactVerification.Merge(m, src)
}
func (m *CancelContactVerification) XXX_Size() int {
return xxx_messageInfo_CancelContactVerification.Size(m)
}
func (m *CancelContactVerification) XXX_DiscardUnknown() {
xxx_messageInfo_CancelContactVerification.DiscardUnknown(m)
}
var xxx_messageInfo_CancelContactVerification proto.InternalMessageInfo
func (m *CancelContactVerification) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *CancelContactVerification) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *CancelContactVerification) GetId() string {
if m != nil {
return m.Id
func (x *CancelContactVerification) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func init() {
proto.RegisterType((*RequestContactVerification)(nil), "protobuf.RequestContactVerification")
proto.RegisterType((*AcceptContactVerification)(nil), "protobuf.AcceptContactVerification")
proto.RegisterType((*DeclineContactVerification)(nil), "protobuf.DeclineContactVerification")
proto.RegisterType((*CancelContactVerification)(nil), "protobuf.CancelContactVerification")
var File_contact_verification_proto protoreflect.FileDescriptor
var file_contact_verification_proto_rawDesc = []byte{
0x0a, 0x1a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x50, 0x0a, 0x1a, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20,
0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68,
0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,
0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x22, 0x5d, 0x0a, 0x19, 0x41, 0x63, 0x63, 0x65,
0x70, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x1a, 0x44, 0x65, 0x63, 0x6c, 0x69,
0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x41, 0x0a, 0x19, 0x43,
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x56, 0x65, 0x72, 0x69,
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63,
0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x42, 0x0d,
0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("contact_verification.proto", fileDescriptor_d6997df64de39454)
var (
file_contact_verification_proto_rawDescOnce sync.Once
file_contact_verification_proto_rawDescData = file_contact_verification_proto_rawDesc
)
func file_contact_verification_proto_rawDescGZIP() []byte {
file_contact_verification_proto_rawDescOnce.Do(func() {
file_contact_verification_proto_rawDescData = protoimpl.X.CompressGZIP(file_contact_verification_proto_rawDescData)
})
return file_contact_verification_proto_rawDescData
}
var fileDescriptor_d6997df64de39454 = []byte{
// 194 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0xcf, 0x2b,
0x49, 0x4c, 0x2e, 0x89, 0x2f, 0x4b, 0x2d, 0xca, 0x4c, 0xcb, 0x4c, 0x4e, 0x2c, 0xc9, 0xcc, 0xcf,
0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53, 0x49, 0xa5, 0x69, 0x4a, 0x01, 0x5c,
0x52, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0xce, 0x10, 0xe5, 0x61, 0x48, 0xaa, 0x85, 0x44,
0xb8, 0x58, 0x93, 0x73, 0xf2, 0x93, 0xb3, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x82, 0x20, 0x1c,
0x21, 0x19, 0x2e, 0xce, 0xe4, 0x8c, 0xc4, 0x9c, 0x9c, 0xd4, 0xbc, 0xf4, 0x54, 0x09, 0x66, 0x05,
0x46, 0x0d, 0xce, 0x20, 0x84, 0x80, 0x52, 0x2c, 0x97, 0xa4, 0x63, 0x72, 0x72, 0x6a, 0x01, 0x09,
0x06, 0xf2, 0x71, 0x31, 0x65, 0xa6, 0x48, 0x30, 0x81, 0x4d, 0x62, 0xca, 0x4c, 0x11, 0x92, 0xe2,
0xe2, 0x28, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x86, 0x99, 0x0f, 0xe7, 0x2b, 0x39, 0x71, 0x49,
0xb9, 0xa4, 0x26, 0xe7, 0x64, 0xe6, 0xa5, 0x92, 0x6d, 0xbe, 0x92, 0x23, 0x97, 0xa4, 0x73, 0x62,
0x5e, 0x72, 0x6a, 0x0e, 0xd9, 0x46, 0x38, 0xf1, 0x46, 0x71, 0xeb, 0xe9, 0x5b, 0xc3, 0x82, 0x31,
0x89, 0x0d, 0xcc, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x2b, 0x89, 0x8f, 0x75, 0x01,
0x00, 0x00,
var file_contact_verification_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_contact_verification_proto_goTypes = []interface{}{
(*RequestContactVerification)(nil), // 0: protobuf.RequestContactVerification
(*AcceptContactVerification)(nil), // 1: protobuf.AcceptContactVerification
(*DeclineContactVerification)(nil), // 2: protobuf.DeclineContactVerification
(*CancelContactVerification)(nil), // 3: protobuf.CancelContactVerification
}
var file_contact_verification_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_contact_verification_proto_init() }
func file_contact_verification_proto_init() {
if File_contact_verification_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_contact_verification_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestContactVerification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_verification_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AcceptContactVerification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_verification_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeclineContactVerification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_contact_verification_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CancelContactVerification); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_contact_verification_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_contact_verification_proto_goTypes,
DependencyIndexes: file_contact_verification_proto_depIdxs,
MessageInfos: file_contact_verification_proto_msgTypes,
}.Build()
File_contact_verification_proto = out.File
file_contact_verification_proto_rawDesc = nil
file_contact_verification_proto_goTypes = nil
file_contact_verification_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: emoji_reaction.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type EmojiReaction_Type int32
@ -32,35 +32,60 @@ const (
EmojiReaction_ANGRY EmojiReaction_Type = 6
)
var EmojiReaction_Type_name = map[int32]string{
0: "UNKNOWN_EMOJI_REACTION_TYPE",
1: "LOVE",
2: "THUMBS_UP",
3: "THUMBS_DOWN",
4: "LAUGH",
5: "SAD",
6: "ANGRY",
}
// Enum value maps for EmojiReaction_Type.
var (
EmojiReaction_Type_name = map[int32]string{
0: "UNKNOWN_EMOJI_REACTION_TYPE",
1: "LOVE",
2: "THUMBS_UP",
3: "THUMBS_DOWN",
4: "LAUGH",
5: "SAD",
6: "ANGRY",
}
EmojiReaction_Type_value = map[string]int32{
"UNKNOWN_EMOJI_REACTION_TYPE": 0,
"LOVE": 1,
"THUMBS_UP": 2,
"THUMBS_DOWN": 3,
"LAUGH": 4,
"SAD": 5,
"ANGRY": 6,
}
)
var EmojiReaction_Type_value = map[string]int32{
"UNKNOWN_EMOJI_REACTION_TYPE": 0,
"LOVE": 1,
"THUMBS_UP": 2,
"THUMBS_DOWN": 3,
"LAUGH": 4,
"SAD": 5,
"ANGRY": 6,
func (x EmojiReaction_Type) Enum() *EmojiReaction_Type {
p := new(EmojiReaction_Type)
*p = x
return p
}
func (x EmojiReaction_Type) String() string {
return proto.EnumName(EmojiReaction_Type_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (EmojiReaction_Type) Descriptor() protoreflect.EnumDescriptor {
return file_emoji_reaction_proto_enumTypes[0].Descriptor()
}
func (EmojiReaction_Type) Type() protoreflect.EnumType {
return &file_emoji_reaction_proto_enumTypes[0]
}
func (x EmojiReaction_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use EmojiReaction_Type.Descriptor instead.
func (EmojiReaction_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_0a088c907bbc7ed6, []int{0, 0}
return file_emoji_reaction_proto_rawDescGZIP(), []int{0, 0}
}
type EmojiReaction struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// clock Lamport timestamp of the chat message
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// chat_id the ID of the chat the message belongs to, for query efficiency the chat_id is stored in the db even though the
@ -75,116 +100,189 @@ type EmojiReaction struct {
// whether this is a rectraction of a previously sent emoji
Retracted bool `protobuf:"varint,6,opt,name=retracted,proto3" json:"retracted,omitempty"`
// Grant for organisation chat messages
Grant []byte `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Grant []byte `protobuf:"bytes,7,opt,name=grant,proto3" json:"grant,omitempty"`
}
func (m *EmojiReaction) Reset() { *m = EmojiReaction{} }
func (m *EmojiReaction) String() string { return proto.CompactTextString(m) }
func (*EmojiReaction) ProtoMessage() {}
func (x *EmojiReaction) Reset() {
*x = EmojiReaction{}
if protoimpl.UnsafeEnabled {
mi := &file_emoji_reaction_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *EmojiReaction) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*EmojiReaction) ProtoMessage() {}
func (x *EmojiReaction) ProtoReflect() protoreflect.Message {
mi := &file_emoji_reaction_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use EmojiReaction.ProtoReflect.Descriptor instead.
func (*EmojiReaction) Descriptor() ([]byte, []int) {
return fileDescriptor_0a088c907bbc7ed6, []int{0}
return file_emoji_reaction_proto_rawDescGZIP(), []int{0}
}
func (m *EmojiReaction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EmojiReaction.Unmarshal(m, b)
}
func (m *EmojiReaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EmojiReaction.Marshal(b, m, deterministic)
}
func (m *EmojiReaction) XXX_Merge(src proto.Message) {
xxx_messageInfo_EmojiReaction.Merge(m, src)
}
func (m *EmojiReaction) XXX_Size() int {
return xxx_messageInfo_EmojiReaction.Size(m)
}
func (m *EmojiReaction) XXX_DiscardUnknown() {
xxx_messageInfo_EmojiReaction.DiscardUnknown(m)
}
var xxx_messageInfo_EmojiReaction proto.InternalMessageInfo
func (m *EmojiReaction) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *EmojiReaction) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *EmojiReaction) GetChatId() string {
if m != nil {
return m.ChatId
func (x *EmojiReaction) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
func (m *EmojiReaction) GetMessageId() string {
if m != nil {
return m.MessageId
func (x *EmojiReaction) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (m *EmojiReaction) GetMessageType() MessageType {
if m != nil {
return m.MessageType
func (x *EmojiReaction) GetMessageType() MessageType {
if x != nil {
return x.MessageType
}
return MessageType_UNKNOWN_MESSAGE_TYPE
}
func (m *EmojiReaction) GetType() EmojiReaction_Type {
if m != nil {
return m.Type
func (x *EmojiReaction) GetType() EmojiReaction_Type {
if x != nil {
return x.Type
}
return EmojiReaction_UNKNOWN_EMOJI_REACTION_TYPE
}
func (m *EmojiReaction) GetRetracted() bool {
if m != nil {
return m.Retracted
func (x *EmojiReaction) GetRetracted() bool {
if x != nil {
return x.Retracted
}
return false
}
func (m *EmojiReaction) GetGrant() []byte {
if m != nil {
return m.Grant
func (x *EmojiReaction) GetGrant() []byte {
if x != nil {
return x.Grant
}
return nil
}
func init() {
proto.RegisterEnum("protobuf.EmojiReaction_Type", EmojiReaction_Type_name, EmojiReaction_Type_value)
proto.RegisterType((*EmojiReaction)(nil), "protobuf.EmojiReaction")
var File_emoji_reaction_proto protoreflect.FileDescriptor
var file_emoji_reaction_proto_rawDesc = []byte{
0x0a, 0x14, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x1a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x02,
0x0a, 0x0d, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x1d,
0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x38, 0x0a,
0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x54,
0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x74,
0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x72, 0x65,
0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74,
0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x70, 0x0a,
0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x5f, 0x45, 0x4d, 0x4f, 0x4a, 0x49, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x56, 0x45, 0x10, 0x01,
0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x55, 0x50, 0x10, 0x02, 0x12,
0x0f, 0x0a, 0x0b, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x53, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03,
0x12, 0x09, 0x0a, 0x05, 0x4c, 0x41, 0x55, 0x47, 0x48, 0x10, 0x04, 0x12, 0x07, 0x0a, 0x03, 0x53,
0x41, 0x44, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4e, 0x47, 0x52, 0x59, 0x10, 0x06, 0x42,
0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("emoji_reaction.proto", fileDescriptor_0a088c907bbc7ed6)
var (
file_emoji_reaction_proto_rawDescOnce sync.Once
file_emoji_reaction_proto_rawDescData = file_emoji_reaction_proto_rawDesc
)
func file_emoji_reaction_proto_rawDescGZIP() []byte {
file_emoji_reaction_proto_rawDescOnce.Do(func() {
file_emoji_reaction_proto_rawDescData = protoimpl.X.CompressGZIP(file_emoji_reaction_proto_rawDescData)
})
return file_emoji_reaction_proto_rawDescData
}
var fileDescriptor_0a088c907bbc7ed6 = []byte{
// 330 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xcd, 0x6e, 0xaa, 0x40,
0x14, 0xc7, 0x2f, 0x0a, 0x28, 0x07, 0xbd, 0x77, 0x32, 0xf1, 0xa6, 0xa4, 0xb5, 0x29, 0x71, 0xc5,
0x8a, 0x36, 0xed, 0xa6, 0x49, 0x57, 0x58, 0x89, 0xd2, 0x2a, 0x98, 0x11, 0x6a, 0xec, 0x86, 0x20,
0x4c, 0xad, 0x6d, 0x11, 0x82, 0xe3, 0xc2, 0xa7, 0xee, 0x2b, 0x34, 0x0c, 0x1a, 0xd3, 0xd5, 0xcc,
0xef, 0xff, 0x91, 0x73, 0x0e, 0x74, 0x68, 0x9a, 0x7d, 0xac, 0xc3, 0x82, 0x46, 0x31, 0x5b, 0x67,
0x1b, 0x33, 0x2f, 0x32, 0x96, 0xe1, 0x26, 0x7f, 0x96, 0xbb, 0xb7, 0x73, 0x95, 0x6e, 0x76, 0xe9,
0xb6, 0x92, 0x7b, 0xdf, 0x35, 0x68, 0xdb, 0x65, 0x9e, 0x1c, 0xe2, 0xb8, 0x03, 0x52, 0xfc, 0x95,
0xc5, 0x9f, 0x9a, 0xa0, 0x0b, 0x86, 0x48, 0x2a, 0xc0, 0x67, 0xd0, 0x88, 0xdf, 0x23, 0x16, 0xae,
0x13, 0xad, 0xa6, 0x0b, 0x86, 0x42, 0xe4, 0x12, 0x9d, 0x04, 0x5f, 0x02, 0xa4, 0x74, 0xbb, 0x8d,
0x56, 0xb4, 0xf4, 0xea, 0xdc, 0x53, 0x0e, 0x8a, 0x93, 0xe0, 0x7b, 0x68, 0x1d, 0x6d, 0xb6, 0xcf,
0xa9, 0x26, 0xea, 0x82, 0xf1, 0xf7, 0xf6, 0xbf, 0x79, 0xdc, 0xc6, 0x9c, 0x54, 0xae, 0xbf, 0xcf,
0x29, 0x51, 0xd3, 0x13, 0xe0, 0x1b, 0x10, 0x79, 0x43, 0xe2, 0x8d, 0xee, 0xa9, 0xf1, 0x6b, 0x5d,
0x93, 0x17, 0x79, 0x12, 0x77, 0x41, 0x29, 0x28, 0x2b, 0xa2, 0x98, 0xd1, 0x44, 0x93, 0x75, 0xc1,
0x68, 0x92, 0x93, 0x50, 0xde, 0xb5, 0x2a, 0xa2, 0x0d, 0xd3, 0x1a, 0xba, 0x60, 0xb4, 0x48, 0x05,
0xbd, 0x1c, 0x44, 0x3e, 0xed, 0x0a, 0x2e, 0x02, 0xf7, 0xd9, 0xf5, 0xe6, 0x6e, 0x68, 0x4f, 0xbc,
0x27, 0x27, 0x24, 0xb6, 0xf5, 0xe8, 0x3b, 0x9e, 0x1b, 0xfa, 0x8b, 0xa9, 0x8d, 0xfe, 0xe0, 0x26,
0x88, 0x63, 0xef, 0xc5, 0x46, 0x02, 0x6e, 0x83, 0xe2, 0x8f, 0x82, 0x49, 0x7f, 0x16, 0x06, 0x53,
0x54, 0xc3, 0xff, 0x40, 0x3d, 0xe0, 0xc0, 0x9b, 0xbb, 0xa8, 0x8e, 0x15, 0x90, 0xc6, 0x56, 0x30,
0x1c, 0x21, 0x11, 0x37, 0xa0, 0x3e, 0xb3, 0x06, 0x48, 0x2a, 0x35, 0xcb, 0x1d, 0x92, 0x05, 0x92,
0xfb, 0xed, 0x57, 0xd5, 0xbc, 0x7e, 0x38, 0x5e, 0xb3, 0x94, 0xf9, 0xef, 0xee, 0x27, 0x00, 0x00,
0xff, 0xff, 0x7e, 0x57, 0x12, 0xd9, 0xb6, 0x01, 0x00, 0x00,
var file_emoji_reaction_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_emoji_reaction_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_emoji_reaction_proto_goTypes = []interface{}{
(EmojiReaction_Type)(0), // 0: protobuf.EmojiReaction.Type
(*EmojiReaction)(nil), // 1: protobuf.EmojiReaction
(MessageType)(0), // 2: protobuf.MessageType
}
var file_emoji_reaction_proto_depIdxs = []int32{
2, // 0: protobuf.EmojiReaction.message_type:type_name -> protobuf.MessageType
0, // 1: protobuf.EmojiReaction.type:type_name -> protobuf.EmojiReaction.Type
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_emoji_reaction_proto_init() }
func file_emoji_reaction_proto_init() {
if File_emoji_reaction_proto != nil {
return
}
file_enums_proto_init()
if !protoimpl.UnsafeEnabled {
file_emoji_reaction_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*EmojiReaction); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_emoji_reaction_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_emoji_reaction_proto_goTypes,
DependencyIndexes: file_emoji_reaction_proto_depIdxs,
EnumInfos: file_emoji_reaction_proto_enumTypes,
MessageInfos: file_emoji_reaction_proto_msgTypes,
}.Build()
File_emoji_reaction_proto = out.File
file_emoji_reaction_proto_rawDesc = nil
file_emoji_reaction_proto_goTypes = nil
file_emoji_reaction_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: enums.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MessageType int32
@ -34,32 +34,53 @@ const (
MessageType_SYSTEM_MESSAGE_GAP MessageType = 6
)
var MessageType_name = map[int32]string{
0: "UNKNOWN_MESSAGE_TYPE",
1: "ONE_TO_ONE",
2: "PUBLIC_GROUP",
3: "PRIVATE_GROUP",
4: "SYSTEM_MESSAGE_PRIVATE_GROUP",
5: "COMMUNITY_CHAT",
6: "SYSTEM_MESSAGE_GAP",
}
// Enum value maps for MessageType.
var (
MessageType_name = map[int32]string{
0: "UNKNOWN_MESSAGE_TYPE",
1: "ONE_TO_ONE",
2: "PUBLIC_GROUP",
3: "PRIVATE_GROUP",
4: "SYSTEM_MESSAGE_PRIVATE_GROUP",
5: "COMMUNITY_CHAT",
6: "SYSTEM_MESSAGE_GAP",
}
MessageType_value = map[string]int32{
"UNKNOWN_MESSAGE_TYPE": 0,
"ONE_TO_ONE": 1,
"PUBLIC_GROUP": 2,
"PRIVATE_GROUP": 3,
"SYSTEM_MESSAGE_PRIVATE_GROUP": 4,
"COMMUNITY_CHAT": 5,
"SYSTEM_MESSAGE_GAP": 6,
}
)
var MessageType_value = map[string]int32{
"UNKNOWN_MESSAGE_TYPE": 0,
"ONE_TO_ONE": 1,
"PUBLIC_GROUP": 2,
"PRIVATE_GROUP": 3,
"SYSTEM_MESSAGE_PRIVATE_GROUP": 4,
"COMMUNITY_CHAT": 5,
"SYSTEM_MESSAGE_GAP": 6,
func (x MessageType) Enum() *MessageType {
p := new(MessageType)
*p = x
return p
}
func (x MessageType) String() string {
return proto.EnumName(MessageType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MessageType) Descriptor() protoreflect.EnumDescriptor {
return file_enums_proto_enumTypes[0].Descriptor()
}
func (MessageType) Type() protoreflect.EnumType {
return &file_enums_proto_enumTypes[0]
}
func (x MessageType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MessageType.Descriptor instead.
func (MessageType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_888b6bd9597961ff, []int{0}
return file_enums_proto_rawDescGZIP(), []int{0}
}
type ImageType int32
@ -73,28 +94,49 @@ const (
ImageType_GIF ImageType = 4
)
var ImageType_name = map[int32]string{
0: "UNKNOWN_IMAGE_TYPE",
1: "PNG",
2: "JPEG",
3: "WEBP",
4: "GIF",
}
// Enum value maps for ImageType.
var (
ImageType_name = map[int32]string{
0: "UNKNOWN_IMAGE_TYPE",
1: "PNG",
2: "JPEG",
3: "WEBP",
4: "GIF",
}
ImageType_value = map[string]int32{
"UNKNOWN_IMAGE_TYPE": 0,
"PNG": 1,
"JPEG": 2,
"WEBP": 3,
"GIF": 4,
}
)
var ImageType_value = map[string]int32{
"UNKNOWN_IMAGE_TYPE": 0,
"PNG": 1,
"JPEG": 2,
"WEBP": 3,
"GIF": 4,
func (x ImageType) Enum() *ImageType {
p := new(ImageType)
*p = x
return p
}
func (x ImageType) String() string {
return proto.EnumName(ImageType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ImageType) Descriptor() protoreflect.EnumDescriptor {
return file_enums_proto_enumTypes[1].Descriptor()
}
func (ImageType) Type() protoreflect.EnumType {
return &file_enums_proto_enumTypes[1]
}
func (x ImageType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ImageType.Descriptor instead.
func (ImageType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_888b6bd9597961ff, []int{1}
return file_enums_proto_rawDescGZIP(), []int{1}
}
type CommunityTokenType int32
@ -106,56 +148,125 @@ const (
CommunityTokenType_ENS CommunityTokenType = 3
)
var CommunityTokenType_name = map[int32]string{
0: "UNKNOWN_TOKEN_TYPE",
1: "ERC20",
2: "ERC721",
3: "ENS",
}
// Enum value maps for CommunityTokenType.
var (
CommunityTokenType_name = map[int32]string{
0: "UNKNOWN_TOKEN_TYPE",
1: "ERC20",
2: "ERC721",
3: "ENS",
}
CommunityTokenType_value = map[string]int32{
"UNKNOWN_TOKEN_TYPE": 0,
"ERC20": 1,
"ERC721": 2,
"ENS": 3,
}
)
var CommunityTokenType_value = map[string]int32{
"UNKNOWN_TOKEN_TYPE": 0,
"ERC20": 1,
"ERC721": 2,
"ENS": 3,
func (x CommunityTokenType) Enum() *CommunityTokenType {
p := new(CommunityTokenType)
*p = x
return p
}
func (x CommunityTokenType) String() string {
return proto.EnumName(CommunityTokenType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (CommunityTokenType) Descriptor() protoreflect.EnumDescriptor {
return file_enums_proto_enumTypes[2].Descriptor()
}
func (CommunityTokenType) Type() protoreflect.EnumType {
return &file_enums_proto_enumTypes[2]
}
func (x CommunityTokenType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use CommunityTokenType.Descriptor instead.
func (CommunityTokenType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_888b6bd9597961ff, []int{2}
return file_enums_proto_rawDescGZIP(), []int{2}
}
func init() {
proto.RegisterEnum("protobuf.MessageType", MessageType_name, MessageType_value)
proto.RegisterEnum("protobuf.ImageType", ImageType_name, ImageType_value)
proto.RegisterEnum("protobuf.CommunityTokenType", CommunityTokenType_name, CommunityTokenType_value)
var File_enums_proto protoreflect.FileDescriptor
var file_enums_proto_rawDesc = []byte{
0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2a, 0xaa, 0x01, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10,
0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x4e, 0x45, 0x5f, 0x54, 0x4f, 0x5f, 0x4f, 0x4e, 0x45, 0x10,
0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x47, 0x52, 0x4f, 0x55,
0x50, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x5f, 0x47,
0x52, 0x4f, 0x55, 0x50, 0x10, 0x03, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d,
0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45,
0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4d, 0x4d,
0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12,
0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x47,
0x41, 0x50, 0x10, 0x06, 0x2a, 0x49, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70,
0x65, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x49, 0x4d, 0x41,
0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x4e, 0x47,
0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x50, 0x45, 0x47, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04,
0x57, 0x45, 0x42, 0x50, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x49, 0x46, 0x10, 0x04, 0x2a,
0x4c, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a,
0x05, 0x45, 0x52, 0x43, 0x32, 0x30, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x52, 0x43, 0x37,
0x32, 0x31, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x4e, 0x53, 0x10, 0x03, 0x42, 0x0d, 0x5a,
0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("enums.proto", fileDescriptor_888b6bd9597961ff)
var (
file_enums_proto_rawDescOnce sync.Once
file_enums_proto_rawDescData = file_enums_proto_rawDesc
)
func file_enums_proto_rawDescGZIP() []byte {
file_enums_proto_rawDescOnce.Do(func() {
file_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_enums_proto_rawDescData)
})
return file_enums_proto_rawDescData
}
var fileDescriptor_888b6bd9597961ff = []byte{
// 286 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x4d, 0x4f, 0xc2, 0x40,
0x10, 0x86, 0x2d, 0xe5, 0x73, 0x10, 0x32, 0x4e, 0x0c, 0xf1, 0xe0, 0xc1, 0x33, 0x07, 0x54, 0x3c,
0x78, 0xf0, 0x54, 0x9a, 0xb1, 0xae, 0xb0, 0x1f, 0x69, 0xb7, 0x12, 0xbc, 0x6c, 0x24, 0xa9, 0xc6,
0x98, 0x52, 0x22, 0x70, 0xe0, 0x2f, 0xf9, 0x2b, 0x0d, 0xc4, 0x1a, 0xe5, 0x34, 0x6f, 0x26, 0x33,
0x4f, 0x9e, 0xbc, 0xd0, 0xce, 0x16, 0x9b, 0x7c, 0x35, 0x58, 0x7e, 0x16, 0xeb, 0x82, 0x9a, 0xfb,
0x31, 0xdf, 0xbc, 0xf6, 0xbf, 0x3c, 0x68, 0xcb, 0x6c, 0xb5, 0x7a, 0x79, 0xcb, 0xec, 0x76, 0x99,
0xd1, 0x19, 0x9c, 0xa6, 0x6a, 0xac, 0xf4, 0x54, 0x39, 0xc9, 0x49, 0x12, 0x44, 0xec, 0xec, 0xcc,
0x30, 0x1e, 0x51, 0x17, 0x40, 0x2b, 0x76, 0x56, 0x3b, 0xad, 0x18, 0x3d, 0x42, 0x38, 0x36, 0xe9,
0x68, 0x22, 0x42, 0x17, 0xc5, 0x3a, 0x35, 0x58, 0xa1, 0x13, 0xe8, 0x98, 0x58, 0x3c, 0x05, 0x96,
0x7f, 0x56, 0x3e, 0x5d, 0xc0, 0x79, 0x32, 0x4b, 0x2c, 0xcb, 0x5f, 0xda, 0xff, 0x8b, 0x2a, 0x11,
0x74, 0x43, 0x2d, 0x65, 0xaa, 0x84, 0x9d, 0xb9, 0xf0, 0x21, 0xb0, 0x58, 0xa3, 0x1e, 0xd0, 0xc1,
0x57, 0x14, 0x18, 0xac, 0xf7, 0x05, 0xb4, 0x44, 0x5e, 0x9a, 0xf6, 0x80, 0x4a, 0x53, 0x21, 0xff,
0x78, 0x36, 0xc0, 0x37, 0x2a, 0x42, 0x8f, 0x9a, 0x50, 0x7d, 0x34, 0x1c, 0x61, 0x65, 0x97, 0xa6,
0x3c, 0xda, 0xf9, 0x34, 0xc0, 0x8f, 0xc4, 0x3d, 0x56, 0xfb, 0x13, 0xa0, 0xb0, 0xc8, 0xf3, 0xcd,
0xe2, 0x7d, 0xbd, 0xb5, 0xc5, 0x47, 0xb6, 0x38, 0x64, 0x5a, 0x3d, 0x66, 0x55, 0x32, 0x5b, 0x50,
0xe3, 0x38, 0x1c, 0x5e, 0xa1, 0x47, 0x00, 0x75, 0x8e, 0xc3, 0xdb, 0xe1, 0x35, 0x56, 0x76, 0x34,
0x56, 0x09, 0xfa, 0xa3, 0xce, 0x73, 0x7b, 0x70, 0x79, 0x57, 0x96, 0x3a, 0xaf, 0xef, 0xd3, 0xcd,
0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0xd8, 0x58, 0xde, 0x74, 0x01, 0x00, 0x00,
var file_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_enums_proto_goTypes = []interface{}{
(MessageType)(0), // 0: protobuf.MessageType
(ImageType)(0), // 1: protobuf.ImageType
(CommunityTokenType)(0), // 2: protobuf.CommunityTokenType
}
var file_enums_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_enums_proto_init() }
func file_enums_proto_init() {
if File_enums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_enums_proto_rawDesc,
NumEnums: 3,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_enums_proto_goTypes,
DependencyIndexes: file_enums_proto_depIdxs,
EnumInfos: file_enums_proto_enumTypes,
}.Build()
File_enums_proto = out.File
file_enums_proto_rawDesc = nil
file_enums_proto_goTypes = nil
file_enums_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: group_chat_invitation.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type GroupChatInvitation_State int32
@ -29,29 +29,54 @@ const (
GroupChatInvitation_APPROVED GroupChatInvitation_State = 3
)
var GroupChatInvitation_State_name = map[int32]string{
0: "UNKNOWN",
1: "REQUEST",
2: "REJECTED",
3: "APPROVED",
}
// Enum value maps for GroupChatInvitation_State.
var (
GroupChatInvitation_State_name = map[int32]string{
0: "UNKNOWN",
1: "REQUEST",
2: "REJECTED",
3: "APPROVED",
}
GroupChatInvitation_State_value = map[string]int32{
"UNKNOWN": 0,
"REQUEST": 1,
"REJECTED": 2,
"APPROVED": 3,
}
)
var GroupChatInvitation_State_value = map[string]int32{
"UNKNOWN": 0,
"REQUEST": 1,
"REJECTED": 2,
"APPROVED": 3,
func (x GroupChatInvitation_State) Enum() *GroupChatInvitation_State {
p := new(GroupChatInvitation_State)
*p = x
return p
}
func (x GroupChatInvitation_State) String() string {
return proto.EnumName(GroupChatInvitation_State_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (GroupChatInvitation_State) Descriptor() protoreflect.EnumDescriptor {
return file_group_chat_invitation_proto_enumTypes[0].Descriptor()
}
func (GroupChatInvitation_State) Type() protoreflect.EnumType {
return &file_group_chat_invitation_proto_enumTypes[0]
}
func (x GroupChatInvitation_State) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use GroupChatInvitation_State.Descriptor instead.
func (GroupChatInvitation_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_a6a73333de6a8ebe, []int{0, 0}
return file_group_chat_invitation_proto_rawDescGZIP(), []int{0, 0}
}
type GroupChatInvitation struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// clock Lamport timestamp of the chat message
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// chat_id the ID of the private group chat the message belongs to, for query efficiency the chat_id is stored in the db even though the
@ -59,90 +84,157 @@ type GroupChatInvitation struct {
ChatId string `protobuf:"bytes,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
IntroductionMessage string `protobuf:"bytes,3,opt,name=introduction_message,json=introductionMessage,proto3" json:"introduction_message,omitempty"`
// state of invitation
State GroupChatInvitation_State `protobuf:"varint,4,opt,name=state,proto3,enum=protobuf.GroupChatInvitation_State" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
State GroupChatInvitation_State `protobuf:"varint,4,opt,name=state,proto3,enum=protobuf.GroupChatInvitation_State" json:"state,omitempty"`
}
func (m *GroupChatInvitation) Reset() { *m = GroupChatInvitation{} }
func (m *GroupChatInvitation) String() string { return proto.CompactTextString(m) }
func (*GroupChatInvitation) ProtoMessage() {}
func (x *GroupChatInvitation) Reset() {
*x = GroupChatInvitation{}
if protoimpl.UnsafeEnabled {
mi := &file_group_chat_invitation_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GroupChatInvitation) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GroupChatInvitation) ProtoMessage() {}
func (x *GroupChatInvitation) ProtoReflect() protoreflect.Message {
mi := &file_group_chat_invitation_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GroupChatInvitation.ProtoReflect.Descriptor instead.
func (*GroupChatInvitation) Descriptor() ([]byte, []int) {
return fileDescriptor_a6a73333de6a8ebe, []int{0}
return file_group_chat_invitation_proto_rawDescGZIP(), []int{0}
}
func (m *GroupChatInvitation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GroupChatInvitation.Unmarshal(m, b)
}
func (m *GroupChatInvitation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GroupChatInvitation.Marshal(b, m, deterministic)
}
func (m *GroupChatInvitation) XXX_Merge(src proto.Message) {
xxx_messageInfo_GroupChatInvitation.Merge(m, src)
}
func (m *GroupChatInvitation) XXX_Size() int {
return xxx_messageInfo_GroupChatInvitation.Size(m)
}
func (m *GroupChatInvitation) XXX_DiscardUnknown() {
xxx_messageInfo_GroupChatInvitation.DiscardUnknown(m)
}
var xxx_messageInfo_GroupChatInvitation proto.InternalMessageInfo
func (m *GroupChatInvitation) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *GroupChatInvitation) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *GroupChatInvitation) GetChatId() string {
if m != nil {
return m.ChatId
func (x *GroupChatInvitation) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
func (m *GroupChatInvitation) GetIntroductionMessage() string {
if m != nil {
return m.IntroductionMessage
func (x *GroupChatInvitation) GetIntroductionMessage() string {
if x != nil {
return x.IntroductionMessage
}
return ""
}
func (m *GroupChatInvitation) GetState() GroupChatInvitation_State {
if m != nil {
return m.State
func (x *GroupChatInvitation) GetState() GroupChatInvitation_State {
if x != nil {
return x.State
}
return GroupChatInvitation_UNKNOWN
}
func init() {
proto.RegisterEnum("protobuf.GroupChatInvitation_State", GroupChatInvitation_State_name, GroupChatInvitation_State_value)
proto.RegisterType((*GroupChatInvitation)(nil), "protobuf.GroupChatInvitation")
var File_group_chat_invitation_proto protoreflect.FileDescriptor
var file_group_chat_invitation_proto_rawDesc = []byte{
0x0a, 0x1b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x76,
0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xf1, 0x01, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x43, 0x68, 0x61, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x31,
0x0a, 0x14, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x69, 0x6e,
0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x12, 0x39, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x23, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x72, 0x6f, 0x75,
0x70, 0x43, 0x68, 0x61, 0x74, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3d, 0x0a, 0x05,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x01, 0x12,
0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a,
0x08, 0x41, 0x50, 0x50, 0x52, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x03, 0x42, 0x0d, 0x5a, 0x0b, 0x2e,
0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
func init() {
proto.RegisterFile("group_chat_invitation.proto", fileDescriptor_a6a73333de6a8ebe)
var (
file_group_chat_invitation_proto_rawDescOnce sync.Once
file_group_chat_invitation_proto_rawDescData = file_group_chat_invitation_proto_rawDesc
)
func file_group_chat_invitation_proto_rawDescGZIP() []byte {
file_group_chat_invitation_proto_rawDescOnce.Do(func() {
file_group_chat_invitation_proto_rawDescData = protoimpl.X.CompressGZIP(file_group_chat_invitation_proto_rawDescData)
})
return file_group_chat_invitation_proto_rawDescData
}
var fileDescriptor_a6a73333de6a8ebe = []byte{
// 243 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x2f, 0xca, 0x2f,
0x2d, 0x88, 0x4f, 0xce, 0x48, 0x2c, 0x89, 0xcf, 0xcc, 0x2b, 0xcb, 0x2c, 0x49, 0x2c, 0xc9, 0xcc,
0xcf, 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53, 0x49, 0xa5, 0x69, 0x4a, 0x1f,
0x19, 0xb9, 0x84, 0xdd, 0x41, 0x2a, 0x9d, 0x33, 0x12, 0x4b, 0x3c, 0xe1, 0xea, 0x84, 0x44, 0xb8,
0x58, 0x93, 0x73, 0xf2, 0x93, 0xb3, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x82, 0x20, 0x1c, 0x21,
0x71, 0x2e, 0x76, 0x88, 0x81, 0x29, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x6c, 0x20, 0xae,
0x67, 0x8a, 0x90, 0x21, 0x97, 0x48, 0x66, 0x5e, 0x49, 0x51, 0x7e, 0x4a, 0x69, 0x32, 0x48, 0x7b,
0x7c, 0x6e, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0xaa, 0x04, 0x33, 0x58, 0x95, 0x30, 0xb2, 0x9c, 0x2f,
0x44, 0x4a, 0xc8, 0x92, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, 0x45, 0x81, 0x51, 0x83,
0xcf, 0x48, 0x59, 0x0f, 0xe6, 0x26, 0x3d, 0x2c, 0xee, 0xd1, 0x0b, 0x06, 0x29, 0x0d, 0x82, 0xe8,
0x50, 0xb2, 0xe5, 0x62, 0x05, 0xf3, 0x85, 0xb8, 0xb9, 0xd8, 0x43, 0xfd, 0xbc, 0xfd, 0xfc, 0xc3,
0xfd, 0x04, 0x18, 0x40, 0x9c, 0x20, 0xd7, 0xc0, 0x50, 0xd7, 0xe0, 0x10, 0x01, 0x46, 0x21, 0x1e,
0x2e, 0x8e, 0x20, 0x57, 0x2f, 0x57, 0xe7, 0x10, 0x57, 0x17, 0x01, 0x26, 0x10, 0xcf, 0x31, 0x20,
0x20, 0xc8, 0x3f, 0xcc, 0xd5, 0x45, 0x80, 0xd9, 0x89, 0x37, 0x8a, 0x5b, 0x4f, 0xdf, 0x1a, 0x66,
0x5d, 0x12, 0x1b, 0x98, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x4c, 0x19, 0xcd, 0x32,
0x01, 0x00, 0x00,
var file_group_chat_invitation_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_group_chat_invitation_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_group_chat_invitation_proto_goTypes = []interface{}{
(GroupChatInvitation_State)(0), // 0: protobuf.GroupChatInvitation.State
(*GroupChatInvitation)(nil), // 1: protobuf.GroupChatInvitation
}
var file_group_chat_invitation_proto_depIdxs = []int32{
0, // 0: protobuf.GroupChatInvitation.state:type_name -> protobuf.GroupChatInvitation.State
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_group_chat_invitation_proto_init() }
func file_group_chat_invitation_proto_init() {
if File_group_chat_invitation_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_group_chat_invitation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GroupChatInvitation); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_group_chat_invitation_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_group_chat_invitation_proto_goTypes,
DependencyIndexes: file_group_chat_invitation_proto_depIdxs,
EnumInfos: file_group_chat_invitation_proto_enumTypes,
MessageInfos: file_group_chat_invitation_proto_msgTypes,
}.Build()
File_group_chat_invitation_proto = out.File
file_group_chat_invitation_proto_rawDesc = nil
file_group_chat_invitation_proto_goTypes = nil
file_group_chat_invitation_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: membership_update_message.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type MembershipUpdateEvent_EventType int32
@ -35,41 +35,66 @@ const (
MembershipUpdateEvent_IMAGE_CHANGED MembershipUpdateEvent_EventType = 9
)
var MembershipUpdateEvent_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_CREATED",
2: "NAME_CHANGED",
3: "MEMBERS_ADDED",
4: "MEMBER_JOINED",
5: "MEMBER_REMOVED",
6: "ADMINS_ADDED",
7: "ADMIN_REMOVED",
8: "COLOR_CHANGED",
9: "IMAGE_CHANGED",
}
// Enum value maps for MembershipUpdateEvent_EventType.
var (
MembershipUpdateEvent_EventType_name = map[int32]string{
0: "UNKNOWN",
1: "CHAT_CREATED",
2: "NAME_CHANGED",
3: "MEMBERS_ADDED",
4: "MEMBER_JOINED",
5: "MEMBER_REMOVED",
6: "ADMINS_ADDED",
7: "ADMIN_REMOVED",
8: "COLOR_CHANGED",
9: "IMAGE_CHANGED",
}
MembershipUpdateEvent_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_CREATED": 1,
"NAME_CHANGED": 2,
"MEMBERS_ADDED": 3,
"MEMBER_JOINED": 4,
"MEMBER_REMOVED": 5,
"ADMINS_ADDED": 6,
"ADMIN_REMOVED": 7,
"COLOR_CHANGED": 8,
"IMAGE_CHANGED": 9,
}
)
var MembershipUpdateEvent_EventType_value = map[string]int32{
"UNKNOWN": 0,
"CHAT_CREATED": 1,
"NAME_CHANGED": 2,
"MEMBERS_ADDED": 3,
"MEMBER_JOINED": 4,
"MEMBER_REMOVED": 5,
"ADMINS_ADDED": 6,
"ADMIN_REMOVED": 7,
"COLOR_CHANGED": 8,
"IMAGE_CHANGED": 9,
func (x MembershipUpdateEvent_EventType) Enum() *MembershipUpdateEvent_EventType {
p := new(MembershipUpdateEvent_EventType)
*p = x
return p
}
func (x MembershipUpdateEvent_EventType) String() string {
return proto.EnumName(MembershipUpdateEvent_EventType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MembershipUpdateEvent_EventType) Descriptor() protoreflect.EnumDescriptor {
return file_membership_update_message_proto_enumTypes[0].Descriptor()
}
func (MembershipUpdateEvent_EventType) Type() protoreflect.EnumType {
return &file_membership_update_message_proto_enumTypes[0]
}
func (x MembershipUpdateEvent_EventType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MembershipUpdateEvent_EventType.Descriptor instead.
func (MembershipUpdateEvent_EventType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{0, 0}
return file_membership_update_message_proto_rawDescGZIP(), []int{0, 0}
}
type MembershipUpdateEvent struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Lamport timestamp of the event
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
// List of public keys of objects of the action
@ -81,75 +106,79 @@ type MembershipUpdateEvent struct {
// Color of the chat for the CHAT_CREATED/COLOR_CHANGED event types
Color string `protobuf:"bytes,5,opt,name=color,proto3" json:"color,omitempty"`
// Chat image
Image []byte `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Image []byte `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"`
}
func (m *MembershipUpdateEvent) Reset() { *m = MembershipUpdateEvent{} }
func (m *MembershipUpdateEvent) String() string { return proto.CompactTextString(m) }
func (*MembershipUpdateEvent) ProtoMessage() {}
func (x *MembershipUpdateEvent) Reset() {
*x = MembershipUpdateEvent{}
if protoimpl.UnsafeEnabled {
mi := &file_membership_update_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MembershipUpdateEvent) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MembershipUpdateEvent) ProtoMessage() {}
func (x *MembershipUpdateEvent) ProtoReflect() protoreflect.Message {
mi := &file_membership_update_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MembershipUpdateEvent.ProtoReflect.Descriptor instead.
func (*MembershipUpdateEvent) Descriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{0}
return file_membership_update_message_proto_rawDescGZIP(), []int{0}
}
func (m *MembershipUpdateEvent) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MembershipUpdateEvent.Unmarshal(m, b)
}
func (m *MembershipUpdateEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MembershipUpdateEvent.Marshal(b, m, deterministic)
}
func (m *MembershipUpdateEvent) XXX_Merge(src proto.Message) {
xxx_messageInfo_MembershipUpdateEvent.Merge(m, src)
}
func (m *MembershipUpdateEvent) XXX_Size() int {
return xxx_messageInfo_MembershipUpdateEvent.Size(m)
}
func (m *MembershipUpdateEvent) XXX_DiscardUnknown() {
xxx_messageInfo_MembershipUpdateEvent.DiscardUnknown(m)
}
var xxx_messageInfo_MembershipUpdateEvent proto.InternalMessageInfo
func (m *MembershipUpdateEvent) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *MembershipUpdateEvent) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *MembershipUpdateEvent) GetMembers() []string {
if m != nil {
return m.Members
func (x *MembershipUpdateEvent) GetMembers() []string {
if x != nil {
return x.Members
}
return nil
}
func (m *MembershipUpdateEvent) GetName() string {
if m != nil {
return m.Name
func (x *MembershipUpdateEvent) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (m *MembershipUpdateEvent) GetType() MembershipUpdateEvent_EventType {
if m != nil {
return m.Type
func (x *MembershipUpdateEvent) GetType() MembershipUpdateEvent_EventType {
if x != nil {
return x.Type
}
return MembershipUpdateEvent_UNKNOWN
}
func (m *MembershipUpdateEvent) GetColor() string {
if m != nil {
return m.Color
func (x *MembershipUpdateEvent) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (m *MembershipUpdateEvent) GetImage() []byte {
if m != nil {
return m.Image
func (x *MembershipUpdateEvent) GetImage() []byte {
if x != nil {
return x.Image
}
return nil
}
@ -158,6 +187,10 @@ func (m *MembershipUpdateEvent) GetImage() []byte {
// about group membership changes.
// For more information, see https://github.com/status-im/specs/blob/master/status-group-chats-spec.md.
type MembershipUpdateMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The chat id of the private group chat
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
// A list of events for this group chat, first x bytes are the signature, then is a
@ -165,51 +198,76 @@ type MembershipUpdateMessage struct {
Events [][]byte `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
// An optional chat message
//
// Types that are valid to be assigned to ChatEntity:
// Types that are assignable to ChatEntity:
//
// *MembershipUpdateMessage_Message
// *MembershipUpdateMessage_EmojiReaction
ChatEntity isMembershipUpdateMessage_ChatEntity `protobuf_oneof:"chat_entity"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
ChatEntity isMembershipUpdateMessage_ChatEntity `protobuf_oneof:"chat_entity"`
}
func (m *MembershipUpdateMessage) Reset() { *m = MembershipUpdateMessage{} }
func (m *MembershipUpdateMessage) String() string { return proto.CompactTextString(m) }
func (*MembershipUpdateMessage) ProtoMessage() {}
func (x *MembershipUpdateMessage) Reset() {
*x = MembershipUpdateMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_membership_update_message_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MembershipUpdateMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MembershipUpdateMessage) ProtoMessage() {}
func (x *MembershipUpdateMessage) ProtoReflect() protoreflect.Message {
mi := &file_membership_update_message_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MembershipUpdateMessage.ProtoReflect.Descriptor instead.
func (*MembershipUpdateMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_8d37dd0dc857a6be, []int{1}
return file_membership_update_message_proto_rawDescGZIP(), []int{1}
}
func (m *MembershipUpdateMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MembershipUpdateMessage.Unmarshal(m, b)
}
func (m *MembershipUpdateMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MembershipUpdateMessage.Marshal(b, m, deterministic)
}
func (m *MembershipUpdateMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_MembershipUpdateMessage.Merge(m, src)
}
func (m *MembershipUpdateMessage) XXX_Size() int {
return xxx_messageInfo_MembershipUpdateMessage.Size(m)
}
func (m *MembershipUpdateMessage) XXX_DiscardUnknown() {
xxx_messageInfo_MembershipUpdateMessage.DiscardUnknown(m)
}
var xxx_messageInfo_MembershipUpdateMessage proto.InternalMessageInfo
func (m *MembershipUpdateMessage) GetChatId() string {
if m != nil {
return m.ChatId
func (x *MembershipUpdateMessage) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
func (m *MembershipUpdateMessage) GetEvents() [][]byte {
func (x *MembershipUpdateMessage) GetEvents() [][]byte {
if x != nil {
return x.Events
}
return nil
}
func (m *MembershipUpdateMessage) GetChatEntity() isMembershipUpdateMessage_ChatEntity {
if m != nil {
return m.Events
return m.ChatEntity
}
return nil
}
func (x *MembershipUpdateMessage) GetMessage() *ChatMessage {
if x, ok := x.GetChatEntity().(*MembershipUpdateMessage_Message); ok {
return x.Message
}
return nil
}
func (x *MembershipUpdateMessage) GetEmojiReaction() *EmojiReaction {
if x, ok := x.GetChatEntity().(*MembershipUpdateMessage_EmojiReaction); ok {
return x.EmojiReaction
}
return nil
}
@ -230,73 +288,142 @@ func (*MembershipUpdateMessage_Message) isMembershipUpdateMessage_ChatEntity() {
func (*MembershipUpdateMessage_EmojiReaction) isMembershipUpdateMessage_ChatEntity() {}
func (m *MembershipUpdateMessage) GetChatEntity() isMembershipUpdateMessage_ChatEntity {
if m != nil {
return m.ChatEntity
}
return nil
var File_membership_update_message_proto protoreflect.FileDescriptor
var file_membership_update_message_proto_rawDesc = []byte{
0x0a, 0x1f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x5f, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x12, 0x63, 0x68, 0x61,
0x74, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x14, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x5f, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x03, 0x0a, 0x15, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x73, 0x68, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73,
0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12,
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x29, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x6d,
0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x76, 0x65,
0x6e, 0x74, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79,
0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0xc1,
0x01, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x48, 0x41,
0x54, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x4e,
0x41, 0x4d, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a,
0x0d, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x03,
0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x4a, 0x4f, 0x49, 0x4e, 0x45,
0x44, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x52, 0x45,
0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x44, 0x4d, 0x49, 0x4e,
0x53, 0x5f, 0x41, 0x44, 0x44, 0x45, 0x44, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x44, 0x4d,
0x49, 0x4e, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x44, 0x10, 0x07, 0x12, 0x11, 0x0a, 0x0d,
0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x08, 0x12,
0x11, 0x0a, 0x0d, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x44,
0x10, 0x09, 0x22, 0xce, 0x01, 0x0a, 0x17, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69,
0x70, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x17,
0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12,
0x31, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x68, 0x61, 0x74,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x5f, 0x72, 0x65, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0d, 0x65, 0x6d, 0x6f, 0x6a, 0x69, 0x52, 0x65, 0x61, 0x63,
0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x65, 0x6e, 0x74,
0x69, 0x74, 0x79, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func (m *MembershipUpdateMessage) GetMessage() *ChatMessage {
if x, ok := m.GetChatEntity().(*MembershipUpdateMessage_Message); ok {
return x.Message
}
return nil
var (
file_membership_update_message_proto_rawDescOnce sync.Once
file_membership_update_message_proto_rawDescData = file_membership_update_message_proto_rawDesc
)
func file_membership_update_message_proto_rawDescGZIP() []byte {
file_membership_update_message_proto_rawDescOnce.Do(func() {
file_membership_update_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_membership_update_message_proto_rawDescData)
})
return file_membership_update_message_proto_rawDescData
}
func (m *MembershipUpdateMessage) GetEmojiReaction() *EmojiReaction {
if x, ok := m.GetChatEntity().(*MembershipUpdateMessage_EmojiReaction); ok {
return x.EmojiReaction
}
return nil
var file_membership_update_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_membership_update_message_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_membership_update_message_proto_goTypes = []interface{}{
(MembershipUpdateEvent_EventType)(0), // 0: protobuf.MembershipUpdateEvent.EventType
(*MembershipUpdateEvent)(nil), // 1: protobuf.MembershipUpdateEvent
(*MembershipUpdateMessage)(nil), // 2: protobuf.MembershipUpdateMessage
(*ChatMessage)(nil), // 3: protobuf.ChatMessage
(*EmojiReaction)(nil), // 4: protobuf.EmojiReaction
}
var file_membership_update_message_proto_depIdxs = []int32{
0, // 0: protobuf.MembershipUpdateEvent.type:type_name -> protobuf.MembershipUpdateEvent.EventType
3, // 1: protobuf.MembershipUpdateMessage.message:type_name -> protobuf.ChatMessage
4, // 2: protobuf.MembershipUpdateMessage.emoji_reaction:type_name -> protobuf.EmojiReaction
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*MembershipUpdateMessage) XXX_OneofWrappers() []interface{} {
return []interface{}{
func init() { file_membership_update_message_proto_init() }
func file_membership_update_message_proto_init() {
if File_membership_update_message_proto != nil {
return
}
file_chat_message_proto_init()
file_emoji_reaction_proto_init()
if !protoimpl.UnsafeEnabled {
file_membership_update_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MembershipUpdateEvent); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_membership_update_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MembershipUpdateMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_membership_update_message_proto_msgTypes[1].OneofWrappers = []interface{}{
(*MembershipUpdateMessage_Message)(nil),
(*MembershipUpdateMessage_EmojiReaction)(nil),
}
}
func init() {
proto.RegisterEnum("protobuf.MembershipUpdateEvent_EventType", MembershipUpdateEvent_EventType_name, MembershipUpdateEvent_EventType_value)
proto.RegisterType((*MembershipUpdateEvent)(nil), "protobuf.MembershipUpdateEvent")
proto.RegisterType((*MembershipUpdateMessage)(nil), "protobuf.MembershipUpdateMessage")
}
func init() {
proto.RegisterFile("membership_update_message.proto", fileDescriptor_8d37dd0dc857a6be)
}
var fileDescriptor_8d37dd0dc857a6be = []byte{
// 443 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xd1, 0x8e, 0x93, 0x40,
0x14, 0x2d, 0x5b, 0x4a, 0x97, 0x4b, 0xdb, 0xe0, 0xcd, 0xae, 0x25, 0xfb, 0x22, 0xe9, 0x13, 0xbe,
0x60, 0xac, 0x8f, 0xc6, 0x44, 0x0a, 0x93, 0x6d, 0x55, 0x20, 0x19, 0xbb, 0x9a, 0xf8, 0x42, 0x68,
0x3b, 0x6e, 0xd1, 0xa5, 0x90, 0x76, 0xd6, 0xa4, 0xbf, 0xe0, 0x5f, 0xf9, 0x03, 0x7e, 0x93, 0x99,
0x01, 0x8a, 0x35, 0xbe, 0xc0, 0x9c, 0x73, 0xe7, 0x9c, 0x39, 0xcc, 0x01, 0x9e, 0xe5, 0x2c, 0x5f,
0xb1, 0xfd, 0x61, 0x9b, 0x95, 0xc9, 0x63, 0xb9, 0x49, 0x39, 0x4b, 0x72, 0x76, 0x38, 0xa4, 0xf7,
0xcc, 0x2d, 0xf7, 0x05, 0x2f, 0xf0, 0x52, 0xbe, 0x56, 0x8f, 0x5f, 0x6f, 0x70, 0xbd, 0x4d, 0xf9,
0xf9, 0xf4, 0xe6, 0x8a, 0xe5, 0xc5, 0xb7, 0x2c, 0xd9, 0xb3, 0x74, 0xcd, 0xb3, 0x62, 0x57, 0xb1,
0x93, 0x9f, 0x5d, 0xb8, 0x0e, 0x4f, 0xbe, 0x77, 0xd2, 0x96, 0xfc, 0x60, 0x3b, 0x8e, 0x57, 0xd0,
0x5b, 0x3f, 0x14, 0xeb, 0xef, 0x96, 0x62, 0x2b, 0x8e, 0x4a, 0x2b, 0x80, 0x16, 0xf4, 0xeb, 0x18,
0xd6, 0x85, 0xdd, 0x75, 0x74, 0xda, 0x40, 0x44, 0x50, 0x77, 0x69, 0xce, 0xac, 0xae, 0xad, 0x38,
0x3a, 0x95, 0x6b, 0x7c, 0x03, 0x2a, 0x3f, 0x96, 0xcc, 0x52, 0x6d, 0xc5, 0x19, 0x4d, 0x9f, 0xbb,
0x4d, 0x40, 0xf7, 0xbf, 0x47, 0xba, 0xf2, 0xb9, 0x3c, 0x96, 0x8c, 0x4a, 0x99, 0x8c, 0x50, 0x3c,
0x14, 0x7b, 0xab, 0x27, 0x3d, 0x2b, 0x20, 0xd8, 0x2c, 0x4f, 0xef, 0x99, 0xa5, 0xd9, 0x8a, 0x33,
0xa0, 0x15, 0x98, 0xfc, 0x52, 0x40, 0x3f, 0xe9, 0xd1, 0x80, 0xfe, 0x5d, 0xf4, 0x3e, 0x8a, 0x3f,
0x47, 0x66, 0x07, 0x4d, 0x18, 0xf8, 0x73, 0x6f, 0x99, 0xf8, 0x94, 0x78, 0x4b, 0x12, 0x98, 0x8a,
0x60, 0x22, 0x2f, 0x24, 0x89, 0x3f, 0xf7, 0xa2, 0x5b, 0x12, 0x98, 0x17, 0xf8, 0x04, 0x86, 0x21,
0x09, 0x67, 0x84, 0x7e, 0x4c, 0xbc, 0x20, 0x20, 0x81, 0xd9, 0x6d, 0xa9, 0xe4, 0x5d, 0xbc, 0x88,
0x48, 0x60, 0xaa, 0x88, 0x30, 0xaa, 0x29, 0x4a, 0xc2, 0xf8, 0x13, 0x09, 0xcc, 0x9e, 0xf0, 0xf2,
0x82, 0x70, 0x11, 0x35, 0x42, 0x4d, 0x08, 0x25, 0x73, 0xda, 0xd4, 0x17, 0x94, 0x1f, 0x7f, 0x88,
0xe9, 0xe9, 0xc4, 0x4b, 0x41, 0x2d, 0x42, 0xef, 0xb6, 0x0d, 0xa1, 0x4f, 0x7e, 0x2b, 0x30, 0xfe,
0xf7, 0x66, 0xc2, 0xaa, 0x44, 0x1c, 0x43, 0x5f, 0x96, 0x9a, 0x6d, 0x64, 0x21, 0x3a, 0xd5, 0x04,
0x5c, 0x6c, 0xf0, 0x29, 0x68, 0x4c, 0x7c, 0x77, 0x55, 0xc8, 0x80, 0xd6, 0x08, 0x5f, 0x8a, 0xa6,
0xa4, 0x56, 0x56, 0x62, 0x4c, 0xaf, 0xdb, 0xeb, 0xf7, 0xb7, 0x29, 0xaf, 0x8d, 0xe7, 0x1d, 0xda,
0xec, 0xc3, 0xb7, 0x30, 0x3a, 0xff, 0x49, 0x64, 0x71, 0xc6, 0x74, 0xdc, 0x2a, 0x89, 0x98, 0xd3,
0x7a, 0x3c, 0xef, 0xd0, 0x21, 0xfb, 0x9b, 0x98, 0x0d, 0xc1, 0x90, 0x29, 0xd9, 0x8e, 0x67, 0xfc,
0x38, 0x1b, 0x7e, 0x31, 0xdc, 0x17, 0xaf, 0x1b, 0xf1, 0x4a, 0x93, 0xab, 0x57, 0x7f, 0x02, 0x00,
0x00, 0xff, 0xff, 0x1e, 0xc9, 0x99, 0x52, 0xca, 0x02, 0x00, 0x00,
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_membership_update_message_proto_rawDesc,
NumEnums: 1,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_membership_update_message_proto_goTypes,
DependencyIndexes: file_membership_update_message_proto_depIdxs,
EnumInfos: file_membership_update_message_proto_enumTypes,
MessageInfos: file_membership_update_message_proto_msgTypes,
}.Build()
File_membership_update_message_proto = out.File
file_membership_update_message_proto_rawDesc = nil
file_membership_update_message_proto_goTypes = nil
file_membership_update_message_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ message Backup {
/* this is what we already had */
repeated SyncInstallationContactV2 contacts = 3;
repeated SyncCommunity communities = 4;
repeated SyncInstallationCommunity communities = 4;
/* newly added details to be backed up to and fetched from waku */
FetchingBackedUpDataDetails contactsDetails = 5;
FetchingBackedUpDataDetails communitiesDetails = 6;
@ -83,7 +83,7 @@ message LocalPairingPeerHello {
bytes signature = 5;
}
message PairInstallation {
message SyncPairInstallation {
uint64 clock = 1;
string installation_id = 2;
string device_type = 3;
@ -92,16 +92,6 @@ message PairInstallation {
uint32 version = 5;
}
message SyncInstallationContact {
uint64 clock = 1;
string id = 2;
string profile_image = 3;
string ens_name = 4;
uint64 last_updated = 5;
repeated string system_tags = 6;
string local_nickname = 7;
}
message SyncInstallationContactV2 {
uint64 last_updated_locally = 1;
string id = 2;
@ -135,7 +125,7 @@ message SyncInstallationPublicChat {
string id = 2;
}
message SyncCommunity {
message SyncInstallationCommunity {
uint64 clock = 1;
bytes id = 2;
// Don't sync private_key because we want to have only one control node
@ -162,13 +152,6 @@ message SyncCommunityRequestsToJoin {
repeated RevealedAccount revealed_accounts = 8;
}
message SyncInstallation {
repeated SyncInstallationContact contacts = 1;
repeated SyncInstallationPublicChat public_chats = 2;
SyncInstallationAccount account = 3;
repeated SyncCommunity communities = 4;
}
message SyncChatRemoved {
uint64 clock = 1;
string id = 2;

View File

@ -1,117 +1,187 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: pin_message.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type PinMessage struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
MessageId string `protobuf:"bytes,2,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
Pinned bool `protobuf:"varint,4,opt,name=pinned,proto3" json:"pinned,omitempty"`
// The type of message (public/one-to-one/private-group-chat)
MessageType MessageType `protobuf:"varint,5,opt,name=message_type,json=messageType,proto3,enum=protobuf.MessageType" json:"message_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
MessageType MessageType `protobuf:"varint,5,opt,name=message_type,json=messageType,proto3,enum=protobuf.MessageType" json:"message_type,omitempty"`
}
func (m *PinMessage) Reset() { *m = PinMessage{} }
func (m *PinMessage) String() string { return proto.CompactTextString(m) }
func (*PinMessage) ProtoMessage() {}
func (x *PinMessage) Reset() {
*x = PinMessage{}
if protoimpl.UnsafeEnabled {
mi := &file_pin_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PinMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PinMessage) ProtoMessage() {}
func (x *PinMessage) ProtoReflect() protoreflect.Message {
mi := &file_pin_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PinMessage.ProtoReflect.Descriptor instead.
func (*PinMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_b3c2ad1be7128a0a, []int{0}
return file_pin_message_proto_rawDescGZIP(), []int{0}
}
func (m *PinMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PinMessage.Unmarshal(m, b)
}
func (m *PinMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PinMessage.Marshal(b, m, deterministic)
}
func (m *PinMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_PinMessage.Merge(m, src)
}
func (m *PinMessage) XXX_Size() int {
return xxx_messageInfo_PinMessage.Size(m)
}
func (m *PinMessage) XXX_DiscardUnknown() {
xxx_messageInfo_PinMessage.DiscardUnknown(m)
}
var xxx_messageInfo_PinMessage proto.InternalMessageInfo
func (m *PinMessage) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *PinMessage) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *PinMessage) GetMessageId() string {
if m != nil {
return m.MessageId
func (x *PinMessage) GetMessageId() string {
if x != nil {
return x.MessageId
}
return ""
}
func (m *PinMessage) GetChatId() string {
if m != nil {
return m.ChatId
func (x *PinMessage) GetChatId() string {
if x != nil {
return x.ChatId
}
return ""
}
func (m *PinMessage) GetPinned() bool {
if m != nil {
return m.Pinned
func (x *PinMessage) GetPinned() bool {
if x != nil {
return x.Pinned
}
return false
}
func (m *PinMessage) GetMessageType() MessageType {
if m != nil {
return m.MessageType
func (x *PinMessage) GetMessageType() MessageType {
if x != nil {
return x.MessageType
}
return MessageType_UNKNOWN_MESSAGE_TYPE
}
func init() {
proto.RegisterType((*PinMessage)(nil), "protobuf.PinMessage")
var File_pin_message_proto protoreflect.FileDescriptor
var file_pin_message_proto_rawDesc = []byte{
0x0a, 0x11, 0x70, 0x69, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x1a, 0x0b, 0x65,
0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x0a, 0x50,
0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f,
0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12,
0x1d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x17,
0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12,
0x38, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("pin_message.proto", fileDescriptor_b3c2ad1be7128a0a)
var (
file_pin_message_proto_rawDescOnce sync.Once
file_pin_message_proto_rawDescData = file_pin_message_proto_rawDesc
)
func file_pin_message_proto_rawDescGZIP() []byte {
file_pin_message_proto_rawDescOnce.Do(func() {
file_pin_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_pin_message_proto_rawDescData)
})
return file_pin_message_proto_rawDescData
}
var fileDescriptor_b3c2ad1be7128a0a = []byte{
// 192 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xc8, 0xcc, 0x8b,
0xcf, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00,
0x53, 0x49, 0xa5, 0x69, 0x52, 0xdc, 0xa9, 0x79, 0xa5, 0xb9, 0xc5, 0x10, 0x61, 0xa5, 0x35, 0x8c,
0x5c, 0x5c, 0x01, 0x99, 0x79, 0xbe, 0x10, 0xb5, 0x42, 0x22, 0x5c, 0xac, 0xc9, 0x39, 0xf9, 0xc9,
0xd9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x10, 0x8e, 0x90, 0x2c, 0x17, 0x17, 0xd4, 0xb0,
0xf8, 0xcc, 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x4e, 0xa8, 0x88, 0x67, 0x8a, 0x90,
0x38, 0x17, 0x7b, 0x72, 0x46, 0x62, 0x09, 0x48, 0x8e, 0x19, 0x2c, 0xc7, 0x06, 0xe2, 0x7a, 0xa6,
0x08, 0x89, 0x71, 0xb1, 0x15, 0x64, 0xe6, 0xe5, 0xa5, 0xa6, 0x48, 0xb0, 0x28, 0x30, 0x6a, 0x70,
0x04, 0x41, 0x79, 0x42, 0x16, 0x5c, 0x3c, 0x30, 0xf3, 0x4a, 0x2a, 0x0b, 0x52, 0x25, 0x58, 0x15,
0x18, 0x35, 0xf8, 0x8c, 0x44, 0xf5, 0x60, 0x4e, 0xd4, 0x83, 0x3a, 0x27, 0xa4, 0xb2, 0x20, 0x35,
0x88, 0x3b, 0x17, 0xc1, 0x71, 0xe2, 0x8d, 0xe2, 0xd6, 0xd3, 0xb7, 0x86, 0xa9, 0x4b, 0x62, 0x03,
0xb3, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0x7a, 0xb9, 0x5d, 0xf0, 0x00, 0x00, 0x00,
var file_pin_message_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_pin_message_proto_goTypes = []interface{}{
(*PinMessage)(nil), // 0: protobuf.PinMessage
(MessageType)(0), // 1: protobuf.MessageType
}
var file_pin_message_proto_depIdxs = []int32{
1, // 0: protobuf.PinMessage.message_type:type_name -> protobuf.MessageType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_pin_message_proto_init() }
func file_pin_message_proto_init() {
if File_pin_message_proto != nil {
return
}
file_enums_proto_init()
if !protoimpl.UnsafeEnabled {
file_pin_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*PinMessage); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pin_message_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_pin_message_proto_goTypes,
DependencyIndexes: file_pin_message_proto_depIdxs,
MessageInfos: file_pin_message_proto_msgTypes,
}.Build()
File_pin_message_proto = out.File
file_pin_message_proto_rawDesc = nil
file_pin_message_proto_goTypes = nil
file_pin_message_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: status_update.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type StatusUpdate_StatusType int32
@ -30,28 +30,49 @@ const (
StatusUpdate_INACTIVE StatusUpdate_StatusType = 4
)
var StatusUpdate_StatusType_name = map[int32]string{
0: "UNKNOWN_STATUS_TYPE",
1: "AUTOMATIC",
2: "DO_NOT_DISTURB",
3: "ALWAYS_ONLINE",
4: "INACTIVE",
}
// Enum value maps for StatusUpdate_StatusType.
var (
StatusUpdate_StatusType_name = map[int32]string{
0: "UNKNOWN_STATUS_TYPE",
1: "AUTOMATIC",
2: "DO_NOT_DISTURB",
3: "ALWAYS_ONLINE",
4: "INACTIVE",
}
StatusUpdate_StatusType_value = map[string]int32{
"UNKNOWN_STATUS_TYPE": 0,
"AUTOMATIC": 1,
"DO_NOT_DISTURB": 2,
"ALWAYS_ONLINE": 3,
"INACTIVE": 4,
}
)
var StatusUpdate_StatusType_value = map[string]int32{
"UNKNOWN_STATUS_TYPE": 0,
"AUTOMATIC": 1,
"DO_NOT_DISTURB": 2,
"ALWAYS_ONLINE": 3,
"INACTIVE": 4,
func (x StatusUpdate_StatusType) Enum() *StatusUpdate_StatusType {
p := new(StatusUpdate_StatusType)
*p = x
return p
}
func (x StatusUpdate_StatusType) String() string {
return proto.EnumName(StatusUpdate_StatusType_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (StatusUpdate_StatusType) Descriptor() protoreflect.EnumDescriptor {
return file_status_update_proto_enumTypes[0].Descriptor()
}
func (StatusUpdate_StatusType) Type() protoreflect.EnumType {
return &file_status_update_proto_enumTypes[0]
}
func (x StatusUpdate_StatusType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use StatusUpdate_StatusType.Descriptor instead.
func (StatusUpdate_StatusType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_911acd91e62cd3d7, []int{0, 0}
return file_status_update_proto_rawDescGZIP(), []int{0, 0}
}
// Specs:
@ -66,85 +87,155 @@ func (StatusUpdate_StatusType) EnumDescriptor() ([]byte, []int) {
// Display - Offline forever
// Note: Only send pings if the user interacted with the app in the last x minutes.
type StatusUpdate struct {
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
StatusType StatusUpdate_StatusType `protobuf:"varint,2,opt,name=status_type,json=statusType,proto3,enum=protobuf.StatusUpdate_StatusType" json:"status_type,omitempty"`
CustomText string `protobuf:"bytes,3,opt,name=custom_text,json=customText,proto3" json:"custom_text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Clock uint64 `protobuf:"varint,1,opt,name=clock,proto3" json:"clock,omitempty"`
StatusType StatusUpdate_StatusType `protobuf:"varint,2,opt,name=status_type,json=statusType,proto3,enum=protobuf.StatusUpdate_StatusType" json:"status_type,omitempty"`
CustomText string `protobuf:"bytes,3,opt,name=custom_text,json=customText,proto3" json:"custom_text,omitempty"`
}
func (m *StatusUpdate) Reset() { *m = StatusUpdate{} }
func (m *StatusUpdate) String() string { return proto.CompactTextString(m) }
func (*StatusUpdate) ProtoMessage() {}
func (x *StatusUpdate) Reset() {
*x = StatusUpdate{}
if protoimpl.UnsafeEnabled {
mi := &file_status_update_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *StatusUpdate) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusUpdate) ProtoMessage() {}
func (x *StatusUpdate) ProtoReflect() protoreflect.Message {
mi := &file_status_update_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusUpdate.ProtoReflect.Descriptor instead.
func (*StatusUpdate) Descriptor() ([]byte, []int) {
return fileDescriptor_911acd91e62cd3d7, []int{0}
return file_status_update_proto_rawDescGZIP(), []int{0}
}
func (m *StatusUpdate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusUpdate.Unmarshal(m, b)
}
func (m *StatusUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StatusUpdate.Marshal(b, m, deterministic)
}
func (m *StatusUpdate) XXX_Merge(src proto.Message) {
xxx_messageInfo_StatusUpdate.Merge(m, src)
}
func (m *StatusUpdate) XXX_Size() int {
return xxx_messageInfo_StatusUpdate.Size(m)
}
func (m *StatusUpdate) XXX_DiscardUnknown() {
xxx_messageInfo_StatusUpdate.DiscardUnknown(m)
}
var xxx_messageInfo_StatusUpdate proto.InternalMessageInfo
func (m *StatusUpdate) GetClock() uint64 {
if m != nil {
return m.Clock
func (x *StatusUpdate) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *StatusUpdate) GetStatusType() StatusUpdate_StatusType {
if m != nil {
return m.StatusType
func (x *StatusUpdate) GetStatusType() StatusUpdate_StatusType {
if x != nil {
return x.StatusType
}
return StatusUpdate_UNKNOWN_STATUS_TYPE
}
func (m *StatusUpdate) GetCustomText() string {
if m != nil {
return m.CustomText
func (x *StatusUpdate) GetCustomText() string {
if x != nil {
return x.CustomText
}
return ""
}
func init() {
proto.RegisterEnum("protobuf.StatusUpdate_StatusType", StatusUpdate_StatusType_name, StatusUpdate_StatusType_value)
proto.RegisterType((*StatusUpdate)(nil), "protobuf.StatusUpdate")
var File_status_update_proto protoreflect.FileDescriptor
var file_status_update_proto_rawDesc = []byte{
0x0a, 0x13, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22,
0xf4, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0a,
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x65, 0x78, 0x74, 0x22, 0x69, 0x0a, 0x0a, 0x53,
0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b,
0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x55, 0x54, 0x4f, 0x4d, 0x41, 0x54, 0x49, 0x43, 0x10,
0x01, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x44, 0x49, 0x53, 0x54,
0x55, 0x52, 0x42, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f,
0x4f, 0x4e, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x41, 0x43,
0x54, 0x49, 0x56, 0x45, 0x10, 0x04, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("status_update.proto", fileDescriptor_911acd91e62cd3d7)
var (
file_status_update_proto_rawDescOnce sync.Once
file_status_update_proto_rawDescData = file_status_update_proto_rawDesc
)
func file_status_update_proto_rawDescGZIP() []byte {
file_status_update_proto_rawDescOnce.Do(func() {
file_status_update_proto_rawDescData = protoimpl.X.CompressGZIP(file_status_update_proto_rawDescData)
})
return file_status_update_proto_rawDescData
}
var fileDescriptor_911acd91e62cd3d7 = []byte{
// 253 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0xc1, 0x4e, 0xc2, 0x40,
0x10, 0x86, 0x5d, 0x40, 0x03, 0x53, 0x4a, 0xea, 0x60, 0x62, 0x6f, 0x56, 0x4e, 0x3d, 0xd5, 0x44,
0x8f, 0x9e, 0xb6, 0xd0, 0x43, 0x23, 0x6e, 0x4d, 0x77, 0x56, 0x82, 0x97, 0x0d, 0xd4, 0x35, 0x31,
0x6a, 0xda, 0xd8, 0x6d, 0x02, 0xef, 0xed, 0x03, 0x98, 0x14, 0x50, 0x4e, 0xf3, 0xff, 0x93, 0x6f,
0xbe, 0x0c, 0x8c, 0x6b, 0xbb, 0xb2, 0x4d, 0xad, 0x9b, 0xea, 0x75, 0x65, 0x4d, 0x54, 0x7d, 0x97,
0xb6, 0xc4, 0x7e, 0x3b, 0xd6, 0xcd, 0xdb, 0xe4, 0x87, 0xc1, 0x50, 0xb6, 0x84, 0x6a, 0x01, 0xbc,
0x80, 0xd3, 0xe2, 0xb3, 0x2c, 0x3e, 0x7c, 0x16, 0xb0, 0xb0, 0x97, 0xef, 0x0a, 0xc6, 0xe0, 0xec,
0x3d, 0x76, 0x5b, 0x19, 0xbf, 0x13, 0xb0, 0x70, 0x74, 0x7b, 0x1d, 0x1d, 0x34, 0xd1, 0xb1, 0x62,
0x5f, 0x68, 0x5b, 0x99, 0x1c, 0xea, 0xbf, 0x8c, 0x57, 0xe0, 0x14, 0x4d, 0x6d, 0xcb, 0x2f, 0x6d,
0xcd, 0xc6, 0xfa, 0xdd, 0x80, 0x85, 0x83, 0x1c, 0x76, 0x2b, 0x32, 0x1b, 0x3b, 0x79, 0x07, 0xf8,
0x3f, 0xc5, 0x4b, 0x18, 0x2b, 0xf1, 0x20, 0xb2, 0x85, 0xd0, 0x92, 0x38, 0x29, 0xa9, 0x69, 0xf9,
0x94, 0x78, 0x27, 0xe8, 0xc2, 0x80, 0x2b, 0xca, 0x1e, 0x39, 0xa5, 0x53, 0x8f, 0x21, 0xc2, 0x68,
0x96, 0x69, 0x91, 0x91, 0x9e, 0xa5, 0x92, 0x54, 0x1e, 0x7b, 0x1d, 0x3c, 0x07, 0x97, 0xcf, 0x17,
0x7c, 0x29, 0x75, 0x26, 0xe6, 0xa9, 0x48, 0xbc, 0x2e, 0x0e, 0xa1, 0x9f, 0x0a, 0x3e, 0xa5, 0xf4,
0x39, 0xf1, 0x7a, 0xb1, 0xfb, 0xe2, 0x44, 0x37, 0xf7, 0x87, 0xf7, 0xd7, 0x67, 0x6d, 0xba, 0xfb,
0x0d, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xa1, 0x52, 0x1d, 0x2d, 0x01, 0x00, 0x00,
var file_status_update_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_status_update_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_status_update_proto_goTypes = []interface{}{
(StatusUpdate_StatusType)(0), // 0: protobuf.StatusUpdate.StatusType
(*StatusUpdate)(nil), // 1: protobuf.StatusUpdate
}
var file_status_update_proto_depIdxs = []int32{
0, // 0: protobuf.StatusUpdate.status_type:type_name -> protobuf.StatusUpdate.StatusType
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_status_update_proto_init() }
func file_status_update_proto_init() {
if File_status_update_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_status_update_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*StatusUpdate); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_status_update_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_status_update_proto_goTypes,
DependencyIndexes: file_status_update_proto_depIdxs,
EnumInfos: file_status_update_proto_enumTypes,
MessageInfos: file_status_update_proto_msgTypes,
}.Build()
File_status_update_proto = out.File
file_status_update_proto_rawDesc = nil
file_status_update_proto_goTypes = nil
file_status_update_proto_depIdxs = nil
}

View File

@ -1,24 +1,24 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: sync_settings.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type SyncSetting_Type int32
@ -43,106 +43,170 @@ const (
SyncSetting_INCLUDE_WATCHONLY_ACCOUNT SyncSetting_Type = 17
)
var SyncSetting_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CURRENCY",
2: "GIF_RECENTS",
3: "GIF_FAVOURITES",
4: "MESSAGES_FROM_CONTACTS_ONLY",
5: "PREFERRED_NAME",
6: "PREVIEW_PRIVACY",
7: "PROFILE_PICTURES_SHOW_TO",
8: "PROFILE_PICTURES_VISIBILITY",
9: "SEND_STATUS_UPDATES",
10: "STICKERS_PACKS_INSTALLED",
11: "STICKERS_PACKS_PENDING",
12: "STICKERS_RECENT_STICKERS",
13: "DISPLAY_NAME",
14: "BIO",
15: "MNEMONIC_REMOVED",
16: "ENS_USERNAMES",
17: "INCLUDE_WATCHONLY_ACCOUNT",
}
// Enum value maps for SyncSetting_Type.
var (
SyncSetting_Type_name = map[int32]string{
0: "UNKNOWN",
1: "CURRENCY",
2: "GIF_RECENTS",
3: "GIF_FAVOURITES",
4: "MESSAGES_FROM_CONTACTS_ONLY",
5: "PREFERRED_NAME",
6: "PREVIEW_PRIVACY",
7: "PROFILE_PICTURES_SHOW_TO",
8: "PROFILE_PICTURES_VISIBILITY",
9: "SEND_STATUS_UPDATES",
10: "STICKERS_PACKS_INSTALLED",
11: "STICKERS_PACKS_PENDING",
12: "STICKERS_RECENT_STICKERS",
13: "DISPLAY_NAME",
14: "BIO",
15: "MNEMONIC_REMOVED",
16: "ENS_USERNAMES",
17: "INCLUDE_WATCHONLY_ACCOUNT",
}
SyncSetting_Type_value = map[string]int32{
"UNKNOWN": 0,
"CURRENCY": 1,
"GIF_RECENTS": 2,
"GIF_FAVOURITES": 3,
"MESSAGES_FROM_CONTACTS_ONLY": 4,
"PREFERRED_NAME": 5,
"PREVIEW_PRIVACY": 6,
"PROFILE_PICTURES_SHOW_TO": 7,
"PROFILE_PICTURES_VISIBILITY": 8,
"SEND_STATUS_UPDATES": 9,
"STICKERS_PACKS_INSTALLED": 10,
"STICKERS_PACKS_PENDING": 11,
"STICKERS_RECENT_STICKERS": 12,
"DISPLAY_NAME": 13,
"BIO": 14,
"MNEMONIC_REMOVED": 15,
"ENS_USERNAMES": 16,
"INCLUDE_WATCHONLY_ACCOUNT": 17,
}
)
var SyncSetting_Type_value = map[string]int32{
"UNKNOWN": 0,
"CURRENCY": 1,
"GIF_RECENTS": 2,
"GIF_FAVOURITES": 3,
"MESSAGES_FROM_CONTACTS_ONLY": 4,
"PREFERRED_NAME": 5,
"PREVIEW_PRIVACY": 6,
"PROFILE_PICTURES_SHOW_TO": 7,
"PROFILE_PICTURES_VISIBILITY": 8,
"SEND_STATUS_UPDATES": 9,
"STICKERS_PACKS_INSTALLED": 10,
"STICKERS_PACKS_PENDING": 11,
"STICKERS_RECENT_STICKERS": 12,
"DISPLAY_NAME": 13,
"BIO": 14,
"MNEMONIC_REMOVED": 15,
"ENS_USERNAMES": 16,
"INCLUDE_WATCHONLY_ACCOUNT": 17,
func (x SyncSetting_Type) Enum() *SyncSetting_Type {
p := new(SyncSetting_Type)
*p = x
return p
}
func (x SyncSetting_Type) String() string {
return proto.EnumName(SyncSetting_Type_name, int32(x))
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (SyncSetting_Type) Descriptor() protoreflect.EnumDescriptor {
return file_sync_settings_proto_enumTypes[0].Descriptor()
}
func (SyncSetting_Type) Type() protoreflect.EnumType {
return &file_sync_settings_proto_enumTypes[0]
}
func (x SyncSetting_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use SyncSetting_Type.Descriptor instead.
func (SyncSetting_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e2f7a0bce2873c78, []int{0, 0}
return file_sync_settings_proto_rawDescGZIP(), []int{0, 0}
}
type SyncSetting struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Type SyncSetting_Type `protobuf:"varint,1,opt,name=type,proto3,enum=protobuf.SyncSetting_Type" json:"type,omitempty"`
Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"`
// Types that are valid to be assigned to Value:
// Types that are assignable to Value:
//
// *SyncSetting_ValueString
// *SyncSetting_ValueBytes
// *SyncSetting_ValueBool
// *SyncSetting_ValueInt64
Value isSyncSetting_Value `protobuf_oneof:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Value isSyncSetting_Value `protobuf_oneof:"value"`
}
func (m *SyncSetting) Reset() { *m = SyncSetting{} }
func (m *SyncSetting) String() string { return proto.CompactTextString(m) }
func (*SyncSetting) ProtoMessage() {}
func (x *SyncSetting) Reset() {
*x = SyncSetting{}
if protoimpl.UnsafeEnabled {
mi := &file_sync_settings_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SyncSetting) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SyncSetting) ProtoMessage() {}
func (x *SyncSetting) ProtoReflect() protoreflect.Message {
mi := &file_sync_settings_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SyncSetting.ProtoReflect.Descriptor instead.
func (*SyncSetting) Descriptor() ([]byte, []int) {
return fileDescriptor_e2f7a0bce2873c78, []int{0}
return file_sync_settings_proto_rawDescGZIP(), []int{0}
}
func (m *SyncSetting) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SyncSetting.Unmarshal(m, b)
}
func (m *SyncSetting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SyncSetting.Marshal(b, m, deterministic)
}
func (m *SyncSetting) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncSetting.Merge(m, src)
}
func (m *SyncSetting) XXX_Size() int {
return xxx_messageInfo_SyncSetting.Size(m)
}
func (m *SyncSetting) XXX_DiscardUnknown() {
xxx_messageInfo_SyncSetting.DiscardUnknown(m)
}
var xxx_messageInfo_SyncSetting proto.InternalMessageInfo
func (m *SyncSetting) GetType() SyncSetting_Type {
if m != nil {
return m.Type
func (x *SyncSetting) GetType() SyncSetting_Type {
if x != nil {
return x.Type
}
return SyncSetting_UNKNOWN
}
func (m *SyncSetting) GetClock() uint64 {
func (x *SyncSetting) GetClock() uint64 {
if x != nil {
return x.Clock
}
return 0
}
func (m *SyncSetting) GetValue() isSyncSetting_Value {
if m != nil {
return m.Clock
return m.Value
}
return nil
}
func (x *SyncSetting) GetValueString() string {
if x, ok := x.GetValue().(*SyncSetting_ValueString); ok {
return x.ValueString
}
return ""
}
func (x *SyncSetting) GetValueBytes() []byte {
if x, ok := x.GetValue().(*SyncSetting_ValueBytes); ok {
return x.ValueBytes
}
return nil
}
func (x *SyncSetting) GetValueBool() bool {
if x, ok := x.GetValue().(*SyncSetting_ValueBool); ok {
return x.ValueBool
}
return false
}
func (x *SyncSetting) GetValueInt64() int64 {
if x, ok := x.GetValue().(*SyncSetting_ValueInt64); ok {
return x.ValueInt64
}
return 0
}
@ -175,93 +239,125 @@ func (*SyncSetting_ValueBool) isSyncSetting_Value() {}
func (*SyncSetting_ValueInt64) isSyncSetting_Value() {}
func (m *SyncSetting) GetValue() isSyncSetting_Value {
if m != nil {
return m.Value
}
return nil
var File_sync_settings_proto protoreflect.FileDescriptor
var file_sync_settings_proto_rawDesc = []byte{
0x0a, 0x13, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22,
0x8e, 0x05, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12,
0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05,
0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x23, 0x0a, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73,
0x74, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x0a, 0x0b, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48,
0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a,
0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28,
0x08, 0x48, 0x00, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x21,
0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20,
0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6e, 0x74, 0x36,
0x34, 0x22, 0xa3, 0x03, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x55, 0x52, 0x52, 0x45,
0x4e, 0x43, 0x59, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x49, 0x46, 0x5f, 0x52, 0x45, 0x43,
0x45, 0x4e, 0x54, 0x53, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x47, 0x49, 0x46, 0x5f, 0x46, 0x41,
0x56, 0x4f, 0x55, 0x52, 0x49, 0x54, 0x45, 0x53, 0x10, 0x03, 0x12, 0x1f, 0x0a, 0x1b, 0x4d, 0x45,
0x53, 0x53, 0x41, 0x47, 0x45, 0x53, 0x5f, 0x46, 0x52, 0x4f, 0x4d, 0x5f, 0x43, 0x4f, 0x4e, 0x54,
0x41, 0x43, 0x54, 0x53, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x50,
0x52, 0x45, 0x46, 0x45, 0x52, 0x52, 0x45, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x05, 0x12,
0x13, 0x0a, 0x0f, 0x50, 0x52, 0x45, 0x56, 0x49, 0x45, 0x57, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41,
0x43, 0x59, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f,
0x50, 0x49, 0x43, 0x54, 0x55, 0x52, 0x45, 0x53, 0x5f, 0x53, 0x48, 0x4f, 0x57, 0x5f, 0x54, 0x4f,
0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x50, 0x49,
0x43, 0x54, 0x55, 0x52, 0x45, 0x53, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
0x59, 0x10, 0x08, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54,
0x55, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x53, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18,
0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x53, 0x5f, 0x49,
0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x54,
0x49, 0x43, 0x4b, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x53, 0x5f, 0x50, 0x45, 0x4e,
0x44, 0x49, 0x4e, 0x47, 0x10, 0x0b, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45,
0x52, 0x53, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45,
0x52, 0x53, 0x10, 0x0c, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53, 0x50, 0x4c, 0x41, 0x59, 0x5f,
0x4e, 0x41, 0x4d, 0x45, 0x10, 0x0d, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x49, 0x4f, 0x10, 0x0e, 0x12,
0x14, 0x0a, 0x10, 0x4d, 0x4e, 0x45, 0x4d, 0x4f, 0x4e, 0x49, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f,
0x56, 0x45, 0x44, 0x10, 0x0f, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x4e, 0x53, 0x5f, 0x55, 0x53, 0x45,
0x52, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x10, 0x10, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x4e, 0x43, 0x4c,
0x55, 0x44, 0x45, 0x5f, 0x57, 0x41, 0x54, 0x43, 0x48, 0x4f, 0x4e, 0x4c, 0x59, 0x5f, 0x41, 0x43,
0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x11, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func (m *SyncSetting) GetValueString() string {
if x, ok := m.GetValue().(*SyncSetting_ValueString); ok {
return x.ValueString
}
return ""
var (
file_sync_settings_proto_rawDescOnce sync.Once
file_sync_settings_proto_rawDescData = file_sync_settings_proto_rawDesc
)
func file_sync_settings_proto_rawDescGZIP() []byte {
file_sync_settings_proto_rawDescOnce.Do(func() {
file_sync_settings_proto_rawDescData = protoimpl.X.CompressGZIP(file_sync_settings_proto_rawDescData)
})
return file_sync_settings_proto_rawDescData
}
func (m *SyncSetting) GetValueBytes() []byte {
if x, ok := m.GetValue().(*SyncSetting_ValueBytes); ok {
return x.ValueBytes
}
return nil
var file_sync_settings_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_sync_settings_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_sync_settings_proto_goTypes = []interface{}{
(SyncSetting_Type)(0), // 0: protobuf.SyncSetting.Type
(*SyncSetting)(nil), // 1: protobuf.SyncSetting
}
var file_sync_settings_proto_depIdxs = []int32{
0, // 0: protobuf.SyncSetting.type:type_name -> protobuf.SyncSetting.Type
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func (m *SyncSetting) GetValueBool() bool {
if x, ok := m.GetValue().(*SyncSetting_ValueBool); ok {
return x.ValueBool
func init() { file_sync_settings_proto_init() }
func file_sync_settings_proto_init() {
if File_sync_settings_proto != nil {
return
}
return false
}
func (m *SyncSetting) GetValueInt64() int64 {
if x, ok := m.GetValue().(*SyncSetting_ValueInt64); ok {
return x.ValueInt64
if !protoimpl.UnsafeEnabled {
file_sync_settings_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*SyncSetting); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
return 0
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*SyncSetting) XXX_OneofWrappers() []interface{} {
return []interface{}{
file_sync_settings_proto_msgTypes[0].OneofWrappers = []interface{}{
(*SyncSetting_ValueString)(nil),
(*SyncSetting_ValueBytes)(nil),
(*SyncSetting_ValueBool)(nil),
(*SyncSetting_ValueInt64)(nil),
}
}
func init() {
proto.RegisterEnum("protobuf.SyncSetting_Type", SyncSetting_Type_name, SyncSetting_Type_value)
proto.RegisterType((*SyncSetting)(nil), "protobuf.SyncSetting")
}
func init() {
proto.RegisterFile("sync_settings.proto", fileDescriptor_e2f7a0bce2873c78)
}
var fileDescriptor_e2f7a0bce2873c78 = []byte{
// 517 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x92, 0x5f, 0x6f, 0xd3, 0x3c,
0x14, 0xc6, 0x9b, 0xb5, 0x5d, 0xbb, 0xd3, 0x6e, 0xf3, 0xbc, 0xe9, 0x7d, 0xc3, 0x00, 0x2d, 0x8c,
0x9b, 0x5c, 0x05, 0x09, 0x10, 0x37, 0x5c, 0xb9, 0xce, 0xe9, 0x6a, 0x2d, 0xb1, 0x23, 0xdb, 0x69,
0x55, 0x6e, 0x2c, 0x56, 0x95, 0x69, 0xa2, 0x6a, 0xa6, 0x35, 0x43, 0xea, 0x97, 0xe0, 0x4b, 0xf0,
0x45, 0x51, 0x12, 0xca, 0xdf, 0x2b, 0xfb, 0x3c, 0xe7, 0x77, 0x1e, 0x1f, 0x1f, 0x1b, 0x4e, 0x37,
0xdb, 0xf5, 0xc2, 0x6d, 0x96, 0x65, 0x79, 0xb7, 0xbe, 0xdd, 0x44, 0xf7, 0x0f, 0x45, 0x59, 0xd0,
0x7e, 0xbd, 0xdc, 0x3c, 0x7e, 0xba, 0xfc, 0xda, 0x85, 0x81, 0xd9, 0xae, 0x17, 0xa6, 0x01, 0x68,
0x04, 0x9d, 0x72, 0x7b, 0xbf, 0xf4, 0xbd, 0xc0, 0x0b, 0x8f, 0x5e, 0x9f, 0x47, 0x3b, 0x30, 0xfa,
0x0d, 0x8a, 0xec, 0xf6, 0x7e, 0xa9, 0x6b, 0x8e, 0x9e, 0x41, 0x77, 0xb1, 0x2a, 0x16, 0x9f, 0xfd,
0xbd, 0xc0, 0x0b, 0x3b, 0xba, 0x09, 0xe8, 0x4b, 0x18, 0x7e, 0xf9, 0xb8, 0x7a, 0x5c, 0xba, 0x4d,
0xf9, 0x70, 0xb7, 0xbe, 0xf5, 0xdb, 0x81, 0x17, 0x1e, 0x4c, 0x5a, 0x7a, 0x50, 0xab, 0xa6, 0x16,
0xe9, 0x0b, 0x68, 0x42, 0x77, 0xb3, 0x2d, 0x97, 0x1b, 0xbf, 0x13, 0x78, 0xe1, 0x70, 0xd2, 0xd2,
0x50, 0x8b, 0xa3, 0x4a, 0xa3, 0x17, 0x00, 0x3f, 0x90, 0xa2, 0x58, 0xf9, 0xdd, 0xc0, 0x0b, 0xfb,
0x93, 0x96, 0x3e, 0x68, 0x88, 0xa2, 0x58, 0xfd, 0xf2, 0xb8, 0x5b, 0x97, 0xef, 0xde, 0xfa, 0xfb,
0x81, 0x17, 0xb6, 0x7f, 0x7a, 0x88, 0x4a, 0xbb, 0xfc, 0xd6, 0x86, 0x4e, 0xd5, 0x30, 0x1d, 0x40,
0x2f, 0x97, 0xd7, 0x52, 0xcd, 0x24, 0x69, 0xd1, 0x21, 0xf4, 0x79, 0xae, 0x35, 0x4a, 0x3e, 0x27,
0x1e, 0x3d, 0x86, 0xc1, 0x95, 0x18, 0x3b, 0x8d, 0x1c, 0xa5, 0x35, 0x64, 0x8f, 0x52, 0x38, 0xaa,
0x84, 0x31, 0x9b, 0xaa, 0x5c, 0x0b, 0x8b, 0x86, 0xb4, 0xe9, 0x05, 0x3c, 0x4d, 0xd1, 0x18, 0x76,
0x85, 0xc6, 0x8d, 0xb5, 0x4a, 0x1d, 0x57, 0xd2, 0x32, 0x6e, 0x8d, 0x53, 0x32, 0x99, 0x93, 0x4e,
0x55, 0x94, 0x69, 0x1c, 0xa3, 0xd6, 0x18, 0x3b, 0xc9, 0x52, 0x24, 0x5d, 0x7a, 0x0a, 0xc7, 0x99,
0xc6, 0xa9, 0xc0, 0x99, 0xcb, 0xb4, 0x98, 0x32, 0x3e, 0x27, 0xfb, 0xf4, 0x19, 0xf8, 0x99, 0x56,
0x63, 0x91, 0xa0, 0xcb, 0x04, 0xb7, 0xb9, 0x46, 0xe3, 0xcc, 0x44, 0xcd, 0x9c, 0x55, 0xa4, 0x57,
0x9d, 0xf3, 0x4f, 0x76, 0x2a, 0x8c, 0x18, 0x89, 0x44, 0xd8, 0x39, 0xe9, 0xd3, 0xff, 0xe1, 0xd4,
0xa0, 0x8c, 0x9d, 0xb1, 0xcc, 0xe6, 0xc6, 0xe5, 0x59, 0xcc, 0xaa, 0x0e, 0x0f, 0x2a, 0x5f, 0x63,
0x05, 0xbf, 0x46, 0x6d, 0x5c, 0xc6, 0xf8, 0xb5, 0x71, 0x42, 0x1a, 0xcb, 0x92, 0x04, 0x63, 0x02,
0xf4, 0x1c, 0xfe, 0xfb, 0x2b, 0x9b, 0xa1, 0x8c, 0x85, 0xbc, 0x22, 0x83, 0x3f, 0x2a, 0x9b, 0x29,
0xb8, 0x5d, 0x4c, 0x86, 0x94, 0xc0, 0x30, 0x16, 0x26, 0x4b, 0xd8, 0xbc, 0xb9, 0xd6, 0x21, 0xed,
0x41, 0x7b, 0x24, 0x14, 0x39, 0xa2, 0x67, 0x40, 0x52, 0x89, 0xa9, 0x92, 0x82, 0x3b, 0x8d, 0xa9,
0x9a, 0x62, 0x4c, 0x8e, 0xe9, 0x09, 0x1c, 0xa2, 0x34, 0x2e, 0x37, 0xa8, 0xab, 0x02, 0x43, 0x08,
0x7d, 0x0e, 0x4f, 0x84, 0xe4, 0x49, 0x1e, 0xa3, 0x9b, 0x31, 0xcb, 0x27, 0xd5, 0xcc, 0x1c, 0xe3,
0x5c, 0xe5, 0xd2, 0x92, 0x93, 0x51, 0x0f, 0xba, 0xcd, 0xab, 0x1e, 0x7e, 0x18, 0x44, 0xaf, 0xde,
0xef, 0xbe, 0xdd, 0xcd, 0x7e, 0xbd, 0x7b, 0xf3, 0x3d, 0x00, 0x00, 0xff, 0xff, 0x93, 0x18, 0x16,
0x3f, 0xc7, 0x02, 0x00, 0x00,
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_sync_settings_proto_rawDesc,
NumEnums: 1,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_sync_settings_proto_goTypes,
DependencyIndexes: file_sync_settings_proto_depIdxs,
EnumInfos: file_sync_settings_proto_enumTypes,
MessageInfos: file_sync_settings_proto_msgTypes,
}.Build()
File_sync_settings_proto = out.File
file_sync_settings_proto_rawDesc = nil
file_sync_settings_proto_goTypes = nil
file_sync_settings_proto_depIdxs = nil
}

View File

@ -1,300 +1,441 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.29.1
// protoc v3.20.3
// source: url_data.proto
package protobuf
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Community struct {
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
MembersCount uint32 `protobuf:"varint,3,opt,name=members_count,json=membersCount,proto3" json:"members_count,omitempty"`
Color string `protobuf:"bytes,4,opt,name=color,proto3" json:"color,omitempty"`
TagIndices []uint32 `protobuf:"varint,5,rep,packed,name=tag_indices,json=tagIndices,proto3" json:"tag_indices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
MembersCount uint32 `protobuf:"varint,3,opt,name=members_count,json=membersCount,proto3" json:"members_count,omitempty"`
Color string `protobuf:"bytes,4,opt,name=color,proto3" json:"color,omitempty"`
TagIndices []uint32 `protobuf:"varint,5,rep,packed,name=tag_indices,json=tagIndices,proto3" json:"tag_indices,omitempty"`
}
func (m *Community) Reset() { *m = Community{} }
func (m *Community) String() string { return proto.CompactTextString(m) }
func (*Community) ProtoMessage() {}
func (x *Community) Reset() {
*x = Community{}
if protoimpl.UnsafeEnabled {
mi := &file_url_data_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Community) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Community) ProtoMessage() {}
func (x *Community) ProtoReflect() protoreflect.Message {
mi := &file_url_data_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Community.ProtoReflect.Descriptor instead.
func (*Community) Descriptor() ([]byte, []int) {
return fileDescriptor_5f1e15b5f0115710, []int{0}
return file_url_data_proto_rawDescGZIP(), []int{0}
}
func (m *Community) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Community.Unmarshal(m, b)
}
func (m *Community) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Community.Marshal(b, m, deterministic)
}
func (m *Community) XXX_Merge(src proto.Message) {
xxx_messageInfo_Community.Merge(m, src)
}
func (m *Community) XXX_Size() int {
return xxx_messageInfo_Community.Size(m)
}
func (m *Community) XXX_DiscardUnknown() {
xxx_messageInfo_Community.DiscardUnknown(m)
}
var xxx_messageInfo_Community proto.InternalMessageInfo
func (m *Community) GetDisplayName() string {
if m != nil {
return m.DisplayName
func (x *Community) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *Community) GetDescription() string {
if m != nil {
return m.Description
func (x *Community) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *Community) GetMembersCount() uint32 {
if m != nil {
return m.MembersCount
func (x *Community) GetMembersCount() uint32 {
if x != nil {
return x.MembersCount
}
return 0
}
func (m *Community) GetColor() string {
if m != nil {
return m.Color
func (x *Community) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (m *Community) GetTagIndices() []uint32 {
if m != nil {
return m.TagIndices
func (x *Community) GetTagIndices() []uint32 {
if x != nil {
return x.TagIndices
}
return nil
}
type Channel struct {
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Emoji string `protobuf:"bytes,3,opt,name=emoji,proto3" json:"emoji,omitempty"`
Color string `protobuf:"bytes,4,opt,name=color,proto3" json:"color,omitempty"`
Community *Community `protobuf:"bytes,5,opt,name=community,proto3" json:"community,omitempty"`
Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Emoji string `protobuf:"bytes,3,opt,name=emoji,proto3" json:"emoji,omitempty"`
Color string `protobuf:"bytes,4,opt,name=color,proto3" json:"color,omitempty"`
Community *Community `protobuf:"bytes,5,opt,name=community,proto3" json:"community,omitempty"`
Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid,omitempty"`
}
func (m *Channel) Reset() { *m = Channel{} }
func (m *Channel) String() string { return proto.CompactTextString(m) }
func (*Channel) ProtoMessage() {}
func (x *Channel) Reset() {
*x = Channel{}
if protoimpl.UnsafeEnabled {
mi := &file_url_data_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Channel) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Channel) ProtoMessage() {}
func (x *Channel) ProtoReflect() protoreflect.Message {
mi := &file_url_data_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Channel.ProtoReflect.Descriptor instead.
func (*Channel) Descriptor() ([]byte, []int) {
return fileDescriptor_5f1e15b5f0115710, []int{1}
return file_url_data_proto_rawDescGZIP(), []int{1}
}
func (m *Channel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Channel.Unmarshal(m, b)
}
func (m *Channel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Channel.Marshal(b, m, deterministic)
}
func (m *Channel) XXX_Merge(src proto.Message) {
xxx_messageInfo_Channel.Merge(m, src)
}
func (m *Channel) XXX_Size() int {
return xxx_messageInfo_Channel.Size(m)
}
func (m *Channel) XXX_DiscardUnknown() {
xxx_messageInfo_Channel.DiscardUnknown(m)
}
var xxx_messageInfo_Channel proto.InternalMessageInfo
func (m *Channel) GetDisplayName() string {
if m != nil {
return m.DisplayName
func (x *Channel) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *Channel) GetDescription() string {
if m != nil {
return m.Description
func (x *Channel) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *Channel) GetEmoji() string {
if m != nil {
return m.Emoji
func (x *Channel) GetEmoji() string {
if x != nil {
return x.Emoji
}
return ""
}
func (m *Channel) GetColor() string {
if m != nil {
return m.Color
func (x *Channel) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
func (m *Channel) GetCommunity() *Community {
if m != nil {
return m.Community
func (x *Channel) GetCommunity() *Community {
if x != nil {
return x.Community
}
return nil
}
func (m *Channel) GetUuid() string {
if m != nil {
return m.Uuid
func (x *Channel) GetUuid() string {
if x != nil {
return x.Uuid
}
return ""
}
type User struct {
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Color string `protobuf:"bytes,3,opt,name=color,proto3" json:"color,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Color string `protobuf:"bytes,3,opt,name=color,proto3" json:"color,omitempty"`
}
func (m *User) Reset() { *m = User{} }
func (m *User) String() string { return proto.CompactTextString(m) }
func (*User) ProtoMessage() {}
func (x *User) Reset() {
*x = User{}
if protoimpl.UnsafeEnabled {
mi := &file_url_data_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *User) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*User) ProtoMessage() {}
func (x *User) ProtoReflect() protoreflect.Message {
mi := &file_url_data_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use User.ProtoReflect.Descriptor instead.
func (*User) Descriptor() ([]byte, []int) {
return fileDescriptor_5f1e15b5f0115710, []int{2}
return file_url_data_proto_rawDescGZIP(), []int{2}
}
func (m *User) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_User.Unmarshal(m, b)
}
func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_User.Marshal(b, m, deterministic)
}
func (m *User) XXX_Merge(src proto.Message) {
xxx_messageInfo_User.Merge(m, src)
}
func (m *User) XXX_Size() int {
return xxx_messageInfo_User.Size(m)
}
func (m *User) XXX_DiscardUnknown() {
xxx_messageInfo_User.DiscardUnknown(m)
}
var xxx_messageInfo_User proto.InternalMessageInfo
func (m *User) GetDisplayName() string {
if m != nil {
return m.DisplayName
func (x *User) GetDisplayName() string {
if x != nil {
return x.DisplayName
}
return ""
}
func (m *User) GetDescription() string {
if m != nil {
return m.Description
func (x *User) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (m *User) GetColor() string {
if m != nil {
return m.Color
func (x *User) GetColor() string {
if x != nil {
return x.Color
}
return ""
}
type URLData struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Community, Channel, or User
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
}
func (m *URLData) Reset() { *m = URLData{} }
func (m *URLData) String() string { return proto.CompactTextString(m) }
func (*URLData) ProtoMessage() {}
func (x *URLData) Reset() {
*x = URLData{}
if protoimpl.UnsafeEnabled {
mi := &file_url_data_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *URLData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*URLData) ProtoMessage() {}
func (x *URLData) ProtoReflect() protoreflect.Message {
mi := &file_url_data_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use URLData.ProtoReflect.Descriptor instead.
func (*URLData) Descriptor() ([]byte, []int) {
return fileDescriptor_5f1e15b5f0115710, []int{3}
return file_url_data_proto_rawDescGZIP(), []int{3}
}
func (m *URLData) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_URLData.Unmarshal(m, b)
}
func (m *URLData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_URLData.Marshal(b, m, deterministic)
}
func (m *URLData) XXX_Merge(src proto.Message) {
xxx_messageInfo_URLData.Merge(m, src)
}
func (m *URLData) XXX_Size() int {
return xxx_messageInfo_URLData.Size(m)
}
func (m *URLData) XXX_DiscardUnknown() {
xxx_messageInfo_URLData.DiscardUnknown(m)
}
var xxx_messageInfo_URLData proto.InternalMessageInfo
func (m *URLData) GetContent() []byte {
if m != nil {
return m.Content
func (x *URLData) GetContent() []byte {
if x != nil {
return x.Content
}
return nil
}
func init() {
proto.RegisterType((*Community)(nil), "protobuf.Community")
proto.RegisterType((*Channel)(nil), "protobuf.Channel")
proto.RegisterType((*User)(nil), "protobuf.User")
proto.RegisterType((*URLData)(nil), "protobuf.URLData")
var File_url_data_proto protoreflect.FileDescriptor
var file_url_data_proto_rawDesc = []byte{
0x0a, 0x0e, 0x75, 0x72, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0xac, 0x01, 0x0a, 0x09, 0x43,
0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70,
0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a,
0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x67, 0x5f,
0x69, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x0a, 0x74,
0x61, 0x67, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, 0x22, 0xc1, 0x01, 0x0a, 0x07, 0x43, 0x68,
0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73,
0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d,
0x6f, 0x6a, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x6f, 0x6a, 0x69,
0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x31, 0x0a, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e,
0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x52, 0x09,
0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69,
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x61, 0x0a,
0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73,
0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
0x6c, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
0x22, 0x23, 0x0a, 0x07, 0x55, 0x52, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
func init() {
proto.RegisterFile("url_data.proto", fileDescriptor_5f1e15b5f0115710)
var (
file_url_data_proto_rawDescOnce sync.Once
file_url_data_proto_rawDescData = file_url_data_proto_rawDesc
)
func file_url_data_proto_rawDescGZIP() []byte {
file_url_data_proto_rawDescOnce.Do(func() {
file_url_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_url_data_proto_rawDescData)
})
return file_url_data_proto_rawDescData
}
var fileDescriptor_5f1e15b5f0115710 = []byte{
// 295 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x90, 0xb1, 0x4e, 0xeb, 0x30,
0x14, 0x86, 0xe5, 0xdb, 0xa6, 0xbd, 0x39, 0x69, 0x18, 0x4c, 0x07, 0x6f, 0x84, 0x74, 0xc9, 0x14,
0x04, 0x8c, 0x6c, 0x94, 0x05, 0x09, 0x31, 0x58, 0xea, 0xc2, 0x12, 0x39, 0x8e, 0x29, 0x46, 0xb1,
0x1d, 0x39, 0xf6, 0xd0, 0x77, 0xe2, 0x25, 0x78, 0x33, 0x84, 0x93, 0x50, 0x16, 0xb6, 0x4e, 0x3e,
0xff, 0xa7, 0xa3, 0xe3, 0x4f, 0x3f, 0x9c, 0x79, 0xdb, 0x56, 0x0d, 0x73, 0xac, 0xec, 0xac, 0x71,
0x06, 0xff, 0x0f, 0x4f, 0xed, 0x5f, 0xf3, 0x0f, 0x04, 0xf1, 0xd6, 0x28, 0xe5, 0xb5, 0x74, 0x07,
0x7c, 0x09, 0xab, 0x46, 0xf6, 0x5d, 0xcb, 0x0e, 0x95, 0x66, 0x4a, 0x10, 0x94, 0xa1, 0x22, 0xa6,
0xc9, 0xc8, 0x9e, 0x99, 0x12, 0x38, 0x83, 0xa4, 0x11, 0x3d, 0xb7, 0xb2, 0x73, 0xd2, 0x68, 0xf2,
0x6f, 0xdc, 0x38, 0x22, 0xbc, 0x81, 0x54, 0x09, 0x55, 0x0b, 0xdb, 0x57, 0xdc, 0x78, 0xed, 0xc8,
0x2c, 0x43, 0x45, 0x4a, 0x57, 0x23, 0xdc, 0x7e, 0x33, 0xbc, 0x86, 0x88, 0x9b, 0xd6, 0x58, 0x32,
0x0f, 0x07, 0x86, 0x80, 0x2f, 0x20, 0x71, 0x6c, 0x5f, 0x49, 0xdd, 0x48, 0x2e, 0x7a, 0x12, 0x65,
0xb3, 0x22, 0xa5, 0xe0, 0xd8, 0xfe, 0x71, 0x20, 0xf9, 0x27, 0x82, 0xe5, 0xf6, 0x8d, 0x69, 0x2d,
0xda, 0xd3, 0xc8, 0xae, 0x21, 0x12, 0xca, 0xbc, 0xcb, 0x20, 0x19, 0xd3, 0x21, 0xfc, 0x61, 0x77,
0x0d, 0x31, 0x9f, 0xaa, 0x22, 0x51, 0x86, 0x8a, 0xe4, 0xe6, 0xbc, 0x9c, 0x9a, 0x2c, 0x7f, 0x5a,
0xa4, 0xc7, 0x2d, 0x8c, 0x61, 0xee, 0xbd, 0x6c, 0xc8, 0x22, 0xdc, 0x09, 0x73, 0xce, 0x60, 0xbe,
0xeb, 0x85, 0x3d, 0x99, 0xff, 0x60, 0x3a, 0xfb, 0x65, 0x9a, 0x6f, 0x60, 0xb9, 0xa3, 0x4f, 0x0f,
0xcc, 0x31, 0x4c, 0x60, 0xc9, 0x8d, 0x76, 0x42, 0xbb, 0xf0, 0xc1, 0x8a, 0x4e, 0xf1, 0x3e, 0x7d,
0x49, 0xca, 0xab, 0xbb, 0xc9, 0xbf, 0x5e, 0x84, 0xe9, 0xf6, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd1,
0x08, 0xbf, 0x32, 0x2c, 0x02, 0x00, 0x00,
var file_url_data_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_url_data_proto_goTypes = []interface{}{
(*Community)(nil), // 0: protobuf.Community
(*Channel)(nil), // 1: protobuf.Channel
(*User)(nil), // 2: protobuf.User
(*URLData)(nil), // 3: protobuf.URLData
}
var file_url_data_proto_depIdxs = []int32{
0, // 0: protobuf.Channel.community:type_name -> protobuf.Community
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_url_data_proto_init() }
func file_url_data_proto_init() {
if File_url_data_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_url_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Community); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_url_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Channel); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_url_data_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*User); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_url_data_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*URLData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_url_data_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_url_data_proto_goTypes,
DependencyIndexes: file_url_data_proto_depIdxs,
MessageInfos: file_url_data_proto_msgTypes,
}.Build()
File_url_data_proto = out.File
file_url_data_proto_rawDesc = nil
file_url_data_proto_goTypes = nil
file_url_data_proto_depIdxs = nil
}

Some files were not shown because too many files have changed in this diff Show More