~edwargix/tallyard

ac93afd1899ddd283eb3daea5521227f80b95ec8 — David Florness 2 years ago 17cec39
Insert panic to help root out bug
1 files changed, 4 insertions(+), 0 deletions(-)

M election/msg.go
M election/msg.go => election/msg.go +4 -0
@@ 140,6 140,10 @@ func (elections *ElectionsMap) SetupEventHooks(client *mautrix.Client, syncer ma
	// TODO: this is a freaking mess
	wrapper := func(f func(*event.Event, *mautrix.Client) bool) func(*event.Event) bool {
		return func(evt *event.Event) bool {
			if evt == nil {
				// TODO: this is only here to help find a bug
				panic("evt is nil")
			}
			if evt.Unsigned.RedactedBecause != nil {
				log.Debugf("event %s was redacted", evt.ID)
				return false