mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
hicli/sync: allow reprocessing encrypted event html
This commit is contained in:
parent
9d96ed1b12
commit
27f1d0f3e4
1 changed files with 2 additions and 1 deletions
|
@ -391,7 +391,8 @@ func (h *HiClient) calculateLocalContent(ctx context.Context, dbEvt *database.Ev
|
|||
const CurrentHTMLSanitizerVersion = 3
|
||||
|
||||
func (h *HiClient) ReprocessExistingEvent(ctx context.Context, evt *database.Event) {
|
||||
if evt.Type != event.EventMessage.Type || evt.LocalContent == nil || evt.LocalContent.HTMLVersion >= CurrentHTMLSanitizerVersion {
|
||||
if (evt.Type != event.EventMessage.Type && evt.DecryptedType != event.EventMessage.Type) ||
|
||||
evt.LocalContent == nil || evt.LocalContent.HTMLVersion >= CurrentHTMLSanitizerVersion {
|
||||
return
|
||||
}
|
||||
evt.LocalContent, _ = h.calculateLocalContent(ctx, evt, evt.AsRawMautrix())
|
||||
|
|
Loading…
Add table
Reference in a new issue