Automatically copy starred (or pinned) messages to a private channel

I’ve to write a daemon (or script) running inside my RocketChat server that automatically clone messages from any direct chat to a private channel as soon as they went pinned or starred by the user (I don’t want to integrate any additional button or option on phone apps neither on the web app).

I am a newbie in rocketchat and I’ve read a lot of info (eg. how mongodb works etc.), but I cannot understand if a bot is the right choice for this task .

I’ve installed the chat application on a Ubuntu Server via snap.

Server Setup Information

  • Version of Rocket.Chat Server: 2.4.11
  • Operating System: Ubuntu Server
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v8.17.0
  • MongoDB Version: 3.6.14
  • Proxy: nginx
  • Firewalls involved: no