Browse Source

Set portal disappearing message timer from history sync

Tulir Asokan 3 years ago
parent
commit
aacb1d57df
1 changed files with 4 additions and 0 deletions
  1. 4 0
      historysync.go

+ 4 - 0
historysync.go

@@ -154,6 +154,10 @@ func (user *User) handleHistorySyncConversation(index int, conv *waProto.Convers
 	}
 	}
 
 
 	portal := user.GetPortalByJID(jid)
 	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.
 	// Check if portal is too old or doesn't contain anything we can bridge.
 	if !user.shouldCreatePortalForHistorySync(conv, portal) {
 	if !user.shouldCreatePortalForHistorySync(conv, portal) {
 		return
 		return