chore(identity)_: remove old social links implementation (#5214)

This commit is contained in:
Mikhail Rogachev 2024-05-24 10:35:34 +02:00 committed by GitHub
parent 49b6ef4aaf
commit 4f493a533e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
33 changed files with 309 additions and 1358 deletions

View File

@ -1 +1 @@
0.179.8
0.179.9

View File

@ -12,7 +12,6 @@ import (
"github.com/status-im/status-go/multiaccounts/common"
"github.com/status-im/status-go/multiaccounts/settings"
notificationssettings "github.com/status-im/status-go/multiaccounts/settings_notifications"
sociallinkssettings "github.com/status-im/status-go/multiaccounts/settings_social_links"
walletsettings "github.com/status-im/status-go/multiaccounts/settings_wallet"
"github.com/status-im/status-go/nodecfg"
"github.com/status-im/status-go/params"
@ -289,7 +288,6 @@ func (a *Keypair) Operability() AccountOperable {
type Database struct {
settings.DatabaseSettingsManager
*notificationssettings.NotificationsSettings
*sociallinkssettings.SocialLinksSettings
*walletsettings.WalletSettings
db *sql.DB
}
@ -305,10 +303,9 @@ func NewDB(db *sql.DB) (*Database, error) {
return nil, err
}
sn := notificationssettings.NewNotificationsSettings(db)
ssl := sociallinkssettings.NewSocialLinksSettings(db)
sw := walletsettings.NewWalletSettings(db)
return &Database{sDB, sn, ssl, sw, db}, nil
return &Database{sDB, sn, sw, db}, nil
}
// DB Gets db sql.DB

View File

@ -1,143 +0,0 @@
package sociallinkssettings
import (
"context"
"database/sql"
"errors"
"github.com/status-im/status-go/protocol/identity"
)
const (
MaxNumOfSocialLinks = 20
)
var (
ErrNilSocialLinkProvided = errors.New("social links, nil object provided")
ErrOlderSocialLinksProvided = errors.New("older social links provided")
)
type SocialLinksSettings struct {
db *sql.DB
}
func NewSocialLinksSettings(db *sql.DB) *SocialLinksSettings {
return &SocialLinksSettings{
db: db,
}
}
func (s *SocialLinksSettings) getSocialLinksClock(tx *sql.Tx) (result uint64, err error) {
query := "SELECT social_links FROM settings_sync_clock WHERE synthetic_id = 'id'"
if tx == nil {
err = s.db.QueryRow(query).Scan(&result)
} else {
err = tx.QueryRow(query).Scan(&result)
}
return result, err
}
func (s *SocialLinksSettings) getSocialLinks(tx *sql.Tx) (identity.SocialLinks, error) {
var (
rows *sql.Rows
err error
)
query := "SELECT text, url FROM profile_social_links ORDER BY position ASC"
if tx == nil {
rows, err = s.db.Query(query)
} else {
rows, err = tx.Query(query)
}
if err != nil {
return nil, err
}
defer rows.Close()
var socialLinks identity.SocialLinks
for rows.Next() {
socialLink := &identity.SocialLink{}
err := rows.Scan(&socialLink.Text, &socialLink.URL)
if err != nil {
return nil, err
}
socialLinks = append(socialLinks, socialLink)
}
err = rows.Err()
if err != nil {
return nil, err
}
return socialLinks, nil
}
func (s *SocialLinksSettings) GetSocialLinks() (identity.SocialLinks, error) {
return s.getSocialLinks(nil)
}
func (s *SocialLinksSettings) GetSocialLinksClock() (result uint64, err error) {
return s.getSocialLinksClock(nil)
}
func (s *SocialLinksSettings) AddOrReplaceSocialLinksIfNewer(links identity.SocialLinks, clock uint64) error {
tx, err := s.db.BeginTx(context.Background(), &sql.TxOptions{})
if err != nil {
return err
}
defer func() {
if err == nil {
err = tx.Commit()
return
}
_ = tx.Rollback()
}()
dbClock, err := s.getSocialLinksClock(tx)
if err != nil {
return err
}
if dbClock > clock {
return ErrOlderSocialLinksProvided
}
dbLinks, err := s.getSocialLinks(tx)
if err != nil {
return err
}
if len(dbLinks) > 0 {
_, err = tx.Exec("DELETE from profile_social_links")
if err != nil {
return err
}
}
stmt, err := tx.Prepare("INSERT INTO profile_social_links (text, url, position) VALUES (?, ?, ?)")
if err != nil {
return err
}
defer stmt.Close()
for position, link := range links {
if link == nil {
return ErrNilSocialLinkProvided
}
_, err = stmt.Exec(
link.Text,
link.URL,
position,
)
if err != nil {
return err
}
}
stmt, err = tx.Prepare("UPDATE settings_sync_clock SET social_links = ? WHERE synthetic_id = 'id'")
if err != nil {
return err
}
_, err = stmt.Exec(clock)
return err
}

View File

@ -1,236 +0,0 @@
package sociallinkssettings
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/appdatabase"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/t/helpers"
)
func openTestDB(t *testing.T) (*SocialLinksSettings, func()) {
db, stop, err := helpers.SetupTestSQLDB(appdatabase.DbInitializer{}, "settings-social-links-tests-")
if err != nil {
require.NoError(t, stop())
}
require.NoError(t, err)
socialLinkSettings := NewSocialLinksSettings(db)
if err != nil {
require.NoError(t, stop())
}
require.NoError(t, err)
return socialLinkSettings, func() {
require.NoError(t, stop())
}
}
func profileSocialLinks() identity.SocialLinks {
return identity.SocialLinks{
{
Text: identity.TwitterID,
URL: "https://twitter.com/ethstatus",
},
{
Text: identity.TwitterID,
URL: "https://twitter.com/StatusIMBlog",
},
{
Text: identity.TelegramID,
URL: "dummy.telegram",
},
{
Text: identity.YoutubeID,
URL: "https://www.youtube.com/@Statusim",
},
{
Text: identity.YoutubeID,
URL: "https://www.youtube.com/@EthereumProtocol",
},
{
Text: "customLink",
URL: "customLink.com",
},
}
}
func TestProfileSocialLinksSaveAndGet(t *testing.T) {
socialLinkSettings, stop := openTestDB(t)
defer stop()
// db is empty at the beginning
links, err := socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, 0)
clock := uint64(1)
// add profile social links with new clock
profileSocialLinks1 := profileSocialLinks()[:2]
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks1, clock)
require.NoError(t, err)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, len(profileSocialLinks1))
require.True(t, profileSocialLinks1.Equal(links))
oldClock := uint64(0)
// delete add profile social links with old clock
profileSocialLinks2 := profileSocialLinks()
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks2, oldClock)
require.Error(t, err)
require.Equal(t, err, ErrOlderSocialLinksProvided)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, len(profileSocialLinks1))
require.True(t, profileSocialLinks1.Equal(links))
// check clock
dbClock, err := socialLinkSettings.GetSocialLinksClock()
require.NoError(t, err)
require.Equal(t, clock, dbClock)
}
func TestProfileSocialLinksUpdate(t *testing.T) {
socialLinkSettings, stop := openTestDB(t)
defer stop()
// db is empty at the beginning
links, err := socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, 0)
clock := uint64(1)
// add profile social links
profileSocialLinks := profileSocialLinks()
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, clock)
require.NoError(t, err)
clock = 2
// test social link update
updateLinkAtIndex := 2
profileSocialLinks[updateLinkAtIndex].Text = identity.GithubID
profileSocialLinks[updateLinkAtIndex].URL = "https://github.com/status-im"
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, clock)
require.NoError(t, err)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, len(profileSocialLinks))
require.True(t, profileSocialLinks.Equal(links))
// check clock
dbClock, err := socialLinkSettings.GetSocialLinksClock()
require.NoError(t, err)
require.Equal(t, clock, dbClock)
}
func TestProfileSocialLinksDelete(t *testing.T) {
socialLinkSettings, stop := openTestDB(t)
defer stop()
// db is empty at the beginning
links, err := socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, 0)
clock := uint64(1)
// add profile social links
profileSocialLinks := profileSocialLinks()
totalLinks := len(profileSocialLinks)
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, clock)
require.NoError(t, err)
// check
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, totalLinks)
require.True(t, profileSocialLinks.Equal(links))
// prepare new links to save
removeLinkAtIndex := 2
removedLink := profileSocialLinks[removeLinkAtIndex]
profileSocialLinks = append(profileSocialLinks[:removeLinkAtIndex], profileSocialLinks[removeLinkAtIndex+1:]...)
oldClock := uint64(0)
// test delete with old clock
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, oldClock)
require.Error(t, err)
require.Equal(t, err, ErrOlderSocialLinksProvided)
// check
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, totalLinks)
require.True(t, links.Contains(removedLink))
clock = 2
// test delete link new clock
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, clock)
require.NoError(t, err)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, totalLinks-1)
require.True(t, profileSocialLinks.Equal(links))
require.False(t, links.Contains(removedLink))
// check clock
dbClock, err := socialLinkSettings.GetSocialLinksClock()
require.NoError(t, err)
require.Equal(t, clock, dbClock)
}
func TestProfileSocialLinksReorder(t *testing.T) {
socialLinkSettings, stop := openTestDB(t)
defer stop()
// db is empty at the beginning
links, err := socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, 0)
clock := uint64(1)
// add profile social links
profileSocialLinks := profileSocialLinks()
totalLinks := len(profileSocialLinks)
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, clock)
require.NoError(t, err)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, links, len(profileSocialLinks))
require.True(t, profileSocialLinks.Equal(links))
var randomLinksOrder identity.SocialLinks
for i := len(profileSocialLinks) - 1; i >= 3; i-- {
randomLinksOrder = append(randomLinksOrder, profileSocialLinks[i])
}
randomLinksOrder = append(randomLinksOrder, profileSocialLinks[:3]...)
clock = 2
// test reorder links
err = socialLinkSettings.AddOrReplaceSocialLinksIfNewer(randomLinksOrder, clock)
require.NoError(t, err)
// check social links
links, err = socialLinkSettings.GetSocialLinks()
require.NoError(t, err)
require.Len(t, randomLinksOrder, totalLinks)
require.True(t, randomLinksOrder.Equal(links))
// check clock
dbClock, err := socialLinkSettings.GetSocialLinksClock()
require.NoError(t, err)
require.Equal(t, clock, dbClock)
}

