Skip to content

Commit e4bb6db

Browse files
committed
signalmeow: update protobufs
1 parent f5c818b commit e4bb6db

File tree

6 files changed

+153
-87
lines changed

6 files changed

+153
-87
lines changed

pkg/msgconv/from-signal-backup.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ func deleteNil(bodyRange *signalpb.BodyRange) bool {
236236

237237
func backupToSignalBodyRange(from *backuppb.BodyRange) *signalpb.BodyRange {
238238
var out signalpb.BodyRange
239-
out.Start = from.Start
240-
out.Length = from.Length
239+
out.Start = &from.Start
240+
out.Length = &from.Length
241241
switch av := from.AssociatedValue.(type) {
242242
case *backuppb.BodyRange_MentionAci:
243243
// TODO confirm this is correct

pkg/signalmeow/backup.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,16 @@ func (acp *archiveChunkProcessor) processFrame(frame *backuppb.Frame) error {
197197
acp.cli.Log.Trace().Any("backup_frame", frame).Msg("Processing backup frame")
198198
switch item := frame.Item.(type) {
199199
case *backuppb.Frame_Recipient:
200+
if item.Recipient.Destination == nil {
201+
zerolog.Ctx(acp.ctx).Debug().Msg("Ignoring recipient frame with no destination")
202+
return nil
203+
}
200204
return acp.cli.Store.BackupStore.AddBackupRecipient(acp.ctx, item.Recipient)
201205
case *backuppb.Frame_Chat:
202206
return acp.cli.Store.BackupStore.AddBackupChat(acp.ctx, item.Chat)
203207
case *backuppb.Frame_ChatItem:
204208
switch item.ChatItem.Item.(type) {
205-
case *backuppb.ChatItem_DirectStoryReplyMessage, *backuppb.ChatItem_UpdateMessage:
209+
case *backuppb.ChatItem_DirectStoryReplyMessage, *backuppb.ChatItem_UpdateMessage, nil:
206210
zerolog.Ctx(acp.ctx).Debug().
207211
Uint64("chat_id", item.ChatItem.ChatId).
208212
Uint64("message_id", item.ChatItem.DateSent).

0 commit comments

Comments
 (0)