Would be cool to import/export (unencrypted) messages from/to Synapse with an API.
An usecase is importing messages from other systems or would be also good to move users from a "testing" Synapse server, which becomes unfortunately "semi-productive", to a new Synapse installation. With a better usernames than "testuser1", "testuser2"...
I read...
https://matrix.org/docs/guides/client-server.html
https://github.com/matrix-org/synapse/tree/master/docs/admin_api
... but couldn't find any API.
Thank you.
This is closely related to https://github.com/vector-im/riot-web/issues/2630, though I couldn't find an issue on the synapse side.
would be also good to move users from a "testing" Synapse server,
It's worth noting that is a lot more complicated than just copying your message history, for reasons noted in the FAQ; however see also https://github.com/matrix-org/matrix-doc/issues/915 and https://github.com/matrix-org/synapse/issues/1209.
Import would be super useful. I suppose a separate tool could be made, considering that as far as i can tell, you'd just need to add the lines to the db and to copy any media files into the correct place. I'm guessing you'd have to translate the format/paths a bit.
I've actually been trying to do this with the python-sdk the last few days and am currently blocked on setting historical timestamps. I'm trying to migrate users from a much older chat system, actually, and have figured out a lot of what I need to accomplish, but event timestamps are currently eluding me.
I was able to get around the issue by brute force. Basically, I read the original messages and set the system clock before importing each one. If you're running a VM, you have to basically disable host time sync to pull that off. And make sure you don't have any clients pointed at the instance as it'll get confused about presence timestamps jumping around.
Import of existing timelines also would be a killer feature for the bridges (i.e. 禄connect to and import history from Slack芦)..
Does the protocol mandate for every event to have the time _now_?
Importing could be allowed on newly created rooms only so message history could not be fudged around with..
Nope it does not, importing is already possible via the application service API's timestamp massaging featureset
Most helpful comment
Nope it does not, importing is already possible via the application service API's timestamp massaging featureset