Refactor to calculate state delta outside transaction
Refactor to calculate state delta outside transaction

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