Kaynağa Gözat

Set portal disappearing message timer from history sync

Tulir Asokan 3 yıl önce
ebeveyn
işleme
aacb1d57df
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  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)
+	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