Use resend automatically for datasync
This commit is contained in:
parent
c88df6c1c7
commit
e89e36b081
|
@ -160,7 +160,7 @@ func (p *MessageProcessor) sendPrivate(
|
|||
|
||||
messageID := v1protocol.MessageID(&p.identity.PublicKey, wrappedMessage)
|
||||
|
||||
if p.featureFlags.Datasync {
|
||||
if p.featureFlags.Datasync && rawMessage.ResendAutomatically {
|
||||
if err := p.addToDataSync(recipient, wrappedMessage); err != nil {
|
||||
return nil, errors.Wrap(err, "failed to send message with datasync")
|
||||
}
|
||||
|
|
|
@ -1201,10 +1201,11 @@ func (m *Messenger) ReSendChatMessage(ctx context.Context, messageID string) err
|
|||
}
|
||||
|
||||
_, err = m.dispatchMessage(ctx, &common.RawMessage{
|
||||
LocalChatID: chat.ID,
|
||||
Payload: message.Payload,
|
||||
MessageType: message.MessageType,
|
||||
Recipients: message.Recipients,
|
||||
LocalChatID: chat.ID,
|
||||
Payload: message.Payload,
|
||||
MessageType: message.MessageType,
|
||||
Recipients: message.Recipients,
|
||||
ResendAutomatically: message.ResendAutomatically,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
@ -1402,9 +1403,10 @@ func (m *Messenger) SendChatMessage(ctx context.Context, message *Message) (*Mes
|
|||
}
|
||||
|
||||
id, err := m.dispatchMessage(ctx, &common.RawMessage{
|
||||
LocalChatID: chat.ID,
|
||||
Payload: encodedMessage,
|
||||
MessageType: protobuf.ApplicationMetadataMessage_CHAT_MESSAGE,
|
||||
LocalChatID: chat.ID,
|
||||
Payload: encodedMessage,
|
||||
MessageType: protobuf.ApplicationMetadataMessage_CHAT_MESSAGE,
|
||||
ResendAutomatically: true,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue