Add ability to export user messages
Add ability to export user messages. This is currently limited to staff users to make sure the load is okay on our servers
Part of gitlab-com/www-gitlab-com#7652 (closed) -> https://gitlab.com/gitlab-org/gitter/webapp/-/issues/1899
Restore some of the export infrastructure we had from Gitter topics. Based off of:
- https://gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1199
- https://gitlab.com/gitlab-org/gitter/webapp/-/merge_requests/1238
Testing strategy
- Set yourself as a staff user,
mongo gitter
->db.users.update({ username: 'yourusername' }, { staff: true })
- Visit your local Gitter, open the devtools and run
window.troupeContext.user.id
to get your user ID - Replace the user ID in the following URL
- Visit
http://localhost:5000/api_web/export/user/5a87396f1543b98772a686a3/messages.ndjson
and download your messages
Edited by Eric Eastwood