Basically in D5545 we made sure to set messageStore.messages to {} so we wouldn't run into issues with messageStore.messages being undefined.
It was a reasonable assumption to make that messageStore.messages would always be undefined coming into this transform since we no longer persist messages via redux-persist.
However, there is one situation where we expect messageStore.messages to exist AND where we NEED the contents... and that's in migration 31 where we switch over from persisting messages via redux-persist to storing them in the SQLite messages table. That migration depends on the contents of messageStore.messages to construct the "message ops" that--when processed--populate the SQLite messages table for the first time.
Because messageStoreMessagesBlocklistTransform modifies the messageStore before migrations are run, we were inadvertently clearing messageStore.messages for older clients before migration 31 completed... leaving them with an empty messageStore.messages even after a "successful" SET_MESSAGE_STORE_MESSAGES. This diff handles that situation by setting messageStore.messages to {} only if undefined (or falsey) via nullish coalescing.