Skip to content

Commit

Permalink
hicli/sync: allow reprocessing encrypted event html
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Oct 21, 2024
1 parent 9d96ed1 commit 27f1d0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/hicli/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 27f1d0f

Please sign in to comment.