View File

@ -15,7 +15,6 @@ import (
multiaccountscommon "github.com/status-im/status-go/multiaccounts/common"
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/verification"
)
@ -113,9 +112,6 @@ type Contact struct {
// Bio - description of the contact (tell us about yourself)
Bio string `json:"bio"`
// Deprecated: use social links from ProfileShowcasePreferences
SocialLinks identity.SocialLinks `json:"socialLinks"`
Images map[string]images.IdentityImage `json:"images"`
Blocked bool `json:"blocked"`
@ -413,9 +409,6 @@ func buildSelfContact(identity *ecdsa.PrivateKey, settings *accounts.Database, m
c.EnsName = *s.PreferredName
}
}
if socialLinks, err := settings.GetSocialLinks(); err != nil {
c.SocialLinks = socialLinks
}
}
if multiAccounts != nil && account != nil {

View File

@ -31,6 +31,15 @@ const (
ProfileShowcaseMembershipStatusNotAMember
)
const (
TwitterID = "__twitter"
PersonalSiteID = "__personal_site"
GithubID = "__github"
YoutubeID = "__youtube"
DiscordID = "__discord"
TelegramID = "__telegram"
)
// Profile showcase preferences
type ProfileShowcaseCommunityPreference struct {

View File

@ -1,95 +0,0 @@
package identity
import (
"encoding/json"
"github.com/status-im/status-go/protocol/protobuf"
)
// static links which need to be decorated by the UI clients
const (
TwitterID = "__twitter"
PersonalSiteID = "__personal_site"
GithubID = "__github"
YoutubeID = "__youtube"
DiscordID = "__discord"
TelegramID = "__telegram"
)
type SocialLink struct {
Text string `json:"text"`
URL string `json:"url"`
}
type SocialLinks []*SocialLink
type SocialLinksInfo struct {
Links []*SocialLink `json:"links"`
Removed bool `json:"removed"`
}
func NewSocialLinks(links []*protobuf.SocialLink) SocialLinks {
res := SocialLinks{}
for _, link := range links {
res = append(res, &SocialLink{Text: link.Text, URL: link.Url})
}
return res
}
func (s *SocialLink) ToProtobuf() *protobuf.SocialLink {
return &protobuf.SocialLink{
Text: s.Text,
Url: s.URL,
}
}
func (s *SocialLink) Equal(link *SocialLink) bool {
return s.Text == link.Text && s.URL == link.URL
}
func (s *SocialLinks) ToProtobuf() []*protobuf.SocialLink {
res := []*protobuf.SocialLink{}
for _, link := range *s {
res = append(res, link.ToProtobuf())
}
return res
}
func (s *SocialLinks) ToSyncProtobuf(clock uint64) *protobuf.SyncSocialLinks {
res := &protobuf.SyncSocialLinks{
Clock: clock,
}
for _, link := range *s {
res.SocialLinks = append(res.SocialLinks, link.ToProtobuf())
}
return res
}
// Equal means the same links at the same order
func (s *SocialLinks) Equal(links SocialLinks) bool {
if len(*s) != len(links) {
return false
}
for i := range *s {
if !(*s)[i].Equal(links[i]) {
return false
}
}
return true
}
func (s *SocialLinks) Contains(link *SocialLink) bool {
if len(*s) == 0 {
return false
}
for _, l := range *s {
if l.Equal(link) {
return true
}
}
return false
}
func (s *SocialLinks) Serialize() ([]byte, error) {
return json.Marshal(*s)
}

View File

@ -1,31 +0,0 @@
package identity
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/status-im/status-go/protocol/protobuf"
)
func TestEquals(t *testing.T) {
socialLinks := SocialLinks{
{
Text: "A",
URL: "B",
},
{
Text: "X",
URL: "Y",
},
}
protobufLinks := []*protobuf.SocialLink{}
transformedLinks := NewSocialLinks(protobufLinks)
require.False(t, socialLinks.Equal(transformedLinks))
protobufLinks = append(protobufLinks, &protobuf.SocialLink{Text: "A", Url: "B"})
protobufLinks = append(protobufLinks, &protobuf.SocialLink{Text: "X", Url: "Y"})
transformedLinks = NewSocialLinks(protobufLinks)
require.True(t, socialLinks.Equal(transformedLinks))
}

View File

@ -38,7 +38,6 @@ import (
"github.com/status-im/status-go/multiaccounts"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"
sociallinkssettings "github.com/status-im/status-go/multiaccounts/settings_social_links"
"github.com/status-im/status-go/protocol/anonmetrics"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/common/shard"
@ -47,7 +46,6 @@ import (
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/encryption/sharedsecret"
"github.com/status-im/status-go/protocol/ens"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/identity/alias"
"github.com/status-im/status-go/protocol/identity/identicon"
"github.com/status-im/status-go/protocol/peersyncing"
@ -1054,17 +1052,12 @@ func (m *Messenger) attachChatIdentity(cca *protobuf.ContactCodeAdvertisement) e
return err
}
socialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return err
}
profileShowcase, err := m.GetProfileShowcaseForSelfIdentity()
if err != nil {
return err
}
identityHash, err := m.getIdentityHash(displayName, bio, img, socialLinks, profileShowcase, multiaccountscommon.IDToColorFallbackToBlue(cca.ChatIdentity.CustomizationColor))
identityHash, err := m.getIdentityHash(displayName, bio, img, profileShowcase, multiaccountscommon.IDToColorFallbackToBlue(cca.ChatIdentity.CustomizationColor))
if err != nil {
return err
}
@ -1141,17 +1134,12 @@ func (m *Messenger) handleStandaloneChatIdentity(chat *Chat) error {
return err
}
socialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return err
}
profileShowcase, err := m.GetProfileShowcaseForSelfIdentity()
if err != nil {
return err
}
identityHash, err := m.getIdentityHash(displayName, bio, img, socialLinks, profileShowcase, multiaccountscommon.IDToColorFallbackToBlue(ci.CustomizationColor))
identityHash, err := m.getIdentityHash(displayName, bio, img, profileShowcase, multiaccountscommon.IDToColorFallbackToBlue(ci.CustomizationColor))
if err != nil {
return err
}
@ -1164,22 +1152,17 @@ func (m *Messenger) handleStandaloneChatIdentity(chat *Chat) error {
return nil
}
func (m *Messenger) getIdentityHash(displayName, bio string, img *images.IdentityImage, socialLinks identity.SocialLinks, profileShowcase *protobuf.ProfileShowcase, customizationColor multiaccountscommon.CustomizationColor) ([]byte, error) {
socialLinksData, err := socialLinks.Serialize()
if err != nil {
return []byte{}, err
}
func (m *Messenger) getIdentityHash(displayName, bio string, img *images.IdentityImage, profileShowcase *protobuf.ProfileShowcase, customizationColor multiaccountscommon.CustomizationColor) ([]byte, error) {
profileShowcaseData, err := proto.Marshal(profileShowcase)
if err != nil {
return []byte{}, err
}
if img == nil {
return crypto.Keccak256([]byte(displayName), []byte(bio), socialLinksData, profileShowcaseData, []byte(customizationColor)), nil
return crypto.Keccak256([]byte(displayName), []byte(bio), profileShowcaseData, []byte(customizationColor)), nil
}
return crypto.Keccak256(img.Payload, []byte(displayName), []byte(bio), socialLinksData, profileShowcaseData, []byte(customizationColor)), nil
return crypto.Keccak256(img.Payload, []byte(displayName), []byte(bio), profileShowcaseData, []byte(customizationColor)), nil
}
// shouldPublishChatIdentity returns true if the last time the ChatIdentity was attached was more than 24 hours ago
@ -1213,17 +1196,12 @@ func (m *Messenger) shouldPublishChatIdentity(chatID string) (bool, error) {
return false, err
}
socialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return false, err
}
profileShowcase, err := m.GetProfileShowcaseForSelfIdentity()
if err != nil {
return false, err
}
identityHash, err := m.getIdentityHash(displayName, bio, img, socialLinks, profileShowcase, m.account.GetCustomizationColor())
identityHash, err := m.getIdentityHash(displayName, bio, img, profileShowcase, m.account.GetCustomizationColor())
if err != nil {
return false, err
}
@ -1253,11 +1231,6 @@ func (m *Messenger) createChatIdentity(context ChatContext) (*protobuf.ChatIdent
return nil, err
}
socialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return nil, err
}
profileShowcase, err := m.GetProfileShowcaseForSelfIdentity()
if err != nil {
return nil, err
@ -1268,7 +1241,6 @@ func (m *Messenger) createChatIdentity(context ChatContext) (*protobuf.ChatIdent
EnsName: "", // TODO add ENS name handling to dedicate PR
DisplayName: displayName,
Description: bio,
SocialLinks: socialLinks.ToProtobuf(),
ProfileShowcase: profileShowcase,
CustomizationColor: m.account.GetCustomizationColorID(),
}
@ -2794,11 +2766,6 @@ func (m *Messenger) SyncDevices(ctx context.Context, ensName, photoPath string,
return err
}
err = m.syncSocialLinks(context.Background(), rawMessageHandler)
if err != nil {
return err
}
err = m.syncProfileShowcasePreferences(context.Background(), rawMessageHandler)
if err != nil {
return err
@ -6011,81 +5978,6 @@ func (m *Messenger) syncDeleteForMeMessage(ctx context.Context, rawMessageDispat
})
}
func (m *Messenger) syncSocialLinks(ctx context.Context, rawMessageDispatcher RawMessageHandler) error {
if !m.hasPairedDevices() {
return nil
}
dbSocialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return err
}
dbClock, err := m.settings.GetSocialLinksClock()
if err != nil {
return err
}
_, chat := m.getLastClockWithRelatedChat()
encodedMessage, err := proto.Marshal(dbSocialLinks.ToSyncProtobuf(dbClock))
if err != nil {
return err
}
rawMessage := common.RawMessage{
LocalChatID: chat.ID,
Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_SYNC_SOCIAL_LINKS,
ResendType: common.ResendTypeDataSync,
}
_, err = rawMessageDispatcher(ctx, rawMessage)
return err
}
func (m *Messenger) HandleSyncSocialLinks(state *ReceivedMessageState, message *protobuf.SyncSocialLinks, statusMessage *v1protocol.StatusMessage) error {
return m.handleSyncSocialLinks(message, func(links identity.SocialLinks) {
state.Response.SocialLinksInfo = &identity.SocialLinksInfo{
Links: links,
Removed: len(links) == 0,
}
})
}
func (m *Messenger) handleSyncSocialLinks(message *protobuf.SyncSocialLinks, callback func(identity.SocialLinks)) error {
if message == nil {
return nil
}
var (
links identity.SocialLinks
err error
)
for _, sl := range message.SocialLinks {
link := &identity.SocialLink{
Text: sl.Text,
URL: sl.Url,
}
err = ValidateSocialLink(link)
if err != nil {
return err
}
links = append(links, link)
}
err = m.settings.AddOrReplaceSocialLinksIfNewer(links, message.Clock)
if err != nil {
if err == sociallinkssettings.ErrOlderSocialLinksProvided {
return nil
}
return err
}
callback(links)
return nil
}
func (m *Messenger) GetDeleteForMeMessages() ([]*protobuf.SyncDeleteForMeMessage, error) {
return m.persistence.GetDeleteForMeMessages()
}

