Our proposed solution to sharing encrypted room history on invite involves sharing the keys to an encrypted blob of room keys via to-device messages.
#4505 tracks sending those to-device messages. This issue tracks receiving them and stashing the contents somewhere persistent, so that we can make use of them later.
(Note that we do not want to download the key bundle immediately, since this could be used by a malicious user to trigger a large number of downloads. Instead, we wait until we accept the invite. This is why we want to stash the data rather than use it immediately.)
Part of element-hq/element-meta#2685