fix_: set resendType=datasync from group message edits

This commit is contained in:
Vitaly Vlasov 2024-06-04 13:26:46 +03:00 committed by Vit∀ly Vlasov
parent dfdc1652a2
commit 3abf6d7a4e
1 changed files with 1 additions and 5 deletions

View File

@ -102,16 +102,12 @@ func (m *Messenger) EditMessage(ctx context.Context, request *requests.EditMessa
return nil, err return nil, err
} }
resendType := common.ResendTypeRawMessage
if chat.ChatType == ChatTypeOneToOne {
resendType = common.ResendTypeDataSync
}
rawMessage := common.RawMessage{ rawMessage := common.RawMessage{
LocalChatID: chat.ID, LocalChatID: chat.ID,
Payload: encodedMessage, Payload: encodedMessage,
MessageType: protobuf.ApplicationMetadataMessage_EDIT_MESSAGE, MessageType: protobuf.ApplicationMetadataMessage_EDIT_MESSAGE,
SkipGroupMessageWrap: true, SkipGroupMessageWrap: true,
ResendType: resendType, ResendType: chat.DefaultResendType(),
} }
_, err = m.dispatchMessage(ctx, rawMessage) _, err = m.dispatchMessage(ctx, rawMessage)
if err != nil { if err != nil {