View File

@ -490,21 +490,6 @@ func (m *Messenger) backupProfile(ctx context.Context, clock uint64) ([]*protobu
pictureProtos[i] = p
}
socialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return nil, err
}
socialLinksClock, err := m.settings.GetSocialLinksClock()
if err != nil {
return nil, err
}
syncSocialLinks := &protobuf.SyncSocialLinks{
SocialLinks: socialLinks.ToProtobuf(),
Clock: socialLinksClock,
}
ensUsernameDetails, err := m.getEnsUsernameDetails()
if err != nil {
return nil, err
@ -530,7 +515,6 @@ func (m *Messenger) backupProfile(ctx context.Context, clock uint64) ([]*protobu
DisplayName: displayName,
Pictures: pictureProtos,
DisplayNameClock: displayNameClock,
SocialLinks: syncSocialLinks,
EnsUsernameDetails: ensUsernameDetailProtos,
ProfileShowcasePreferences: ToProfileShowcasePreferencesProto(profileShowcasePreferences),
},

View File

@ -12,7 +12,6 @@ import (
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/communities"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/protobuf"
v1protocol "github.com/status-im/status-go/protocol/v1"
"github.com/status-im/status-go/protocol/wakusync"
@ -174,13 +173,6 @@ func (m *Messenger) handleBackedUpProfile(message *protobuf.BackedUpProfile, bac
}
}
err = m.handleSyncSocialLinks(message.SocialLinks, func(links identity.SocialLinks) {
response.SetSocialLinks(links)
})
if err != nil {
return err
}
profileShowcasePreferences, err := m.saveProfileShowcasePreferencesProto(message.ProfileShowcasePreferences, false)
if err != nil {
return err

View File

@ -7,7 +7,6 @@ import (
"reflect"
"testing"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/wakusync"
"github.com/stretchr/testify/suite"
@ -125,24 +124,6 @@ func (s *MessengerBackupSuite) TestBackupProfile() {
iis := images.SampleIdentityImages()
s.Require().NoError(bob1.multiAccounts.StoreIdentityImages(bob1KeyUID, iis, false))
profileSocialLinks := identity.SocialLinks{
{
Text: identity.TwitterID,
URL: "https://twitter.com/ethstatus",
},
{
Text: identity.TwitterID,
URL: "https://twitter.com/StatusIMBlog",
},
{
Text: identity.GithubID,
URL: "https://github.com/status-im",
},
}
profileSocialLinksClock := uint64(1)
err = bob1.settings.AddOrReplaceSocialLinksIfNewer(profileSocialLinks, profileSocialLinksClock)
s.Require().NoError(err)
bob1EnsUsernameDetail, err := bob1.saveEnsUsernameDetailProto(&protobuf.SyncEnsUsernameDetail{
Clock: 1,
Username: "bob1.eth",
@ -171,14 +152,6 @@ func (s *MessengerBackupSuite) TestBackupProfile() {
s.Require().NoError(err)
s.Require().Equal(imagesExpected, string(jBob1Images))
bob1SocialLinks, err := bob1.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(bob1SocialLinks, len(profileSocialLinks))
bob1SocialLinksClock, err := bob1.settings.GetSocialLinksClock()
s.Require().NoError(err)
s.Require().Equal(profileSocialLinksClock, bob1SocialLinksClock)
bob1EnsUsernameDetails, err := bob1.getEnsUsernameDetails()
s.Require().NoError(err)
s.Require().Equal(1, len(bob1EnsUsernameDetails))
@ -200,14 +173,6 @@ func (s *MessengerBackupSuite) TestBackupProfile() {
s.Require().NoError(err)
s.Require().Equal(expectedEmpty, bob2Images)
bob2SocialLinks, err := bob2.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(bob2SocialLinks, 0)
bob2SocialLinksClock, err := bob2.settings.GetSocialLinksClock()
s.Require().NoError(err)
s.Require().Equal(uint64(0), bob2SocialLinksClock)
bob2EnsUsernameDetails, err := bob2.getEnsUsernameDetails()
s.Require().NoError(err)
s.Require().Equal(0, len(bob2EnsUsernameDetails))
@ -248,15 +213,6 @@ func (s *MessengerBackupSuite) TestBackupProfile() {
s.Require().Equal(bob2Images[0].Payload, bob1Images[0].Payload)
s.Require().Equal(bob2Images[1].Payload, bob1Images[1].Payload)
bob2SocialLinks, err = bob2.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(bob2SocialLinks, len(profileSocialLinks))
s.Require().True(profileSocialLinks.Equal(bob2SocialLinks))
bob2SocialLinksClock, err = bob2.settings.GetSocialLinksClock()
s.Require().NoError(err)
s.Require().Equal(profileSocialLinksClock, bob2SocialLinksClock)
bob2EnsUsernameDetails, err = bob2.getEnsUsernameDetails()
s.Require().NoError(err)
s.Require().Equal(1, len(bob2EnsUsernameDetails))

View File

@ -9,7 +9,6 @@ import (
"github.com/status-im/status-go/images"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/protocol/identity"
)
func TestMessengerContacts(t *testing.T) {
@ -35,7 +34,6 @@ func (s *MessengerContactsTestSuite) Test_SelfContact() {
displayName := "DisplayName_1"
bio := "Bio_1"
ensName := "EnsName_1.eth"
socialLinks := identity.SocialLinks{{Text: identity.TelegramID, URL: "dummy.telegram"}}
identityImages := images.SampleIdentityImages()
identityImagesMap := make(map[string]images.IdentityImage)
@ -83,11 +81,6 @@ func (s *MessengerContactsTestSuite) Test_SelfContact() {
SetIdentityImagesAndWaitForChange(&s.Suite, s.m, timeout, setIdentityImages)
// Set social links. They are applied immediately, no need to wait.
err = s.m.AddOrReplaceSocialLinks(socialLinks)
s.Require().NoError(err)
// Check values
selfContact := s.m.GetContactByID(s.m.IdentityPublicKeyString())
@ -95,6 +88,5 @@ func (s *MessengerContactsTestSuite) Test_SelfContact() {
s.Require().Equal(displayName, selfContact.DisplayName)
s.Require().Equal(bio, selfContact.Bio)
s.Require().Equal(ensName, selfContact.EnsName)
s.Require().Equal(socialLinks, selfContact.SocialLinks)
s.Require().Equal(identityImagesMap, selfContact.Images)
}

View File

@ -28,7 +28,6 @@ import (
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/communities"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/peersyncing"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/requests"
@ -3062,16 +3061,6 @@ func (m *Messenger) HandleChatIdentity(state *ReceivedMessageState, ci *protobuf
contactModified = true
}
socialLinks := identity.NewSocialLinks(ci.SocialLinks)
if err = ValidateSocialLinks(socialLinks); err != nil {
return err
}
if !contact.SocialLinks.Equal(socialLinks) {
contact.SocialLinks = socialLinks
contactModified = true
}
if ci.ProfileShowcase != nil {
err := m.BuildProfileShowcaseFromIdentity(state, ci.ProfileShowcase)
if err != nil {

View File

@ -193,9 +193,6 @@ func (m *Messenger) dispatchToHandler(messageState *ReceivedMessageState, protoB
case protobuf.ApplicationMetadataMessage_SYNC_KEYPAIR:
return m.handleSyncKeypairProtobuf(messageState, protoBytes, msg, filter)
case protobuf.ApplicationMetadataMessage_SYNC_SOCIAL_LINKS:
return m.handleSyncSocialLinksProtobuf(messageState, protoBytes, msg, filter)
case protobuf.ApplicationMetadataMessage_SYNC_ENS_USERNAME_DETAIL:
return m.handleSyncEnsUsernameDetailProtobuf(messageState, protoBytes, msg, filter)
@ -1408,29 +1405,6 @@ func (m *Messenger) handleSyncKeypairProtobuf(messageState *ReceivedMessageState
}
func (m *Messenger) handleSyncSocialLinksProtobuf(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter) error {
m.logger.Info("handling SyncSocialLinks")
if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
m.logger.Warn("not coming from us, ignoring")
return nil
}
p := &protobuf.SyncSocialLinks{}
err := proto.Unmarshal(protoBytes, p)
if err != nil {
return err
}
m.outputToCSV(msg.TransportLayer.Message.Timestamp, msg.ApplicationLayer.ID, messageState.CurrentMessageState.Contact.ID, filter.ContentTopic, filter.ChatID, msg.ApplicationLayer.Type, p)
return m.HandleSyncSocialLinks(messageState, p, msg)
}
func (m *Messenger) handleSyncEnsUsernameDetailProtobuf(messageState *ReceivedMessageState, protoBytes []byte, msg *v1protocol.StatusMessage, filter transport.Filter) error {
m.logger.Info("handling SyncEnsUsernameDetail")

View File

@ -1,7 +1,6 @@
package protocol
import (
"context"
"errors"
"fmt"
"runtime"
@ -10,19 +9,15 @@ import (
utils "github.com/status-im/status-go/common"
"github.com/status-im/status-go/multiaccounts/settings"
sociallinkssettings "github.com/status-im/status-go/multiaccounts/settings_social_links"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/server"
)
const (
maxBioLength = 240
maxSocialLinkTextLength = 24
maxBioLength = 240
)
var ErrInvalidBioLength = errors.New("invalid bio length")
var ErrInvalidSocialLinkTextLength = errors.New("invalid social link text length")
var ErrDisplayNameDupeOfCommunityMember = errors.New("display name duplicates on of community members")
func (m *Messenger) SetDisplayName(displayName string) error {
@ -132,70 +127,6 @@ func (m *Messenger) SetBio(bio string) error {
return m.publishContactCode()
}
func ValidateSocialLinks(socialLinks identity.SocialLinks) error {
for _, link := range socialLinks {
l := link
if err := ValidateSocialLink(l); err != nil {
return err
}
}
return nil
}
func ValidateSocialLink(link *identity.SocialLink) error {
if len(link.Text) > maxSocialLinkTextLength {
return ErrInvalidSocialLinkTextLength
}
return nil
}
func (m *Messenger) AddOrReplaceSocialLinks(socialLinks identity.SocialLinks) error {
if len(socialLinks) > sociallinkssettings.MaxNumOfSocialLinks {
return errors.New("exceeded maximum number of social links")
}
currentSocialLinks, err := m.settings.GetSocialLinks()
if err != nil {
return err
}
if currentSocialLinks.Equal(socialLinks) {
return nil // Do nothing
}
err = ValidateSocialLinks(socialLinks)
if err != nil {
return err
}
err = m.withChatClock(func(chatID string, clock uint64) error {
err = m.settings.AddOrReplaceSocialLinksIfNewer(socialLinks, clock)
if err != nil {
return err
}
m.selfContact.SocialLinks = socialLinks
m.publishSelfContactSubscriptions(&SelfContactChangeEvent{
SocialLinksChanged: true,
})
err = m.syncSocialLinks(context.Background(), m.dispatchMessage)
return err
})
if err != nil {
return err
}
if err = m.resetLastPublishedTimeForChatIdentity(); err != nil {
return err
}
return m.publishContactCode()
}
func (m *Messenger) GetSocialLinks() (identity.SocialLinks, error) {
return m.settings.GetSocialLinks()
}
func (m *Messenger) setInstallationHostname() error {
imd, err := m.getOurInstallationMetadata()
if err != nil {

View File

@ -1,172 +0,0 @@
package protocol
import (
"context"
"errors"
"testing"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/tt"
"github.com/stretchr/testify/suite"
)
func TestMessengerSocialLinksHandlerSuite(t *testing.T) {
suite.Run(t, new(MessengerSocialLinksHandlerSuite))
}
type MessengerSocialLinksHandlerSuite struct {
MessengerBaseTestSuite
}
func profileSocialLinks() identity.SocialLinks {
return identity.SocialLinks{
{
Text: identity.TwitterID,
URL: "https://twitter.com/ethstatus",
},
{
Text: identity.TwitterID,
URL: "https://twitter.com/StatusIMBlog",
},
{
Text: identity.TelegramID,
URL: "dummy.telegram",
},
{
Text: identity.YoutubeID,
URL: "https://www.youtube.com/@Statusim",
},
{
Text: identity.YoutubeID,
URL: "https://www.youtube.com/@EthereumProtocol",
},
{
Text: "customLink",
URL: "customLink.com",
},
}
}
func (s *MessengerSocialLinksHandlerSuite) TestSocialLinks() {
// db is empty for alice
links, err := s.m.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(links, 0)
// Create new device
alicesOtherDevice, err := newMessengerWithKey(s.shh, s.m.identity, s.logger, nil)
s.Require().NoError(err)
// db is empty for alice's other device
links, err = alicesOtherDevice.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(links, 0)
// Pair devices
im1 := &multidevice.InstallationMetadata{
Name: "alice's-other-device",
DeviceType: "alice's-other-device-type",
}
err = alicesOtherDevice.SetInstallationMetadata(alicesOtherDevice.installationID, im1)
s.Require().NoError(err)
response, err := alicesOtherDevice.SendPairInstallation(context.Background(), nil)
s.Require().NoError(err)
s.Require().NotNil(response)
s.Require().Len(response.Chats(), 1)
s.Require().False(response.Chats()[0].Active)
// Wait for the message to reach its destination
response, err = WaitOnMessengerResponse(
s.m,
func(r *MessengerResponse) bool { return len(r.Installations) > 0 },
"installation not received",
)
s.Require().NoError(err)
actualInstallation := response.Installations[0]
s.Require().Equal(alicesOtherDevice.installationID, actualInstallation.ID)
s.Require().NotNil(actualInstallation.InstallationMetadata)
s.Require().Equal("alice's-other-device", actualInstallation.InstallationMetadata.Name)
s.Require().Equal("alice's-other-device-type", actualInstallation.InstallationMetadata.DeviceType)
err = s.m.EnableInstallation(alicesOtherDevice.installationID)
s.Require().NoError(err)
// Set social links on alice's device
profileSocialLinks := profileSocialLinks()
err = s.m.AddOrReplaceSocialLinks(profileSocialLinks)
s.Require().NoError(err)
err = tt.RetryWithBackOff(func() error {
response, err := alicesOtherDevice.RetrieveAll()
if err != nil {
return err
}
if response.SocialLinksInfo == nil ||
len(response.SocialLinksInfo.Links) != len(profileSocialLinks) {
return errors.New("no sync data received")
}
return nil
})
s.Require().NoError(err)
// Check social links on alice's other device
links, err = alicesOtherDevice.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(links, len(profileSocialLinks))
// Delete some social links on alice's device
removeLinkAtIndex := 2
removedLink := profileSocialLinks[removeLinkAtIndex]
profileSocialLinks = append(profileSocialLinks[:removeLinkAtIndex], profileSocialLinks[removeLinkAtIndex+1:]...)
err = s.m.AddOrReplaceSocialLinks(profileSocialLinks)
s.Require().NoError(err)
err = tt.RetryWithBackOff(func() error {
response, err := alicesOtherDevice.RetrieveAll()
if err != nil {
return err
}
if response.SocialLinksInfo == nil ||
len(response.SocialLinksInfo.Links) != len(profileSocialLinks) {
return errors.New("no sync data received")
}
return nil
})
s.Require().NoError(err)
// Check social links on alice's other device
links, err = alicesOtherDevice.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(links, len(profileSocialLinks))
s.Require().False(links.Contains(removedLink))
// Delete all social links on alice's device
profileSocialLinks = identity.SocialLinks{}
err = s.m.AddOrReplaceSocialLinks(profileSocialLinks)
s.Require().NoError(err)
err = tt.RetryWithBackOff(func() error {
response, err := alicesOtherDevice.RetrieveAll()
if err != nil {
return err
}
if response.SocialLinksInfo == nil ||
!response.SocialLinksInfo.Removed {
return errors.New("no sync data received")
}
return nil
})
s.Require().NoError(err)
// Check social links on alice's other device
links, err = alicesOtherDevice.settings.GetSocialLinks()
s.Require().NoError(err)
s.Require().Len(links, 0)
}

View File

@ -19,7 +19,6 @@ import (
"github.com/status-im/status-go/protocol/communities"
"github.com/status-im/status-go/protocol/discord"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/storenodes"
"github.com/status-im/status-go/protocol/verification"
@ -91,7 +90,6 @@ type MessengerResponse struct {
trustStatus map[string]verification.TrustStatus
emojiReactions map[string]*EmojiReaction
savedAddresses map[string]*wallet.SavedAddress
SocialLinksInfo *identity.SocialLinksInfo
ensUsernameDetails []*ensservice.UsernameDetail
updatedProfileShowcaseContactIDs map[string]bool
seenAndUnseenMessages map[string]*SeenUnseenMessages
@ -140,7 +138,6 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
DiscordMessages []*protobuf.DiscordMessage `json:"discordMessages,omitempty"`
DiscordMessageAttachments []*protobuf.DiscordMessageAttachment `json:"discordMessageAtachments,omitempty"`
SavedAddresses []*wallet.SavedAddress `json:"savedAddresses,omitempty"`
SocialLinksInfo *identity.SocialLinksInfo `json:"socialLinksInfo,omitempty"`
EnsUsernameDetails []*ensservice.UsernameDetail `json:"ensUsernameDetails,omitempty"`
UpdatedProfileShowcaseContactIDs []string `json:"updatedProfileShowcaseContactIDs,omitempty"`
SeenAndUnseenMessages []*SeenUnseenMessages `json:"seenAndUnseenMessages,omitempty"`
@ -182,7 +179,6 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
DiscordCategories: r.DiscordCategories,
DiscordChannels: r.DiscordChannels,
DiscordOldestMessageTimestamp: r.DiscordOldestMessageTimestamp,
SocialLinksInfo: r.SocialLinksInfo,
EnsUsernameDetails: r.EnsUsernameDetails(),
UpdatedProfileShowcaseContactIDs: r.GetUpdatedProfileShowcaseContactIDs(),
SeenAndUnseenMessages: r.GetSeenAndUnseenMessages(),
@ -333,7 +329,6 @@ func (r *MessengerResponse) IsEmpty() bool {
len(r.ensUsernameDetails) == 0 &&
r.currentStatus == nil &&
r.activityCenterState == nil &&
r.SocialLinksInfo == nil &&
r.CustomizationColor == ""
}
@ -378,7 +373,6 @@ func (r *MessengerResponse) Merge(response *MessengerResponse) error {
r.AccountsPositions = append(r.AccountsPositions, response.AccountsPositions...)
r.TokenPreferences = append(r.TokenPreferences, response.TokenPreferences...)
r.CollectiblePreferences = append(r.CollectiblePreferences, response.CollectiblePreferences...)
r.SocialLinksInfo = response.SocialLinksInfo
return nil
}

View File

@ -283,7 +283,6 @@ func (s *MessengerStoreNodeRequestSuite) requireCommunitiesEqual(c *communities.
func (s *MessengerStoreNodeRequestSuite) requireContactsEqual(c *Contact, expected *Contact) {
s.Require().Equal(expected.DisplayName, c.DisplayName)
s.Require().Equal(expected.Bio, c.Bio)
s.Require().Equal(expected.SocialLinks, c.SocialLinks)
}
func (s *MessengerStoreNodeRequestSuite) fetchCommunity(m *Messenger, communityShard communities.CommunityShard, expectedCommunity *communities.Community) StoreNodeRequestStats {

View File

@ -253,17 +253,6 @@ func (m *Messenger) HandleSyncRawMessages(rawMessages []*protobuf.RawMessage) er
m.logger.Error("failed to handleSyncSavedAddress when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_SOCIAL_LINKS:
var message protobuf.SyncSocialLinks
err := proto.Unmarshal(rawMessage.GetPayload(), &message)
if err != nil {
return err
}
err = m.HandleSyncSocialLinks(state, &message, nil)
if err != nil {
m.logger.Error("failed to HandleSyncSocialLinks when HandleSyncRawMessages", zap.Error(err))
continue
}
case protobuf.ApplicationMetadataMessage_SYNC_ENS_USERNAME_DETAIL:
var message protobuf.SyncEnsUsernameDetail
err := proto.Unmarshal(rawMessage.GetPayload(), &message)

View File

@ -138,6 +138,7 @@
// 1713169458_update_raw_messages_with_resend_features.up.sql (608B)
// 1715163152_remove_status_community.up.sql (354B)
// 1715163262_rename_peersyncing_group_id_field.up.sql (212B)
// 1716413241_remove_social_links.up.sql (38B)
// README.md (554B)
// doc.go (870B)
@ -2967,6 +2968,26 @@ func _1715163262_rename_peersyncing_group_id_fieldUpSql() (*asset, error) {
return a, nil
}
var __1716413241_remove_social_linksUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\x48\xce\x48\x2c\x89\xcf\x4c\x49\xcd\x2b\xc9\x2c\xa9\x8c\x2f\xce\x4f\xce\x4c\xcc\x89\xcf\xc9\xcc\xcb\x2e\xb6\x06\x04\x00\x00\xff\xff\xe8\x99\x75\xf0\x26\x00\x00\x00")
func _1716413241_remove_social_linksUpSqlBytes() ([]byte, error) {
return bindataRead(
__1716413241_remove_social_linksUpSql,
"1716413241_remove_social_links.up.sql",
)
}
func _1716413241_remove_social_linksUpSql() (*asset, error) {
bytes, err := _1716413241_remove_social_linksUpSqlBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "1716413241_remove_social_links.up.sql", size: 38, mode: os.FileMode(0644), modTime: time.Unix(1700000000, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x50, 0x9c, 0xd6, 0x47, 0xe6, 0xc8, 0xe7, 0x9b, 0xae, 0xaf, 0x43, 0xb0, 0xc5, 0x51, 0x74, 0x1c, 0x3e, 0xa3, 0x2c, 0x28, 0xaf, 0x9, 0x1d, 0x33, 0x8e, 0x82, 0xc0, 0x48, 0x6a, 0x74, 0x5a, 0xd3}}
return a, nil
}
var _readmeMd = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x91\xc1\xce\xd3\x30\x10\x84\xef\x7e\x8a\x91\x7a\x01\xa9\x2a\x8f\xc0\x0d\x71\x82\x03\x48\x1c\xc9\x36\x9e\x36\x96\x1c\x6f\xf0\xae\x93\xe6\xed\x91\xa3\xc2\xdf\xff\x66\xed\xd8\x33\xdf\x78\x4f\xa7\x13\xbe\xea\x06\x57\x6c\x35\x39\x31\xa7\x7b\x15\x4f\x5a\xec\x73\x08\xbf\x08\x2d\x79\x7f\x4a\x43\x5b\x86\x17\xfd\x8c\x21\xea\x56\x5e\x47\x90\x4a\x14\x75\x48\xde\x64\x37\x2c\x6a\x96\xae\x99\x48\x05\xf6\x27\x77\x13\xad\x08\xae\x8a\x51\xe7\x25\xf3\xf1\xa9\x9f\xf9\x58\x58\x2c\xad\xbc\xe0\x8b\x56\xf0\x21\x5d\xeb\x4c\x95\xb3\xae\x84\x60\xd4\xdc\xe6\x82\x5d\x1b\x36\x6d\x39\x62\x92\xf5\xb8\x11\xdb\x92\xd3\x28\xce\xe0\x13\xe1\x72\xcd\x3c\x63\xd4\x65\x87\xae\xac\xe8\xc3\x28\x2e\x67\x44\x66\x3a\x21\x25\xa2\x72\xac\x14\x67\xbc\x84\x9f\x53\x32\x8c\x52\x70\x25\x56\xd6\xfd\x8d\x05\x37\xad\x30\x9d\x9f\xa6\x86\x0f\xcd\x58\x7f\xcf\x34\x93\x3b\xed\x90\x9f\xa4\x1f\xcf\x30\x85\x4d\x07\x58\xaf\x7f\x25\xc4\x9d\xf3\x72\x64\x84\xd0\x7f\xf9\x9b\x3a\x2d\x84\xef\x85\x48\x66\x8d\xd8\x88\x9b\x8c\x8c\x98\x5b\xf6\x74\x14\x4e\x33\x0d\xc9\xe0\x93\x38\xda\x12\xc5\x69\xbd\xe4\xf0\x2e\x7a\x78\x07\x1c\xfe\x13\x9f\x91\x29\x31\x95\x7b\x7f\x62\x59\x37\xb4\xe5\x5e\x25\xfe\x33\xee\xd5\x53\x71\xd6\xda\x3a\xd8\xcb\xde\x2e\xf8\xa1\x90\x55\x53\x0c\xc7\xaa\x0d\xe9\x76\x14\x29\x1c\x7b\x68\xdd\x2f\xe1\x6f\x00\x00\x00\xff\xff\x3c\x0a\xc2\xfe\x2a\x02\x00\x00")
func readmeMdBytes() ([]byte, error) {
@ -3236,8 +3257,9 @@ var _bindata = map[string]func() (*asset, error){
"1713169458_update_raw_messages_with_resend_features.up.sql": _1713169458_update_raw_messages_with_resend_featuresUpSql,
"1715163152_remove_status_community.up.sql": _1715163152_remove_status_communityUpSql,
"1715163262_rename_peersyncing_group_id_field.up.sql": _1715163262_rename_peersyncing_group_id_fieldUpSql,
"README.md": readmeMd,
"doc.go": docGo,
"1716413241_remove_social_links.up.sql": _1716413241_remove_social_linksUpSql,
"README.md": readmeMd,
"doc.go": docGo,
}
// AssetDebug is true if the assets were built with the debug flag enabled.
@ -3424,8 +3446,9 @@ var _bintree = &bintree{nil, map[string]*bintree{
"1713169458_update_raw_messages_with_resend_features.up.sql": {_1713169458_update_raw_messages_with_resend_featuresUpSql, map[string]*bintree{}},
"1715163152_remove_status_community.up.sql": {_1715163152_remove_status_communityUpSql, map[string]*bintree{}},
"1715163262_rename_peersyncing_group_id_field.up.sql": {_1715163262_rename_peersyncing_group_id_fieldUpSql, map[string]*bintree{}},
"README.md": {readmeMd, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
"1716413241_remove_social_links.up.sql": {_1716413241_remove_social_linksUpSql, map[string]*bintree{}},
"README.md": {readmeMd, map[string]*bintree{}},
"doc.go": {docGo, map[string]*bintree{}},
}}
// RestoreAsset restores an asset under the given directory.

View File

@ -0,0 +1 @@
DROP TABLE chat_identity_social_links;

View File

@ -21,7 +21,6 @@ import (
multiaccountscommon "github.com/status-im/status-go/multiaccounts/common"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/services/browsers"
)
@ -716,37 +715,6 @@ func (db sqlitePersistence) Contacts() ([]*Contact, error) {
}
}
// Read social links
for _, contact := range allContacts {
rows, err := db.db.Query(`SELECT link_text, link_url FROM chat_identity_social_links WHERE chat_id = ?`, contact.ID)
if err != nil {
return nil, err
}
defer rows.Close()
for rows.Next() {
var (
text sql.NullString
url sql.NullString
)
err := rows.Scan(
&text, &url,
)
if err != nil {
return nil, err
}
link := &identity.SocialLink{}
if text.Valid {
link.Text = text.String
}
if url.Valid {
link.URL = url.String
}
contact.SocialLinks = append(contact.SocialLinks, link)
}
}
var response []*Contact
for key := range allContacts {
response = append(response, allContacts[key])
@ -894,25 +862,6 @@ func (db sqlitePersistence) UpdateContactChatIdentity(contactID string, chatIden
imagesUpdated = true
}
if clockUpdated && chatIdentity.SocialLinks != nil {
stmt, err := tx.Prepare(`INSERT INTO chat_identity_social_links (chat_id, link_text, link_url) VALUES (?, ?, ?)`)
if err != nil {
return clockUpdated, imagesUpdated, err
}
defer stmt.Close()
for _, link := range chatIdentity.SocialLinks {
_, err = stmt.Exec(
contactID,
link.Text,
link.Url,
)
if err != nil {
return clockUpdated, imagesUpdated, err
}
}
}
return
}

View File

@ -1201,11 +1201,6 @@ func TestUpdateContactChatIdentity(t *testing.T) {
require.Len(t, contacts, 1)
require.Len(t, contacts[0].Images, 0)
require.Len(t, contacts[0].SocialLinks, 2)
require.Equal(t, "Personal Site", contacts[0].SocialLinks[0].Text)
require.Equal(t, "status.im", contacts[0].SocialLinks[0].URL)
require.Equal(t, "Twitter", contacts[0].SocialLinks[1].Text)
require.Equal(t, "Status_ico", contacts[0].SocialLinks[1].URL)
}
func TestRemovedProfileImage(t *testing.T) {

View File

@ -50,42 +50,43 @@ const (
ApplicationMetadataMessage_CHAT_IDENTITY ApplicationMetadataMessage_Type = 24
ApplicationMetadataMessage_COMMUNITY_DESCRIPTION ApplicationMetadataMessage_Type = 25
// 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
ApplicationMetadataMessage_STATUS_UPDATE ApplicationMetadataMessage_Type = 30
ApplicationMetadataMessage_DELETE_MESSAGE ApplicationMetadataMessage_Type = 31
ApplicationMetadataMessage_SYNC_INSTALLATION_COMMUNITY ApplicationMetadataMessage_Type = 32
ApplicationMetadataMessage_ANONYMOUS_METRIC_BATCH ApplicationMetadataMessage_Type = 33
ApplicationMetadataMessage_SYNC_CHAT_REMOVED ApplicationMetadataMessage_Type = 34
ApplicationMetadataMessage_SYNC_CHAT_MESSAGES_READ ApplicationMetadataMessage_Type = 35
ApplicationMetadataMessage_BACKUP ApplicationMetadataMessage_Type = 36
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_READ ApplicationMetadataMessage_Type = 37
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_ACCEPTED ApplicationMetadataMessage_Type = 38
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED ApplicationMetadataMessage_Type = 39
ApplicationMetadataMessage_SYNC_BOOKMARK ApplicationMetadataMessage_Type = 40
ApplicationMetadataMessage_SYNC_CLEAR_HISTORY ApplicationMetadataMessage_Type = 41
ApplicationMetadataMessage_SYNC_SETTING ApplicationMetadataMessage_Type = 42
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
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_JOIN_RESPONSE ApplicationMetadataMessage_Type = 48
ApplicationMetadataMessage_SYNC_COMMUNITY_SETTINGS ApplicationMetadataMessage_Type = 49
ApplicationMetadataMessage_REQUEST_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 50
ApplicationMetadataMessage_ACCEPT_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 51
ApplicationMetadataMessage_DECLINE_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 52
ApplicationMetadataMessage_SYNC_TRUSTED_USER ApplicationMetadataMessage_Type = 53
ApplicationMetadataMessage_SYNC_VERIFICATION_REQUEST ApplicationMetadataMessage_Type = 54
ApplicationMetadataMessage_SYNC_CONTACT_REQUEST_DECISION ApplicationMetadataMessage_Type = 56
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_LEAVE ApplicationMetadataMessage_Type = 57
ApplicationMetadataMessage_SYNC_DELETE_FOR_ME_MESSAGE ApplicationMetadataMessage_Type = 58
ApplicationMetadataMessage_SYNC_SAVED_ADDRESS ApplicationMetadataMessage_Type = 59
ApplicationMetadataMessage_COMMUNITY_CANCEL_REQUEST_TO_JOIN ApplicationMetadataMessage_Type = 60
ApplicationMetadataMessage_CANCEL_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 61
ApplicationMetadataMessage_SYNC_KEYPAIR ApplicationMetadataMessage_Type = 62
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
ApplicationMetadataMessage_STATUS_UPDATE ApplicationMetadataMessage_Type = 30
ApplicationMetadataMessage_DELETE_MESSAGE ApplicationMetadataMessage_Type = 31
ApplicationMetadataMessage_SYNC_INSTALLATION_COMMUNITY ApplicationMetadataMessage_Type = 32
ApplicationMetadataMessage_ANONYMOUS_METRIC_BATCH ApplicationMetadataMessage_Type = 33
ApplicationMetadataMessage_SYNC_CHAT_REMOVED ApplicationMetadataMessage_Type = 34
ApplicationMetadataMessage_SYNC_CHAT_MESSAGES_READ ApplicationMetadataMessage_Type = 35
ApplicationMetadataMessage_BACKUP ApplicationMetadataMessage_Type = 36
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_READ ApplicationMetadataMessage_Type = 37
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_ACCEPTED ApplicationMetadataMessage_Type = 38
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED ApplicationMetadataMessage_Type = 39
ApplicationMetadataMessage_SYNC_BOOKMARK ApplicationMetadataMessage_Type = 40
ApplicationMetadataMessage_SYNC_CLEAR_HISTORY ApplicationMetadataMessage_Type = 41
ApplicationMetadataMessage_SYNC_SETTING ApplicationMetadataMessage_Type = 42
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
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_JOIN_RESPONSE ApplicationMetadataMessage_Type = 48
ApplicationMetadataMessage_SYNC_COMMUNITY_SETTINGS ApplicationMetadataMessage_Type = 49
ApplicationMetadataMessage_REQUEST_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 50
ApplicationMetadataMessage_ACCEPT_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 51
ApplicationMetadataMessage_DECLINE_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 52
ApplicationMetadataMessage_SYNC_TRUSTED_USER ApplicationMetadataMessage_Type = 53
ApplicationMetadataMessage_SYNC_VERIFICATION_REQUEST ApplicationMetadataMessage_Type = 54
ApplicationMetadataMessage_SYNC_CONTACT_REQUEST_DECISION ApplicationMetadataMessage_Type = 56
ApplicationMetadataMessage_COMMUNITY_REQUEST_TO_LEAVE ApplicationMetadataMessage_Type = 57
ApplicationMetadataMessage_SYNC_DELETE_FOR_ME_MESSAGE ApplicationMetadataMessage_Type = 58
ApplicationMetadataMessage_SYNC_SAVED_ADDRESS ApplicationMetadataMessage_Type = 59
ApplicationMetadataMessage_COMMUNITY_CANCEL_REQUEST_TO_JOIN ApplicationMetadataMessage_Type = 60
ApplicationMetadataMessage_CANCEL_CONTACT_VERIFICATION ApplicationMetadataMessage_Type = 61
ApplicationMetadataMessage_SYNC_KEYPAIR ApplicationMetadataMessage_Type = 62
// Deprecated: Marked as deprecated in application_metadata_message.proto.
ApplicationMetadataMessage_SYNC_SOCIAL_LINKS ApplicationMetadataMessage_Type = 63
ApplicationMetadataMessage_SYNC_ENS_USERNAME_DETAIL ApplicationMetadataMessage_Type = 64
ApplicationMetadataMessage_COMMUNITY_EVENTS_MESSAGE ApplicationMetadataMessage_Type = 67
@ -382,7 +383,7 @@ 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, 0x86,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x8a,
0x16, 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,
@ -392,7 +393,7 @@ var file_application_metadata_message_proto_rawDesc = []byte{
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, 0xf0, 0x14, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a,
0x74, 0x79, 0x70, 0x65, 0x22, 0xf4, 0x14, 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,
@ -502,65 +503,66 @@ var file_application_metadata_message_proto_rawDesc = []byte{
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,
0x43, 0x5f, 0x4b, 0x45, 0x59, 0x50, 0x41, 0x49, 0x52, 0x10, 0x3e, 0x12, 0x19, 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, 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, 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, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f,
0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x49, 0x12, 0x0d, 0x0a, 0x09, 0x53,
0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x10, 0x4a, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x59,
0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54,
0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x4b, 0x12, 0x1f, 0x0a, 0x1b,
0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43, 0x45,
0x4e, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10, 0x4c, 0x12, 0x33, 0x0a,
0x2f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f, 0x43,
0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f,
0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e,
0x10, 0x4d, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x54, 0x4f, 0x4b, 0x45, 0x4e,
0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x53, 0x10, 0x4e, 0x12, 0x1f,
0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c,
0x49, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x4f, 0x12,
0x20, 0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x4c, 0x4c, 0x45, 0x43, 0x54, 0x49,
0x42, 0x4c, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x53, 0x10,
0x50, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x55,
0x53, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x51, 0x12, 0x25, 0x0a, 0x21,
0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x53, 0x48, 0x4f,
0x57, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45,
0x53, 0x10, 0x52, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59,
0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x4e, 0x4f, 0x44,
0x45, 0x53, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x53, 0x12, 0x2c, 0x0a, 0x28, 0x43, 0x4f, 0x4d,
0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x45, 0x56, 0x41, 0x4c, 0x55, 0x41, 0x54,
0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x52, 0x45,
0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x54, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x45, 0x4c, 0x45, 0x54,
0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x4d, 0x45, 0x4d, 0x42,
0x45, 0x52, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x53, 0x10, 0x55, 0x12, 0x1a, 0x0a,
0x16, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54,
0x45, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x10, 0x56, 0x12, 0x25, 0x0a, 0x21, 0x43, 0x4f, 0x4d,
0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f,
0x4e, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x57,
0x22, 0x04, 0x08, 0x0e, 0x10, 0x0e, 0x22, 0x04, 0x08, 0x41, 0x10, 0x41, 0x22, 0x04, 0x08, 0x42,
0x10, 0x42, 0x22, 0x04, 0x08, 0x47, 0x10, 0x47, 0x2a, 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, 0x2a, 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, 0x2a, 0x27, 0x53, 0x59, 0x4e,
0x10, 0x3f, 0x1a, 0x02, 0x08, 0x01, 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, 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, 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, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e,
0x49, 0x54, 0x59, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x4b, 0x45, 0x59, 0x10, 0x49, 0x12,
0x0d, 0x0a, 0x09, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x54, 0x10, 0x4a, 0x12, 0x20,
0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x5f,
0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x4b,
0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54,
0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x10,
0x4c, 0x12, 0x33, 0x0a, 0x2f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49,
0x54, 0x59, 0x5f, 0x43, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e,
0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x44, 0x45, 0x43, 0x49,
0x53, 0x49, 0x4f, 0x4e, 0x10, 0x4d, 0x12, 0x1a, 0x0a, 0x16, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x54,
0x4f, 0x4b, 0x45, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x53,
0x10, 0x4e, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f,
0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x52, 0x44, 0x5f, 0x49, 0x4e, 0x46,
0x4f, 0x10, 0x4f, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x43, 0x4f, 0x4c, 0x4c,
0x45, 0x43, 0x54, 0x49, 0x42, 0x4c, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e,
0x43, 0x45, 0x53, 0x10, 0x50, 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49,
0x54, 0x59, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x4b, 0x49, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x51,
0x12, 0x25, 0x0a, 0x21, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45,
0x5f, 0x53, 0x48, 0x4f, 0x57, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x45, 0x52,
0x45, 0x4e, 0x43, 0x45, 0x53, 0x10, 0x52, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x4f, 0x4d, 0x4d, 0x55,
0x4e, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x5f, 0x53, 0x54, 0x4f, 0x52,
0x45, 0x4e, 0x4f, 0x44, 0x45, 0x53, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x53, 0x12, 0x2c, 0x0a,
0x28, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x45, 0x56, 0x41,
0x4c, 0x55, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e,
0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x54, 0x12, 0x24, 0x0a, 0x20, 0x44,
0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f,
0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x53, 0x10,
0x55, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x55,
0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x10, 0x56, 0x12, 0x25, 0x0a,
0x21, 0x43, 0x4f, 0x4d, 0x4d, 0x55, 0x4e, 0x49, 0x54, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x52, 0x59,
0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4b, 0x45, 0x59, 0x53, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
0x53, 0x54, 0x10, 0x57, 0x22, 0x04, 0x08, 0x0e, 0x10, 0x0e, 0x22, 0x04, 0x08, 0x41, 0x10, 0x41,
0x22, 0x04, 0x08, 0x42, 0x10, 0x42, 0x22, 0x04, 0x08, 0x47, 0x10, 0x47, 0x2a, 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, 0x2a, 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, 0x5f, 0x53,
0x54, 0x41, 0x54, 0x45, 0x2a, 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, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x2a,
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, 0x2a, 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, 0x42, 0x0d, 0x5a, 0x0b, 0x2e,
0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (

View File

@ -76,7 +76,7 @@ message ApplicationMetadataMessage {
COMMUNITY_CANCEL_REQUEST_TO_JOIN = 60;
CANCEL_CONTACT_VERIFICATION = 61;
SYNC_KEYPAIR = 62;
SYNC_SOCIAL_LINKS = 63;
SYNC_SOCIAL_LINKS = 63 [deprecated=true];
SYNC_ENS_USERNAME_DETAIL = 64;
reserved 65;
reserved "SYNC_ACTIVITY_CENTER_NOTIFICATIONS";

View File

@ -90,9 +90,10 @@ type ChatIdentity struct {
// display name is the user set identity
DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// description is the user set description
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
Emoji string `protobuf:"bytes,7,opt,name=emoji,proto3" json:"emoji,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
Color string `protobuf:"bytes,6,opt,name=color,proto3" json:"color,omitempty"`
Emoji string `protobuf:"bytes,7,opt,name=emoji,proto3" json:"emoji,omitempty"`
// Deprecated: Marked as deprecated in chat_identity.proto.
SocialLinks []*SocialLink `protobuf:"bytes,8,rep,name=social_links,json=socialLinks,proto3" json:"social_links,omitempty"`
// first known message timestamp in seconds (valid only for community chats for now)
// 0 - unknown
@ -183,6 +184,7 @@ func (x *ChatIdentity) GetEmoji() string {
return ""
}
// Deprecated: Marked as deprecated in chat_identity.proto.
func (x *ChatIdentity) GetSocialLinks() []*SocialLink {
if x != nil {
return x.SocialLinks
@ -360,7 +362,7 @@ var file_chat_identity_proto_rawDesc = []byte{
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, 0x1a, 0x16, 0x70, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x04, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x49, 0x64, 0x65,
0x72, 0x6f, 0x74, 0x6f, 0x22, 0xac, 0x04, 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,
@ -375,51 +377,51 @@ var file_chat_identity_proto_rawDesc = []byte{
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,
0x6f, 0x6a, 0x69, 0x12, 0x3b, 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, 0x12, 0x44, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f,
0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x66, 0x69,
0x6c, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x75,
0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69,
0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 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,
0xb7, 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, 0x38, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0b, 0x69,
0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 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,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x42,
0x02, 0x18, 0x01, 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, 0x12, 0x44, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x50, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x52, 0x0f, 0x70,
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x12, 0x2f,
0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x63, 0x75, 0x73,
0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 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, 0xb7, 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, 0x38, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x6f,
0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 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,
}
var (

View File

@ -27,7 +27,7 @@ message ChatIdentity {
string emoji = 7;
repeated SocialLink social_links = 8;
repeated SocialLink social_links = 8 [deprecated = true];
// first known message timestamp in seconds (valid only for community chats for now)
// 0 - unknown
@ -35,8 +35,8 @@ message ChatIdentity {
uint32 first_message_timestamp = 9;
ProfileShowcase profile_showcase = 10;
uint32 customization_color = 11;
uint32 customization_color = 11;
}
// ProfileImage represents data associated with a user's profile image

View File

@ -3212,10 +3212,11 @@ type BackedUpProfile struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
KeyUid string `protobuf:"bytes,1,opt,name=key_uid,json=keyUid,proto3" json:"key_uid,omitempty"`
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
DisplayNameClock uint64 `protobuf:"varint,3,opt,name=display_name_clock,json=displayNameClock,proto3" json:"display_name_clock,omitempty"`
Pictures []*SyncProfilePicture `protobuf:"bytes,4,rep,name=pictures,proto3" json:"pictures,omitempty"`
KeyUid string `protobuf:"bytes,1,opt,name=key_uid,json=keyUid,proto3" json:"key_uid,omitempty"`
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
DisplayNameClock uint64 `protobuf:"varint,3,opt,name=display_name_clock,json=displayNameClock,proto3" json:"display_name_clock,omitempty"`
Pictures []*SyncProfilePicture `protobuf:"bytes,4,rep,name=pictures,proto3" json:"pictures,omitempty"`
// Deprecated: Marked as deprecated in pairing.proto.
SocialLinks *SyncSocialLinks `protobuf:"bytes,5,opt,name=social_links,json=socialLinks,proto3" json:"social_links,omitempty"`
EnsUsernameDetails []*SyncEnsUsernameDetail `protobuf:"bytes,6,rep,name=ens_username_details,json=ensUsernameDetails,proto3" json:"ens_username_details,omitempty"`
ProfileShowcasePreferences *SyncProfileShowcasePreferences `protobuf:"bytes,7,opt,name=profile_showcase_preferences,json=profileShowcasePreferences,proto3" json:"profile_showcase_preferences,omitempty"`
@ -3281,6 +3282,7 @@ func (x *BackedUpProfile) GetPictures() []*SyncProfilePicture {
return nil
}
// Deprecated: Marked as deprecated in pairing.proto.
func (x *BackedUpProfile) GetSocialLinks() *SyncSocialLinks {
if x != nil {
return x.SocialLinks
@ -3508,6 +3510,7 @@ func (x *SyncKeycard) GetPosition() uint64 {
return 0
}
// Deprecated: Marked as deprecated in pairing.proto.
type SyncSocialLinks struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -4657,7 +4660,7 @@ var file_pairing_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x49, 0x64, 0x22,
0x2c, 0x0a, 0x0e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
0x73, 0x12, 0x0c, 0x0a, 0x08, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12,
0x0c, 0x0a, 0x08, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x01, 0x22, 0xb2, 0x03,
0x0c, 0x0a, 0x08, 0x44, 0x45, 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x01, 0x22, 0xb6, 0x03,
0x0a, 0x0f, 0x42, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x55, 0x70, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x55, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69,
@ -4669,102 +4672,103 @@ var file_pairing_proto_rawDesc = []byte{
0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f,
0x66, 0x69, 0x6c, 0x65, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x52, 0x08, 0x70, 0x69, 0x63,
0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x5f,
0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0c, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x5f,
0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6f, 0x63, 0x69, 0x61,
0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x0b, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x4c, 0x69,
0x6e, 0x6b, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x65, 0x6e, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e,
0x61, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e,
0x63, 0x45, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x44, 0x65, 0x74, 0x61,
0x69, 0x6c, 0x52, 0x12, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x44,
0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6a, 0x0a, 0x1c, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c,
0x65, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x66,
0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0b, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x51, 0x0a, 0x14, 0x65, 0x6e, 0x73, 0x5f, 0x75,
0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18,
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x12, 0x65, 0x6e, 0x73, 0x55, 0x73, 0x65, 0x72, 0x6e,
0x61, 0x6d, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x6a, 0x0a, 0x1c, 0x70, 0x72,
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x70,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x28, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x79, 0x6e, 0x63,
0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x50,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x1a, 0x70, 0x72, 0x6f, 0x66,
0x69, 0x6c, 0x65, 0x53, 0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x1a, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x53,
0x68, 0x6f, 0x77, 0x63, 0x61, 0x73, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x73, 0x22, 0x73, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 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, 0x4b, 0x0a, 0x0b, 0x6d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 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, 0x0b, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0e, 0x53, 0x79, 0x6e, 0x63,
0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x72, 0x61,
0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52, 0x61, 0x77, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x14, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4a, 0x73, 0x6f,
0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x11, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42,
0x79, 0x74, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x4b, 0x65, 0x79,
0x63, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f,
0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x6b,
0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x55, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x60, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x6f, 0x63,
0x69, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x73, 0x6f, 0x63, 0x69,
0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 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, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x88, 0x01, 0x0a, 0x1d, 0x53, 0x79, 0x6e, 0x63,
0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x75,
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74,
0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79,
0x5f, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x55,
0x69, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f,
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76,
0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69,
0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69,
0x74, 0x79, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d,
0x75, 0x6e, 0x69, 0x74, 0x79, 0x49, 0x64, 0x22, 0x84, 0x01, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
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, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74,
0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
0x73, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x74,
0x0a, 0x16, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03,
0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69,
0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x73,
0x69, 0x62, 0x6c, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
0x63, 0x65, 0x73, 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, 0x74, 0x65, 0x73,
0x74, 0x6e, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x74, 0x65, 0x73, 0x74,
0x6e, 0x65, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x50,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42, 0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x73, 0x0a, 0x0a, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73,
0x73, 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, 0x4b,
0x0a, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 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, 0x0b,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0e,
0x53, 0x79, 0x6e, 0x63, 0x52, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x36,
0x0a, 0x0b, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x52,
0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x0b, 0x72, 0x61, 0x77, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x73, 0x75, 0x62, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x11, 0x73, 0x65,
0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4a, 0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x4a,
0x73, 0x6f, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x0b, 0x53, 0x79, 0x6e,
0x63, 0x4b, 0x65, 0x79, 0x63, 0x61, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x69,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x55, 0x69, 0x64, 0x12,
0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03,
0x28, 0x0c, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x1a, 0x0a,
0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52,
0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x64, 0x0a, 0x0f, 0x53, 0x79, 0x6e,
0x63, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x37, 0x0a, 0x0c,
0x73, 0x6f, 0x63, 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x01, 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, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02,
0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x02, 0x18, 0x01, 0x22,
0x88, 0x01, 0x0a, 0x1d, 0x53, 0x79, 0x6e, 0x63, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x43,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f,
0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
0x12, 0x2f, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63,
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6c, 0x6f,
0x72, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x79, 0x55, 0x69, 0x64, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x0a,
0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x6f, 0x73, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x20, 0x0a,
0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x49, 0x64, 0x22,
0x84, 0x01, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x65,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 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, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x07, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x12, 0x3c, 0x0a, 0x0b, 0x70, 0x72, 0x65, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72,
0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x74, 0x0a, 0x16, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
0x74, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x22, 0x90, 0x01, 0x0a,
0x1a, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x62, 0x6c, 0x65,
0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 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, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
0x28, 0x08, 0x52, 0x07, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x12, 0x42, 0x0a, 0x0b, 0x70,
0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x43, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x73, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x42,
0x0d, 0x5a, 0x0b, 0x2e, 0x2f, 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -390,7 +390,7 @@ message BackedUpProfile {
string display_name = 2;
uint64 display_name_clock = 3;
repeated SyncProfilePicture pictures = 4;
SyncSocialLinks social_links = 5;
SyncSocialLinks social_links = 5 [deprecated = true];
repeated SyncEnsUsernameDetail ens_username_details = 6;
SyncProfileShowcasePreferences profile_showcase_preferences = 7;
}
@ -420,6 +420,7 @@ message SyncKeycard {
message SyncSocialLinks {
repeated SocialLink social_links = 1;
uint64 clock = 2;
option deprecated = true;
}
message SyncAccountCustomizationColor {

View File

@ -7,10 +7,8 @@ import (
)
type BackedUpProfile struct {
DisplayName string `json:"displayName,omitempty"`
Images []images.IdentityImage `json:"images,omitempty"`
// Deprecated: use social links from ProfileShowcasePreferences
SocialLinks []*identity.SocialLink `json:"socialLinks,omitempty"`
DisplayName string `json:"displayName,omitempty"`
Images []images.IdentityImage `json:"images,omitempty"`
EnsUsernameDetails []*ens.UsernameDetail `json:"ensUsernameDetails,omitempty"`
ProfileShowcasePreferences identity.ProfileShowcasePreferences `json:"profile_showcase_preferences,omitempty"`
}
@ -23,11 +21,6 @@ func (sfwr *WakuBackedUpDataResponse) SetImages(images []images.IdentityImage) {
sfwr.Profile.Images = images
}
// Deprecated: use social links from ProfileShowcasePreferences
func (sfwr *WakuBackedUpDataResponse) SetSocialLinks(socialLinks []*identity.SocialLink) {
sfwr.Profile.SocialLinks = socialLinks
}
func (sfwr *WakuBackedUpDataResponse) SetEnsUsernameDetails(ensUsernameDetails []*ens.UsernameDetail) {
sfwr.Profile.EnsUsernameDetails = ensUsernameDetails
}

View File

@ -32,7 +32,6 @@ import (
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/identity"
"github.com/status-im/status-go/protocol/identity/alias"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/requests"
@ -319,10 +318,7 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsSender() {
URL: "https://status.im",
})
require.NoError(s.T(), err)
// generate social link
socialLinksToAdd := identity.SocialLinks{{Text: identity.GithubID, URL: socialLinkURL}}
err = clientBackend.Messenger().AddOrReplaceSocialLinks(socialLinksToAdd)
require.NoError(s.T(), err)
// generate ens username
err = clientBackend.StatusNode().EnsService().API().Add(ctx, ensChainID, ensUsername)
require.NoError(s.T(), err)
@ -351,14 +347,12 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsSender() {
// check that the server has the same data as the client
serverBrowserAPI := serverBackend.StatusNode().BrowserService().APIs()[0].Service.(*browsers.API)
bookmarks, err := serverBrowserAPI.GetBookmarks(ctx)
require.NoError(s.T(), err)
require.Equal(s.T(), 1, len(bookmarks))
require.Equal(s.T(), "status.im", bookmarks[0].Name)
serverSocialLinks, err := serverBackend.Messenger().GetSocialLinks()
require.NoError(s.T(), err)
require.Equal(s.T(), 1, len(serverSocialLinks))
require.True(s.T(), socialLinksToAdd.Equal(serverSocialLinks))
uds, err := serverBackend.StatusNode().EnsService().API().GetEnsUsernames(ctx)
require.NoError(s.T(), err)
require.Equal(s.T(), 1, len(uds))
@ -366,6 +360,7 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsSender() {
require.Equal(s.T(), uint64(ensChainID), uds[0].ChainID)
require.False(s.T(), uds[0].Removed)
require.Greater(s.T(), uds[0].Clock, uint64(0))
serverProfileShowcasePreferences, err := serverBackend.Messenger().GetProfileShowcasePreferences()
require.NoError(s.T(), err)
require.True(s.T(), reflect.DeepEqual(profileShowcasePreferences, serverProfileShowcasePreferences))
@ -383,6 +378,7 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsSender() {
err = clientMessenger.DisableInstallation(serverNodeConfig.ShhextConfig.InstallationID)
require.NoError(s.T(), err)
require.False(s.T(), clientMessenger.HasPairedDevices())
clientNodeConfig, err := clientBackend.GetNodeConfig()
require.NoError(s.T(), err)
err = serverMessenger.DisableInstallation(clientNodeConfig.ShhextConfig.InstallationID)
@ -443,11 +439,8 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsReceiver() {
})
require.NoError(s.T(), err)
// generate social link
serverMessenger := serverBackend.Messenger()
socialLinksToAdd := identity.SocialLinks{{Text: identity.GithubID, URL: socialLinkURL}}
err = serverMessenger.AddOrReplaceSocialLinks(socialLinksToAdd)
require.NoError(s.T(), err)
// generate ens username
err = serverBackend.StatusNode().EnsService().API().Add(ctx, ensChainID, ensUsername)
require.NoError(s.T(), err)
@ -500,11 +493,6 @@ func (s *SyncDeviceSuite) TestPairingSyncDeviceClientAsReceiver() {
require.Equal(s.T(), 1, len(bookmarks))
require.Equal(s.T(), "status.im", bookmarks[0].Name)
clientSocialLinks, err := clientMessenger.GetSocialLinks()
require.NoError(s.T(), err)
require.Equal(s.T(), 1, len(clientSocialLinks))
require.True(s.T(), socialLinksToAdd.Equal(clientSocialLinks))
clientProfileShowcasePreferences, err := clientMessenger.GetProfileShowcasePreferences()
require.NoError(s.T(), err)
require.True(s.T(), reflect.DeepEqual(profileShowcasePreferences, clientProfileShowcasePreferences))

View File

@ -2,14 +2,12 @@ package accounts
import (
"context"
"errors"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"
"github.com/status-im/status-go/nodecfg"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/protocol"
"github.com/status-im/status-go/protocol/identity"
)
func NewSettingsAPI(messenger **protocol.Messenger, db *accounts.Database, config *params.NodeConfig) *SettingsAPI {
@ -171,25 +169,6 @@ func (api *SettingsAPI) SetBio(bio string) error {
return (*api.messenger).SetBio(bio)
}
// Deprecated: use social links from ProfileShowcasePreferences
func (api *SettingsAPI) GetSocialLinks() (identity.SocialLinks, error) {
return api.db.GetSocialLinks()
}
// Deprecated: use social links from ProfileShowcasePreferences
func (api *SettingsAPI) AddOrReplaceSocialLinks(links identity.SocialLinks) error {
for _, link := range links {
if len(link.Text) == 0 {
return errors.New("`Text` field of a social link must be set")
}
if len(link.URL) == 0 {
return errors.New("`URL` field of a social link must be set")
}
}
return (*api.messenger).AddOrReplaceSocialLinks(links)
}
func (api *SettingsAPI) MnemonicWasShown() error {
return api.db.MnemonicWasShown()
}