Add old state check.
Add old state check.

matrix-org/matrix-js-sdk,williamboman/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,williamboman/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,williamboman/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk