patrickfav / rocketchat-exporter

A simple script exporting chats from a rocket chat instance using the public REST API. Useful if no administrative access is possible.
https://favr.dev/opensource/rocketchat-exporter
Apache License 2.0
24 stars 10 forks source link

support Rocket Chat import format #7

Open JensLehmann opened 2 years ago

JensLehmann commented 2 years ago

It would be good to support the Rocket Chat import format as described in https://docs.rocket.chat/guides/administration/admin-panel/import/csv . In particular for private channels, the format should be sender user / receiver user / timestamp / message. Moving from the current format to this format is not that easy (because of multiline messages and needing to insert the receiving user as only the sending user is in the current format).

Looking at https://github.com/patrickfav/rocketchat-exporter/blob/master/src/main/java/at/favre/tools/rocketexporter/converter/SlackCsvFormat.java I'm also unsure whether there is a way to implement this for direct messages, which are treated differently than channels. Probably, the ExportFormat interface needs to be extended by another method for direct messages.