Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH87] Add "receive reminder" setting to login flow #117

Merged
merged 4 commits into from
May 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions server/mscalendar/welcome_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ func (wf *welcomeFlow) makeSteps() {
FalseButtonMessage: "No - Do not notify me of new events",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be in the scope of this PR, but I was thinking we should use the language "when you are invited to an event", instead of "when you receive a new event", in the prompts above this line, as it is clearer what we mean by "event".

Also, above we use the language "while you are on a meeting", versus "while you are in a meeting". Just some small improvements for wordings. @larkox Thoughts on this?

TrueResponseMessage: "Great, you will receive a message any time you receive a new event.",
FalseResponseMessage: "Great, you will not receive any notification on new events.",
}, &flow.SimpleStep{
Title: "Receive reminder",
Message: "Do you want to receive a reminder for upcoming events?",
PropertyName: store.ReceiveUpcomingEventReminderName,
TrueButtonMessage: "Yes - I would like to receive reminders for upcoming events",
FalseButtonMessage: "No - Do not notify me of upcoming events",
TrueResponseMessage: "Great, you will receive a message before your meetings.",
FalseResponseMessage: "Great, you will not receive any notification for upcoming events.",
}, &flow.EmptyStep{
Title: "Daily Summary",
Message: "Remember that you can set-up a daily summary by typing `/mscalendar summary time 8:00AM`.",
Expand Down
3 changes: 3 additions & 0 deletions server/store/flow_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const (
GetConfirmationPropertyName = "get_confirmation"
ReceiveNotificationsDuringMeetingName = "receive_notifications_during_meetings"
SubscribePropertyName = "subscribe"
ReceiveUpcomingEventReminderName = "receive_reminder"
)

func (s *pluginStore) SetProperty(userID, propertyName string, value bool) error {
Expand All @@ -20,6 +21,8 @@ func (s *pluginStore) SetProperty(userID, propertyName string, value bool) error
user.Settings.UpdateStatus = value
case GetConfirmationPropertyName:
user.Settings.GetConfirmation = value
case ReceiveUpcomingEventReminderName:
user.Settings.ReceiveReminders = value
case ReceiveNotificationsDuringMeetingName:
user.Settings.ReceiveNotificationsDuringMeeting = value
default:
Expand Down