forked from MirrorHub/mautrix-whatsapp
batch send: fix plaintext content
Co-authored-by: Tulir Asokan <tulir@maunium.net>
This commit is contained in:
parent
a8be4b11a8
commit
173edfaaf1
1 changed files with 9 additions and 0 deletions
|
@ -532,6 +532,15 @@ func (portal *Portal) wrapBatchEvent(info *types.MessageInfo, intent *appservice
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if eventType == event.EventEncrypted {
|
||||
// Clear other custom keys if the event was encrypted, but keep the double puppet identifier
|
||||
wrappedContent.Raw = map[string]interface{}{backfillIDField: info.ID}
|
||||
if intent.IsCustomPuppet {
|
||||
wrappedContent.Raw[doublePuppetKey] = doublePuppetValue
|
||||
}
|
||||
}
|
||||
|
||||
return &event.Event{
|
||||
Sender: intent.UserID,
|
||||
Type: newEventType,
|
||||
|
|
Loading…
Reference in a new issue