mattermost / mattermost-plugin-google-calendar

Mattermost Google Calendar Plugin
35 stars 35 forks source link

Share summary list in channel #28

Open svenseeberg opened 3 years ago

svenseeberg commented 3 years ago

We want a bot to post the daily summary of events in a channel. This is basically the same functionality of /calendar summary, with the output sent to the current channel instead of a direct message. Would a PR for this be welcome?

I think we should add a new command for this, for example /calendar share or /calendar share-summary. Is there a better solution?

Then it would be pretty straight forward:

  1. Add a new switch in https://github.com/mattermost/mattermost-plugin-google-calendar/blob/master/server/command_hooks.go#L112
  2. Create a function that "duplicates" https://github.com/mattermost/mattermost-plugin-google-calendar/blob/master/server/command_hooks.go#L190 and sends the result to the current channel instead of p.CreateBotDMPost(userID, text)