Don't assume that an event has an origin field
Don't assume that an event has an origin field

This fixes #8319.

matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse