瀏覽代碼

Set portal disappearing message timer from history sync

Tulir Asokan 3 年之前
父節點
當前提交
aacb1d57df
共有 1 個文件被更改,包括 4 次插入0 次删除
  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