mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Don't drop unknown events in default syncer
This commit is contained in:
parent
4784d6d09f
commit
5fae50102f
1 changed files with 4 additions and 1 deletions
5
sync.go
5
sync.go
|
|
@ -134,7 +134,10 @@ func NewDefaultSyncer() *DefaultSyncer {
|
|||
globalListeners: []EventHandler{},
|
||||
ParseEventContent: true,
|
||||
ParseErrorHandler: func(evt *event.Event, err error) bool {
|
||||
return false
|
||||
// By default, drop known events that can't be parsed, but let unknown events through
|
||||
return errors.Is(err, event.ErrUnsupportedContentType) ||
|
||||
// Also allow events that had their content already parsed by some other function
|
||||
errors.Is(err, event.ErrContentAlreadyParsed)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue