Sync clear history

This commit is contained in:
frank 2022-02-10 18:00:59 +08:00 committed by Andrea Maria Piana
parent 66d511e33f
commit 07b9c3c7de
11 changed files with 542 additions and 98 deletions

View File

@ -1 +1 @@
0.94.2 0.94.3

View File

@ -1298,6 +1298,55 @@ func (db sqlitePersistence) deleteMessagesByChatID(id string, tx *sql.Tx) (err e
return return
} }
func (db sqlitePersistence) deleteMessagesByChatIDAndClockValueLessThanOrEqual(id string, clock uint64, tx *sql.Tx) (unViewedMessages, unViewedMentions uint, err error) {
if tx == nil {
tx, err = db.db.BeginTx(context.Background(), &sql.TxOptions{})
if err != nil {
return 0, 0, err
}
defer func() {
if err == nil {
err = tx.Commit()
return
}
// don't shadow original error
_ = tx.Rollback()
}()
}
_, err = tx.Exec(`DELETE FROM user_messages WHERE local_chat_id = ? AND clock_value <= ?`, id, clock)
if err != nil {
return
}
_, err = tx.Exec(`DELETE FROM pin_messages WHERE local_chat_id = ? AND clock_value <= ?`, id, clock)
if err != nil {
return
}
_, err = tx.Exec(
`UPDATE chats
SET unviewed_message_count =
(SELECT COUNT(1)
FROM user_messages
WHERE local_chat_id = ? AND seen = 0),
unviewed_mentions_count =
(SELECT COUNT(1)
FROM user_messages
WHERE local_chat_id = ? AND seen = 0 AND mentioned),
highlight = 0
WHERE id = ?`, id, id, id)
if err != nil {
return 0, 0, err
}
err = tx.QueryRow(`SELECT unviewed_message_count, unviewed_mentions_count FROM chats
WHERE id = ?`, id).Scan(&unViewedMessages, &unViewedMentions)
return
}
func (db sqlitePersistence) MarkAllRead(chatID string, clock uint64) (int64, int64, error) { func (db sqlitePersistence) MarkAllRead(chatID string, clock uint64) (int64, int64, error) {
tx, err := db.db.BeginTx(context.Background(), &sql.TxOptions{}) tx, err := db.db.BeginTx(context.Background(), &sql.TxOptions{})
if err != nil { if err != nil {
@ -1719,6 +1768,27 @@ func (db sqlitePersistence) ClearHistory(chat *Chat, currentClockValue uint64) (
return return
} }
func (db sqlitePersistence) ClearHistoryFromSyncMessage(chat *Chat, currentClockValue uint64) (err error) {
var tx *sql.Tx
tx, err = db.db.BeginTx(context.Background(), &sql.TxOptions{})
if err != nil {
return
}
defer func() {
if err == nil {
err = tx.Commit()
return
}
// don't shadow original error
_ = tx.Rollback()
}()
err = db.clearHistoryFromSyncMessage(chat, currentClockValue, tx)
return
}
// Deactivate chat sets a chat as inactive and clear its history // Deactivate chat sets a chat as inactive and clear its history
func (db sqlitePersistence) DeactivateChat(chat *Chat, currentClockValue uint64) (err error) { func (db sqlitePersistence) DeactivateChat(chat *Chat, currentClockValue uint64) (err error) {
var tx *sql.Tx var tx *sql.Tx
@ -1829,3 +1899,27 @@ func (db sqlitePersistence) clearHistory(chat *Chat, currentClockValue uint64, t
err = db.saveChat(tx, *chat) err = db.saveChat(tx, *chat)
return err return err
} }
func (db sqlitePersistence) clearHistoryFromSyncMessage(chat *Chat, clearedAt uint64, tx *sql.Tx) error {
chat.DeletedAtClockValue = clearedAt
// Reset synced-to/from
syncedTo := uint32(clearedAt / 1000)
chat.SyncedTo = syncedTo
chat.SyncedFrom = 0
unViewedMessagesCount, unViewedMentionsCount, err := db.deleteMessagesByChatIDAndClockValueLessThanOrEqual(chat.ID, clearedAt, tx)
if err != nil {
return err
}
chat.UnviewedMessagesCount = unViewedMessagesCount
chat.UnviewedMentionsCount = unViewedMentionsCount
if chat.LastMessage != nil && chat.LastMessage.Clock <= clearedAt {
chat.LastMessage = nil
}
err = db.saveChat(tx, *chat)
return err
}

View File

@ -2456,6 +2456,13 @@ func (m *Messenger) SyncDevices(ctx context.Context, ensName, photoPath string)
} }
} }
if isPublicChat && chat.Active && chat.DeletedAtClockValue > 0 {
err = m.syncClearHistory(ctx, chat)
if err != nil {
return false
}
}
return true return true
}) })
if err != nil { if err != nil {
@ -2578,6 +2585,37 @@ func (m *Messenger) syncPublicChat(ctx context.Context, publicChat *Chat) error
return m.saveChat(chat) return m.saveChat(chat)
} }
func (m *Messenger) syncClearHistory(ctx context.Context, publicChat *Chat) error {
var err error
if !m.hasPairedDevices() {
return nil
}
clock, chat := m.getLastClockWithRelatedChat()
syncMessage := &protobuf.SyncClearHistory{
ChatId: publicChat.ID,
ClearedAt: publicChat.DeletedAtClockValue,
}
encodedMessage, err := proto.Marshal(syncMessage)
if err != nil {
return err
}
_, err = m.dispatchMessage(ctx, common.RawMessage{
LocalChatID: chat.ID,
Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_SYNC_CLEAR_HISTORY,
ResendAutomatically: true,
})
if err != nil {
return err
}
chat.LastClockValue = clock
return m.saveChat(chat)
}
func (m *Messenger) syncChatRemoving(ctx context.Context, id string) error { func (m *Messenger) syncChatRemoving(ctx context.Context, id string) error {
var err error var err error
if !m.hasPairedDevices() { if !m.hasPairedDevices() {
@ -3045,6 +3083,21 @@ func (m *Messenger) handleRetrievedMessages(chatWithMessages map[transport.Filte
continue continue
} }
case protobuf.SyncClearHistory:
if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
logger.Warn("not coming from us, ignoring")
continue
}
p := msg.ParsedMessage.Interface().(protobuf.SyncClearHistory)
logger.Debug("Handling SyncClearHistory", zap.Any("message", p))
err = m.handleSyncClearHistory(messageState, p)
if err != nil {
logger.Warn("failed to handle SyncClearHistory", zap.Error(err))
allMessagesProcessed = false
continue
}
case protobuf.Backup: case protobuf.Backup:
if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) { if !common.IsPubKeyEqual(messageState.CurrentMessageState.PublicKey, &m.identity.PublicKey) {
logger.Warn("not coming from us, ignoring") logger.Warn("not coming from us, ignoring")
@ -5063,3 +5116,35 @@ func (m *Messenger) getSettings() (accounts.Settings, error) {
sDB := accounts.NewDB(m.database) sDB := accounts.NewDB(m.database)
return sDB.GetSettings() return sDB.GetSettings()
} }
func (m *Messenger) handleSyncClearHistory(state *ReceivedMessageState, message protobuf.SyncClearHistory) error {
chatID := message.ChatId
existingChat, ok := state.AllChats.Load(chatID)
if !ok {
return ErrChatNotFound
}
if existingChat.DeletedAtClockValue >= message.ClearedAt {
return nil
}
err := m.persistence.ClearHistoryFromSyncMessage(existingChat, message.ClearedAt)
if err != nil {
return err
}
if existingChat.Public() {
err = m.transport.ClearProcessedMessageIDsCache()
if err != nil {
return err
}
}
state.AllChats.Store(chatID, existingChat)
state.Response.AddChat(existingChat)
state.Response.AddClearedHistory(&ClearedHistory{
ClearedAt: message.ClearedAt,
ChatID: chatID,
})
return nil
}

View File

@ -558,13 +558,17 @@ func (m *Messenger) clearHistory(id string) (*MessengerResponse, error) {
} }
if chat.Public() { if chat.Public() {
err = m.transport.ClearProcessedMessageIDsCache() err = m.transport.ClearProcessedMessageIDsCache()
if err != nil { if err != nil {
return nil, err return nil, err
} }
} }
err = m.syncClearHistory(context.Background(), chat)
if err != nil {
return nil, err
}
m.allChats.Store(id, chat) m.allChats.Store(id, chat)
response := &MessengerResponse{} response := &MessengerResponse{}

View File

@ -16,6 +16,11 @@ type RemovedMessage struct {
MessageID string `json:"messageId"` MessageID string `json:"messageId"`
} }
type ClearedHistory struct {
ChatID string `json:"chatId"`
ClearedAt uint64 `json:"clearedAt"`
}
type MessengerResponse struct { type MessengerResponse struct {
Contacts []*Contact Contacts []*Contact
Installations []*multidevice.Installation Installations []*multidevice.Installation
@ -38,6 +43,7 @@ type MessengerResponse struct {
pinMessages map[string]*common.PinMessage pinMessages map[string]*common.PinMessage
currentStatus *UserStatus currentStatus *UserStatus
statusUpdates map[string]UserStatus statusUpdates map[string]UserStatus
clearedHistories map[string]*ClearedHistory
} }
func (r *MessengerResponse) MarshalJSON() ([]byte, error) { func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
@ -54,6 +60,7 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
CommunityChanges []*communities.CommunityChanges `json:"communityChanges,omitempty"` CommunityChanges []*communities.CommunityChanges `json:"communityChanges,omitempty"`
RequestsToJoinCommunity []*communities.RequestToJoin `json:"requestsToJoinCommunity,omitempty"` RequestsToJoinCommunity []*communities.RequestToJoin `json:"requestsToJoinCommunity,omitempty"`
Mailservers []mailservers.Mailserver `json:"mailservers,omitempty"` Mailservers []mailservers.Mailserver `json:"mailservers,omitempty"`
ClearedHistories []*ClearedHistory `json:"clearedHistories,omitempty"`
// Notifications a list of notifications derived from messenger events // Notifications a list of notifications derived from messenger events
// that are useful to notify the user about // that are useful to notify the user about
Notifications []*localnotifications.Notification `json:"notifications"` Notifications []*localnotifications.Notification `json:"notifications"`
@ -78,6 +85,7 @@ func (r *MessengerResponse) MarshalJSON() ([]byte, error) {
responseItem.Communities = r.Communities() responseItem.Communities = r.Communities()
responseItem.RemovedChats = r.RemovedChats() responseItem.RemovedChats = r.RemovedChats()
responseItem.RemovedMessages = r.RemovedMessages() responseItem.RemovedMessages = r.RemovedMessages()
responseItem.ClearedHistories = r.ClearedHistories()
responseItem.ActivityCenterNotifications = r.ActivityCenterNotifications() responseItem.ActivityCenterNotifications = r.ActivityCenterNotifications()
responseItem.PinMessages = r.PinMessages() responseItem.PinMessages = r.PinMessages()
responseItem.StatusUpdates = r.StatusUpdates() responseItem.StatusUpdates = r.StatusUpdates()
@ -109,6 +117,14 @@ func (r *MessengerResponse) RemovedMessages() []*RemovedMessage {
return messages return messages
} }
func (r *MessengerResponse) ClearedHistories() []*ClearedHistory {
var clearedHistories []*ClearedHistory
for chatID := range r.clearedHistories {
clearedHistories = append(clearedHistories, r.clearedHistories[chatID])
}
return clearedHistories
}
func (r *MessengerResponse) Communities() []*communities.Community { func (r *MessengerResponse) Communities() []*communities.Community {
var communities []*communities.Community var communities []*communities.Community
for _, c := range r.communities { for _, c := range r.communities {
@ -147,6 +163,7 @@ func (r *MessengerResponse) IsEmpty() bool {
len(r.messages)+ len(r.messages)+
len(r.pinMessages)+ len(r.pinMessages)+
len(r.Contacts)+ len(r.Contacts)+
len(r.clearedHistories)+
len(r.Installations)+ len(r.Installations)+
len(r.Invitations)+ len(r.Invitations)+
len(r.EmojiReactions)+ len(r.EmojiReactions)+
@ -172,6 +189,7 @@ func (r *MessengerResponse) Merge(response *MessengerResponse) error {
len(response.RequestsToJoinCommunity)+ len(response.RequestsToJoinCommunity)+
len(response.Mailservers)+ len(response.Mailservers)+
len(response.EmojiReactions)+ len(response.EmojiReactions)+
len(response.clearedHistories)+
len(response.CommunityChanges) != 0 { len(response.CommunityChanges) != 0 {
return ErrNotImplemented return ErrNotImplemented
} }
@ -267,6 +285,17 @@ func (r *MessengerResponse) AddRemovedMessage(rm *RemovedMessage) {
} }
} }
func (r *MessengerResponse) AddClearedHistory(ch *ClearedHistory) {
if r.clearedHistories == nil {
r.clearedHistories = make(map[string]*ClearedHistory)
}
existingClearedHistory, ok := r.clearedHistories[ch.ChatID]
if !ok || existingClearedHistory.ClearedAt < ch.ClearedAt {
r.clearedHistories[ch.ChatID] = ch
}
}
func (r *MessengerResponse) AddActivityCenterNotifications(ns []*ActivityCenterNotification) { func (r *MessengerResponse) AddActivityCenterNotifications(ns []*ActivityCenterNotification) {
for _, n := range ns { for _, n := range ns {
r.AddActivityCenterNotification(n) r.AddActivityCenterNotification(n)

View File

@ -0,0 +1,169 @@
package protocol
import (
"context"
"crypto/ecdsa"
"errors"
"testing"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/requests"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/protocol/encryption/multidevice"
"github.com/status-im/status-go/protocol/tt"
"github.com/status-im/status-go/waku"
"github.com/stretchr/testify/suite"
"go.uber.org/zap"
"github.com/status-im/status-go/eth-node/types"
)
func TestMessengerSyncClearHistorySuite(t *testing.T) {
suite.Run(t, new(MessengerSyncClearHistory))
}
type MessengerSyncClearHistory struct {
suite.Suite
m *Messenger // main instance of Messenger
privateKey *ecdsa.PrivateKey // private key for the main instance of Messenger
// If one wants to send messages between different instances of Messenger,
// a single Waku service should be shared.
shh types.Waku
logger *zap.Logger
}
func (s *MessengerSyncClearHistory) SetupTest() {
s.logger = tt.MustCreateTestLogger()
config := waku.DefaultConfig
config.MinimumAcceptedPoW = 0
shh := waku.New(&config, s.logger)
s.shh = gethbridge.NewGethWakuWrapper(shh)
s.Require().NoError(shh.Start())
s.m = s.newMessenger(s.shh)
s.privateKey = s.m.identity
// We start the messenger in order to receive installations
_, err := s.m.Start()
s.Require().NoError(err)
}
func (s *MessengerSyncClearHistory) TearDownTest() {
s.Require().NoError(s.m.Shutdown())
}
func (s *MessengerSyncClearHistory) newMessenger(shh types.Waku) *Messenger {
privateKey, err := crypto.GenerateKey()
s.Require().NoError(err)
messenger, err := newMessengerWithKey(s.shh, privateKey, s.logger, nil)
s.Require().NoError(err)
return messenger
}
func (s *MessengerSyncClearHistory) pair() *Messenger {
theirMessenger, err := newMessengerWithKey(s.shh, s.privateKey, s.logger, nil)
s.Require().NoError(err)
err = theirMessenger.SetInstallationMetadata(theirMessenger.installationID, &multidevice.InstallationMetadata{
Name: "their-name",
DeviceType: "their-device-type",
})
s.Require().NoError(err)
response, err := theirMessenger.SendPairInstallation(context.Background())
s.Require().NoError(err)
s.Require().NotNil(response)
// 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(theirMessenger.installationID, actualInstallation.ID)
s.Require().NotNil(actualInstallation.InstallationMetadata)
s.Require().Equal("their-name", actualInstallation.InstallationMetadata.Name)
s.Require().Equal("their-device-type", actualInstallation.InstallationMetadata.DeviceType)
err = s.m.EnableInstallation(theirMessenger.installationID)
s.Require().NoError(err)
return theirMessenger
}
func (s *MessengerSyncClearHistory) TestSyncClearHistory() {
theirMessenger := s.pair()
response, err := s.m.CreatePublicChat(&requests.CreatePublicChat{
ID: publicChatName,
})
s.Require().NoError(err)
chat, ok := response.chats[publicChatName]
s.Require().True(ok)
_, err = theirMessenger.CreatePublicChat(&requests.CreatePublicChat{
ID: publicChatName,
})
s.Require().NoError(err)
message := buildTestMessage(*chat)
_, err = s.m.SendChatMessage(context.Background(), message)
s.Require().NoError(err)
var receivedPubChatMessage *common.Message
err = tt.RetryWithBackOff(func() error {
var err error
response, err := theirMessenger.RetrieveAll()
if err != nil {
return err
}
messages := response.Messages()
if len(messages) > 0 {
receivedPubChatMessage = messages[0]
return nil
}
return errors.New("Not received all messages")
})
s.Require().NoError(err)
s.Require().Equal(receivedPubChatMessage.ChatId, publicChatName)
var messages []*common.Message
messages, _, err = s.m.persistence.MessageByChatID(publicChatName, "", 10)
s.Require().NoError(err)
s.Require().True(len(messages) == 1)
messages, _, err = theirMessenger.persistence.MessageByChatID(publicChatName, "", 10)
s.Require().NoError(err)
s.Require().True(len(messages) == 1)
_, err = s.m.ClearHistory(&requests.ClearHistory{
ID: publicChatName,
})
s.Require().NoError(err)
err = tt.RetryWithBackOff(func() error {
response, err = theirMessenger.RetrieveAll()
if err != nil {
return err
}
if len(response.clearedHistories) > 0 {
return nil
}
return errors.New("Not received all clearedHistories")
})
s.Require().NoError(err)
messages, _, err = theirMessenger.persistence.MessageByChatID(publicChatName, "", 10)
s.Require().NoError(err)
s.Require().True(len(messages) == 0)
s.Require().NoError(theirMessenger.Shutdown())
}

View File

@ -63,6 +63,7 @@ const (
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_READ ApplicationMetadataMessage_Type = 37 ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_READ ApplicationMetadataMessage_Type = 37
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_ACCEPTED ApplicationMetadataMessage_Type = 38 ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_ACCEPTED ApplicationMetadataMessage_Type = 38
ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED ApplicationMetadataMessage_Type = 39 ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED ApplicationMetadataMessage_Type = 39
ApplicationMetadataMessage_SYNC_CLEAR_HISTORY ApplicationMetadataMessage_Type = 41
) )
var ApplicationMetadataMessage_Type_name = map[int32]string{ var ApplicationMetadataMessage_Type_name = map[int32]string{
@ -106,6 +107,7 @@ var ApplicationMetadataMessage_Type_name = map[int32]string{
37: "SYNC_ACTIVITY_CENTER_READ", 37: "SYNC_ACTIVITY_CENTER_READ",
38: "SYNC_ACTIVITY_CENTER_ACCEPTED", 38: "SYNC_ACTIVITY_CENTER_ACCEPTED",
39: "SYNC_ACTIVITY_CENTER_DISMISSED", 39: "SYNC_ACTIVITY_CENTER_DISMISSED",
41: "SYNC_CLEAR_HISTORY",
} }
var ApplicationMetadataMessage_Type_value = map[string]int32{ var ApplicationMetadataMessage_Type_value = map[string]int32{
@ -149,6 +151,7 @@ var ApplicationMetadataMessage_Type_value = map[string]int32{
"SYNC_ACTIVITY_CENTER_READ": 37, "SYNC_ACTIVITY_CENTER_READ": 37,
"SYNC_ACTIVITY_CENTER_ACCEPTED": 38, "SYNC_ACTIVITY_CENTER_ACCEPTED": 38,
"SYNC_ACTIVITY_CENTER_DISMISSED": 39, "SYNC_ACTIVITY_CENTER_DISMISSED": 39,
"SYNC_CLEAR_HISTORY": 41,
} }
func (x ApplicationMetadataMessage_Type) String() string { func (x ApplicationMetadataMessage_Type) String() string {
@ -227,48 +230,49 @@ func init() {
} }
var fileDescriptor_ad09a6406fcf24c7 = []byte{ var fileDescriptor_ad09a6406fcf24c7 = []byte{
// 675 bytes of a gzipped FileDescriptorProto // 692 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5b, 0x4f, 0x33, 0x37, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x4d, 0x53, 0x23, 0x37,
0x10, 0x6d, 0xbe, 0x8f, 0x72, 0x99, 0x70, 0x31, 0xe6, 0x16, 0xc2, 0x2d, 0x04, 0x0a, 0xb4, 0x95, 0x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, 0xd6, 0x7e, 0xfe, 0x6d, 0xf8, 0xe9,
0x05, 0x00, 0x00, 0xba, 0x98, 0xcd, 0xfe, 0xfd, 0xfa, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x61, 0x34, 0xbb,
0x61, 0x05, 0x00, 0x00,
} }

View File

@ -53,5 +53,6 @@ message ApplicationMetadataMessage {
SYNC_ACTIVITY_CENTER_READ = 37; SYNC_ACTIVITY_CENTER_READ = 37;
SYNC_ACTIVITY_CENTER_ACCEPTED = 38; SYNC_ACTIVITY_CENTER_ACCEPTED = 38;
SYNC_ACTIVITY_CENTER_DISMISSED = 39; SYNC_ACTIVITY_CENTER_DISMISSED = 39;
SYNC_CLEAR_HISTORY = 41;
} }
} }

View File

@ -934,6 +934,53 @@ func (m *SyncActivityCenterDismissed) GetIds() [][]byte {
return nil return nil
} }
type SyncClearHistory struct {
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
ClearedAt uint64 `protobuf:"varint,2,opt,name=cleared_at,json=clearedAt,proto3" json:"cleared_at,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SyncClearHistory) Reset() { *m = SyncClearHistory{} }
func (m *SyncClearHistory) String() string { return proto.CompactTextString(m) }
func (*SyncClearHistory) ProtoMessage() {}
func (*SyncClearHistory) Descriptor() ([]byte, []int) {
return fileDescriptor_d61ab7221f0b5518, []int{14}
}
func (m *SyncClearHistory) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SyncClearHistory.Unmarshal(m, b)
}
func (m *SyncClearHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SyncClearHistory.Marshal(b, m, deterministic)
}
func (m *SyncClearHistory) XXX_Merge(src proto.Message) {
xxx_messageInfo_SyncClearHistory.Merge(m, src)
}
func (m *SyncClearHistory) XXX_Size() int {
return xxx_messageInfo_SyncClearHistory.Size(m)
}
func (m *SyncClearHistory) XXX_DiscardUnknown() {
xxx_messageInfo_SyncClearHistory.DiscardUnknown(m)
}
var xxx_messageInfo_SyncClearHistory proto.InternalMessageInfo
func (m *SyncClearHistory) GetChatId() string {
if m != nil {
return m.ChatId
}
return ""
}
func (m *SyncClearHistory) GetClearedAt() uint64 {
if m != nil {
return m.ClearedAt
}
return 0
}
func init() { func init() {
proto.RegisterType((*Backup)(nil), "protobuf.Backup") proto.RegisterType((*Backup)(nil), "protobuf.Backup")
proto.RegisterType((*PairInstallation)(nil), "protobuf.PairInstallation") proto.RegisterType((*PairInstallation)(nil), "protobuf.PairInstallation")
@ -949,6 +996,7 @@ func init() {
proto.RegisterType((*SyncActivityCenterRead)(nil), "protobuf.SyncActivityCenterRead") proto.RegisterType((*SyncActivityCenterRead)(nil), "protobuf.SyncActivityCenterRead")
proto.RegisterType((*SyncActivityCenterAccepted)(nil), "protobuf.SyncActivityCenterAccepted") proto.RegisterType((*SyncActivityCenterAccepted)(nil), "protobuf.SyncActivityCenterAccepted")
proto.RegisterType((*SyncActivityCenterDismissed)(nil), "protobuf.SyncActivityCenterDismissed") proto.RegisterType((*SyncActivityCenterDismissed)(nil), "protobuf.SyncActivityCenterDismissed")
proto.RegisterType((*SyncClearHistory)(nil), "protobuf.SyncClearHistory")
} }
func init() { func init() {
@ -956,56 +1004,59 @@ func init() {
} }
var fileDescriptor_d61ab7221f0b5518 = []byte{ var fileDescriptor_d61ab7221f0b5518 = []byte{
// 814 bytes of a gzipped FileDescriptorProto // 850 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0xdd, 0x6e, 0xe3, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x4f, 0x73, 0xdb, 0x44,
0x14, 0x96, 0xe3, 0x34, 0x49, 0x4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 0xbc, 0x8e, 0xa7, 0x7e, 0xdd, 0x4b, 0xb3, 0xf9, 0xdb, 0x15, 0x26, 0x94, 0x96, 0xf8, 0x7d, 0xe8, 0x8a, 0xd8, 0xd1, 0xeb, 0x87, 0xe6, 0x37, 0x78, 0xe9, 0x36, 0x7f, 0x3d,
0xb2, 0x54, 0xb2, 0xc3, 0xab, 0x7c, 0x6d, 0x86, 0x7c, 0xbb, 0xca, 0x25, 0x17, 0x11, 0x17, 0xe2, 0xc3, 0x94, 0x73, 0xcc, 0x35, 0x6e, 0x9f, 0xe5, 0x2b, 0x27, 0xf2, 0xf5, 0x2c, 0x2f, 0x85, 0x4a,
0xf0, 0x32, 0x17, 0xbd, 0x5f, 0xba, 0xe3, 0x8f, 0xce, 0x37, 0x7a, 0xcf, 0x5b, 0xfa, 0xef, 0x93, 0x85, 0x52, 0xff, 0x23, 0xcd, 0x2b, 0xa7, 0xac, 0x59, 0x82, 0xac, 0xf8, 0x46, 0x28, 0x2d, 0x8b,
0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x59, 0x97, 0x1e, 0x7c, 0xa4, 0x08, 0x00, 0x00, 0xaa, 0x2d, 0x60, 0x6f, 0x4d, 0xc0, 0x8f, 0x00, 0xb8, 0x71, 0xc4, 0x38, 0x62, 0xda, 0x72, 0xd2,
0x0b, 0x77, 0x6b, 0x64, 0xaa, 0x4f, 0xc6, 0x3f, 0x8f, 0x8e, 0x3f, 0x7c, 0xb1, 0x9a, 0xdd, 0x59,
0xdf, 0xfe, 0x7d, 0xfc, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9f, 0xa6, 0x11, 0x2d, 0xf0, 0x08,
0x00, 0x00,
} }

View File

@ -104,4 +104,9 @@ message SyncActivityCenterAccepted {
message SyncActivityCenterDismissed { message SyncActivityCenterDismissed {
uint64 clock = 1; uint64 clock = 1;
repeated bytes ids = 2; repeated bytes ids = 2;
}
message SyncClearHistory {
string chat_id = 1;
uint64 cleared_at = 2;
} }

View File

@ -263,6 +263,8 @@ func (m *StatusMessage) HandleApplication() error {
return m.unmarshalProtobufData(new(protobuf.SyncActivityCenterAccepted)) return m.unmarshalProtobufData(new(protobuf.SyncActivityCenterAccepted))
case protobuf.ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED: case protobuf.ApplicationMetadataMessage_SYNC_ACTIVITY_CENTER_DISMISSED:
return m.unmarshalProtobufData(new(protobuf.SyncActivityCenterDismissed)) return m.unmarshalProtobufData(new(protobuf.SyncActivityCenterDismissed))
case protobuf.ApplicationMetadataMessage_SYNC_CLEAR_HISTORY:
return m.unmarshalProtobufData(new(protobuf.SyncClearHistory))
} }
return nil return nil
} }