Skip to content

Commit

Permalink
Revert "Implement autorespond feature (#188)" (#226)
Browse files Browse the repository at this point in the history
* Revert "Implement autorespond feature (#188)"

This reverts commit b8aff5a.

* re-add GetMattermostUserStatus method to PluginAPI interface

* mocks

* guard against error type issue
  • Loading branch information
mickmister authored Sep 15, 2021
1 parent 2d610f7 commit cd90e1b
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 537 deletions.
3 changes: 0 additions & 3 deletions server/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ func Init(h *httputils.Handler, env mscalendar.Env, notificationProcessor mscale
apiRouter := h.Router.PathPrefix(config.PathAPI).Subrouter()
apiRouter.HandleFunc("/authorized", api.getAuthorized).Methods("GET")

dialogRouter := h.Router.PathPrefix(config.PathDialogs).Subrouter()
dialogRouter.HandleFunc(config.PathSetAutoRespondMessage, api.setAutoRespondMessage).Methods("POST")

notificationRouter := h.Router.PathPrefix(config.PathNotification).Subrouter()
notificationRouter.HandleFunc(config.PathEvent, api.notification).Methods("POST")

Expand Down
56 changes: 0 additions & 56 deletions server/api/auto_respond.go

This file was deleted.

46 changes: 0 additions & 46 deletions server/command/auto_respond.go

This file was deleted.

3 changes: 0 additions & 3 deletions server/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ var cmds = []*model.AutocompleteData{
model.NewAutocompleteData("settings", "", "Edit your user personal settings."),
model.NewAutocompleteData("subscribe", "", "Enable notifications for event invitations and updates."),
model.NewAutocompleteData("unsubscribe", "", "Disable notifications for event invitations and updates."),
model.NewAutocompleteData("autorespond", "[message]", "Set your auto-respond message."),
model.NewAutocompleteData("info", "", "Read information about this version of the plugin."),
model.NewAutocompleteData("help", "", "Read help text for the commands"),
}
Expand Down Expand Up @@ -110,8 +109,6 @@ func (c *Command) Handle() (string, bool, error) {
handler = c.requireConnectedUser(c.showCalendars)
case "availability":
handler = c.requireConnectedUser(c.requireAdminUser(c.debugAvailability))
case "autorespond":
handler = c.requireConnectedUser(c.autoRespond)
case "settings":
handler = c.requireConnectedUser(c.settings)
}
Expand Down
24 changes: 11 additions & 13 deletions server/config/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ const (
CommandTrigger = "mscalendar"
TelemetryShortName = "mscalendar"

PathOAuth2 = "/oauth2"
PathComplete = "/complete"
PathAPI = "/api/v1"
PathDialogs = "/dialogs"
PathSetAutoRespondMessage = "/set-auto-respond-message"
PathPostAction = "/action"
PathRespond = "/respond"
PathAccept = "/accept"
PathDecline = "/decline"
PathTentative = "/tentative"
PathConfirmStatusChange = "/confirm"
PathNotification = "/notification/v1"
PathEvent = "/event"
PathOAuth2 = "/oauth2"
PathComplete = "/complete"
PathAPI = "/api/v1"
PathPostAction = "/action"
PathRespond = "/respond"
PathAccept = "/accept"
PathDecline = "/decline"
PathTentative = "/tentative"
PathConfirmStatusChange = "/confirm"
PathNotification = "/notification/v1"
PathEvent = "/event"

FullPathEventNotification = PathNotification + PathEvent
FullPathOAuth2Redirect = PathOAuth2 + PathComplete
Expand Down
29 changes: 29 additions & 0 deletions server/jobs/mock_cluster/mock_cluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 0 additions & 71 deletions server/mscalendar/auto_respond.go

This file was deleted.

Loading

0 comments on commit cd90e1b

Please sign in to comment.