fix_: set resendType=datasync from group message edits
This commit is contained in:
parent
dfdc1652a2
commit
3abf6d7a4e
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue