forked from Mirrors/gomuks
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
|
const CurrentHTMLSanitizerVersion = 3
|
||||||
|
|
||||||
func (h *HiClient) ReprocessExistingEvent(ctx context.Context, evt *database.Event) {
|
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
|
return
|
||||||
}
|
}
|
||||||
evt.LocalContent, _ = h.calculateLocalContent(ctx, evt, evt.AsRawMautrix())
|
evt.LocalContent, _ = h.calculateLocalContent(ctx, evt, evt.AsRawMautrix())
|
||||||
|
|
Loading…
Add table
Reference in a new issue