Giter VIP home page Giter VIP logo

mattermost-plugin-remind's Introduction

Mattermost Plugin Remind

Build Status codecov
Go Report Card
CII Best Practices
Releases

A bot that schedules reminders for Mattermost

Installation

requires Mattermost v6.5.2 or greater.

  1. Go to the releases page of this GitHub repository and download the latest release for your Mattermost server.
  2. Upload this file in the Mattermost System Console > Plugins > Management page to install the plugin. To learn more about how to upload a plugin, see the documentation.
  3. For a better cross timezone experience, enable Experimental timezone support. System Console -> Experimental Features -> Timezone = true
  4. (Opt.) If your server is not configured for cross-team DMs (i.e. Enable users to open Direct Message channels with: is set to Users on same Team) then you will need to add remindbot to any team which wishes to use the plugin. This is done through the "Manage members" interface.

Usage

  • /remind - opens up an interactive dialog to schedule a reminder
  • /remind help - displays help examples
  • /remind list - displays a list of reminders
  • /remind [who] [what] [when]
    • /remind [who] [what] in [# (seconds|minutes|hours|days|weeks|months|years)]
    • /remind [who] [what] at [(noon|midnight|one..twelve|00:00am/pm|0000)] (every) [day|date]
    • /remind [who] [what] (on) [(monday-sunday|month&day|m/d/y|d.m.y)] (at) [time]
    • /remind [who] [what] every (other) [monday,...,sunday|weekdays|month&day|m/d|d.m] (at) [time]
  • /remind [who] [when] [what]

Here is the full list of Examples

Build

make

This will produce a single plugin file (with support for multiple architectures) for upload to your Mattermost server:

dist/com.github.scottleedavis.mattermost-plugin-remind.tar.gz

mattermost-plugin-remind's People

Contributors

chubik avatar dependabot[bot] avatar esethna avatar grubbins avatar hanzei avatar jlbribeiro avatar kemenaran avatar lieut-data avatar mrmonkington avatar scottleedavis avatar yukitas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-plugin-remind's Issues

parses incorrectly

/remind me foo every 5/5 at 7
parsed as
I will remind you "foo" at 3:00AM every 5/5.

A snoozed messages in list

Sometimes a snoozed reminder does not appear in the list.

Snooze buttons on reminders inside the list do not appear to function.

Doesn't parse statement

/remind me to do things every monday and wednesday at noon

/remind me Remember the children's birthdays every 1/30 and 9/30 at noon

Questions on plugin structure

  1. is there a persistent store available via the rpc interface? (server-side plugin portion) For the java remind integration, I used a database with two tables defined. I don't think keeping reminders in memory alone is a good idea.
  2. Can Timezone be determined per user interaction through the server-side rpc? One fatal flaw in the java remind integration is that it runs only one timezone, which needs to be configured for each instance, and certainly doesn't change per user.
  3. Can server commands determine what user triggered them? It didn't seem a user object was available ( https://github.com/mattermost/mattermost-plugin-demo/blob/master/server/command_hooks.go ).
  4. What is the best approach to scheduling events in the plugin structure? In the java remind integration, a separate scheduler thread runs in the background every second checking for anything to 'remind'. (I am open to a better scheduling strategy).

plugin API for key-value pairs like KVSet, KVGet, KVDelete, maybe give it a try and see if it works for you.
Yes, on your custom API, you'll be able to get the user ID and get the profile from it, like:

func (p *Plugin) customAPI(w http.ResponseWriter, r *http.Request) {
userID := r.Header.Get("Mattermost-User-ID")
user, err := p.API.GetUser(userID)
// handle error
// do something with user object or user.Timezone
}

Yes, *model.CommandArgs includes UserId where you can use to get the user object from it, like:
func (p *Plugin) ExecuteCommand(c *plugin.Context, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
user, err := p.API.GetUser(args.UserId)
// handle error
// do something with user object
}

Maybe look at the built-in /echo command although it's in memory. I'm guessing, the same can be applied to /remind.

Yes, there's a persistent KV store. Look at the KVGet, KVStore and KVDelete APIs: https://developers.mattermost.com/extend/plugins/server/reference/#API.KVSet

Can add reminder successfully but doesn't trigger at time (or at all)

Hi, we have this set up correctly and everyone is able to add/list/clear a reminder. Unfortunately, nobody has been able to receive a reminder or notification.

Do you have any ideas what could be causing this or where to check first?

As a side note, the logs are showing the time as:

2018-08-29T17:03:53.945+0100 debug app/plugin_api.go:303 existing [{## user## me 1 16:35 [] 0001-01-01 00:00:00 +0000 UTC} {##$

Note that the time isn't correct - could this be the cause?

Thanks

Duplicate occurrences in `remind list`

Duplicate reminders shouldn't be allowed to exist in the list. I would expect that the bot accepts the input, just doesn't display the same reminder more than once in the "/remind list"

These don't seem to be accepted, but are expected to work based on testing in Slack

  • /remind me eat 5pm
  • /remind me to eat in 1hr
  • /remind me in 1 hour to eat
  • /remind me to Use quotes on and at in and around every thing in 1 minute

(Cause: Not quotes used. How can we address this? Slack seems to be able to detect it even when quotes aren't used. It's not likely that users will enter quotes when using the command so we should try to think through this.)

Really requires 5.10.0 ?

I'd love to use this plugin (even though it's WIP), but it says recently that it requires MM 5.10. We run 5.9 currently, and I guess I can wait, but if there's no actual 5.10 features, maybe we could roll it back to 5.9?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.