mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2025-01-19 02:41:57 +01:00
Set portal disappearing message timer from history sync
This commit is contained in:
parent
9e39ce565b
commit
aacb1d57df
1 changed files with 4 additions and 0 deletions
|
@ -154,6 +154,10 @@ func (user *User) handleHistorySyncConversation(index int, conv *waProto.Convers
|
|||
}
|
||||
|
||||
portal := user.GetPortalByJID(jid)
|
||||
if conv.EphemeralExpiration != nil && portal.ExpirationTime != conv.GetEphemeralExpiration() {
|
||||
portal.ExpirationTime = conv.GetEphemeralExpiration()
|
||||
portal.Update()
|
||||
}
|
||||
// Check if portal is too old or doesn't contain anything we can bridge.
|
||||
if !user.shouldCreatePortalForHistorySync(conv, portal) {
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue