FEATURE: Export chat messages to CSV file (#22113)

To export chat messages, go to `/admin/plugins/chat` and click the Create export 
button in the _Export chat messages_ section. You'll receive a direct message 
when the export is finished.

Currently, this exports all messages from the last 6 months, but not more than 
10000 messages.

This exports all chat messages, including messages from private channels and 
users' direct conversations. This also exports messages that were deleted.
This commit is contained in:
Andrei Prigorshnev
2023-06-21 16:13:36 +04:00
committed by GitHub
parent 720c0c6e4d
commit 3ea31f443c
12 changed files with 230 additions and 1 deletions

View File

@ -63,6 +63,7 @@ after_initialize do
User.prepend Chat::UserExtension
Jobs::UserEmail.prepend Chat::UserEmailExtension
Plugin::Instance.prepend Chat::PluginInstanceExtension
Jobs::ExportCsvFile.class_eval { prepend Chat::MessagesExporter }
end
if Oneboxer.respond_to?(:register_local_handler)