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

[GCAL] Channels reminder underlying logic #274

Merged
merged 53 commits into from
Aug 7, 2023

Conversation

fmartingr
Copy link
Contributor

@fmartingr fmartingr commented Jul 27, 2023

Summary

Adds new functionality to MSCalendar.notifyUpcomingEvents method by checking for event metadata on the KVStore, if the event is present and have LinkedChannels set, we will post a reminder in all channels present too, the same way we do in DMs.

  • Check recurrent events
  • Create methods to CRUD this information in the store.

Ticket Link

https://mattermost.atlassian.net/browse/MM-53843

@fmartingr fmartingr self-assigned this Jul 27, 2023
@fmartingr fmartingr changed the title Fmartingr/gcal/channel reminders [GCAL] Channels reminder underlying logic Jul 27, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Patch coverage: 52.63% and project coverage change: +0.15% 🎉

Comparison is base (d3fe76b) 20.75% compared to head (1673918) 20.91%.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           migrate-to-gcal     #274      +/-   ##
===================================================
+ Coverage            20.75%   20.91%   +0.15%     
===================================================
  Files                   64       64              
  Lines                 3319     3337      +18     
===================================================
+ Hits                   689      698       +9     
- Misses                2544     2551       +7     
- Partials                86       88       +2     
Files Changed Coverage Δ
server/mscalendar/availability.go 55.55% <52.63%> (-0.28%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fmartingr fmartingr marked this pull request as ready for review July 31, 2023 14:57
Base automatically changed from fmartingr/gcal/notifications to migrate-to-gcal August 1, 2023 07:03
server/store/event_store.go Outdated Show resolved Hide resolved
server/mscalendar/availability_test.go Outdated Show resolved Hide resolved
server/mscalendar/availability_test.go Outdated Show resolved Hide resolved
server/remote/event.go Outdated Show resolved Hide resolved
@fmartingr fmartingr merged commit 2a4ec5d into migrate-to-gcal Aug 7, 2023
4 checks passed
@fmartingr fmartingr deleted the fmartingr/gcal/channel-reminders branch August 7, 2023 16:06
mickmister added a commit that referenced this pull request Mar 1, 2024
* oauth works

* autocomplete

* viewcal works

* add unimplemented if blocks

* fix tests and lint

* implement CreateMySubscription, RenewSubscription, and DeleteSubscription gcal methods

* WIP gcal subs

* setup-attach make target

* fix lint and tests

* chore: more compatible tar command

* add review comments

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* bug: get timezone from datetime instead of event data (#271)

* [GCAL] Allow building two different plugins under the same codebase (#268)

* plugin profile images

* receive provider flag

* manifests

* retrieve manifest id from file

* Build time configuration

* revert manifest

* using go static configuration for providers

* removed unused build flags

* revert manifest

* Added basic Google Calendar instructions

* Update providers/GoogleCalendar.md

Co-authored-by: Michael Kochell <[email protected]>

* Update providers/GoogleCalendar.md

Co-authored-by: Michael Kochell <[email protected]>

* Update server/plugin/plugin.go

Co-authored-by: Michael Kochell <[email protected]>

* remoove log

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Endpoint to autocomplete connected calendar users (#275)

* user_store: more information fields on the index

* feat: endpoint to autocomplete calendar connected users

* revert test event store hashed

* Update server/api/autocomplete.go

Co-authored-by: Michael Kochell <[email protected]>

* Update server/api/autocomplete.go

Co-authored-by: Michael Kochell <[email protected]>

* dont expose private data in endpoint

* lint

* Update server/store/user_store.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Refactor Microsoft Calendar references to provider references (#276)

* chore: replace provider display name

* chore: replace command trigger references

* revert previous changes

* [GCAL] Enable notifications and reminders when a superuser token is not supported (#272)

* nil control

* use subscriptions default ttl

* return specific error when no superuser token can be used

* notification formatting logic to other file

* Client.GetEventsBetweenDates

* typo: import

* shorter command name :)

* availability without super user token

* delete store subs only if we successfuly do on remote

* comment

* ignore missing subs

* update sync method

* allow switching acting user on the fly

* daily summary without super user token

* formatted imports

* calendar -> calendarEvents

* processAllDailySummaryByUser
 -> processAllDailySummaryWithIndividualCredentials

* revert silenced error under notifications

* msgraph GetEventsBetweenDates

* Update server/mscalendar/daily_summary.go

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* Client.GetEventsBetweenDates

* fix: store last post time

* refactored availability logic

* availability test

* refactored daily summary logic

* test: availability

* daily summary tests (wip)

* daily summary test

* fix: merge duplications

* slack attachment for notifications

* lint and test

* goimports

* Update server/mscalendar/availability.go

Co-authored-by: Michael Kochell <[email protected]>

* remove logges

* nullify client when changing acting user

* move withActiveUser filter to fenced code outside of general method

* tests: handling more scenarios

* Fixed test after bugfix

* fixed test assertions

* allow engine copy to perform safe state mutations

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Added encrypted key value storage (#270)

* Added encrypted kvstore

* encrypt only oauth2 kv store

* retrieve encryption setting from provider config

* explicitly disable encrypted store for mscalendar

* remove old comment

* [GCAL] today/tomorrow commands with styling (#273)

* feat: added today and tomorrow commands with attachments

* remove unused function

* linted

* now -> day

* remove unused code

* today/tomorrow autocomplete

* return tables on today/tomorrow commands

* check for nil location

* revert tomorrow day times four

* fix markdown table render and test

* [GCAL] Fix test in main branch from PR merges (#277)

* fix: test from merges

* add meeting url

* [GCAL] Move configuration readyness logic to remotes (#279)

* Move configuration logic to remotes

* check encryption key as well

* Update server/plugin/plugin.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Remove unused code (#278)

* remove batch requests from gcal code

* More info in readme

* [GCAL] Fix event notifications not working due to missing scope permissions plus internal state (#282)

* fix: notifications scope and acting user logic

* remove log

* avoid calling notifications if the engine fails to load

* [GCAL] Unsubscriptions (#283)

* fix: notifications scope and acting user logic

* fix: gcal unsubscribe requiring more parameters

* update gcal manifest (#285)

* [GCAL] Better logging information (#287)

* fix: better log information

* log missing error

* use correct manifest file on manifest calls (#290)

* [GCAL] Embed tzdata and correctly parse location from event datetime (#288)

* fix: embed tzdata to prevent errors on systems without it installed

* move to main

* avoid overwritting location if empty

* use tags instead of import

* [GCAL] Event notifications behind a feature flag (#292)

* put event notifications behind a feature flag

* admin only un/subscribe commands

* properly fence notification processor

* ignore notifications if there's no processor (#293)

* [GCAL] Remove join event column (broken from merges) (#294)

* remove join column from merges

* revert manifest

* [GCAL] Channels reminder underlying logic (#274)

* nil control

* use subscriptions default ttl

* return specific error when no superuser token can be used

* notification formatting logic to other file

* Client.GetEventsBetweenDates

* typo: import

* shorter command name :)

* availability without super user token

* delete store subs only if we successfuly do on remote

* comment

* ignore missing subs

* update sync method

* allow switching acting user on the fly

* daily summary without super user token

* formatted imports

* calendar -> calendarEvents

* processAllDailySummaryByUser
 -> processAllDailySummaryWithIndividualCredentials

* revert silenced error under notifications

* msgraph GetEventsBetweenDates

* Update server/mscalendar/daily_summary.go

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* Client.GetEventsBetweenDates

* fix: store last post time

* refactored availability logic

* availability test

* refactored daily summary logic

* test: availability

* daily summary tests (wip)

* daily summary test

* fix: merge duplications

* slack attachment for notifications

* lint and test

* goimports

* Allow poster to create posts

* Allow store event metadata

* styling

* store recurring event id

* deliver channel notifications

* test: fixed for base case

* test: channel reminders

* test: recurring events

* move from slice to map

* Added store methods to interact with event metadata

* lint

* lint imports

* restore logic lost in merge

* duplicated test

* Update server/mscalendar/availability_test.go

Co-authored-by: Michael Kochell <[email protected]>

* remove recurrent event id field

---------

Co-authored-by: Michael Kochell <[email protected]>

* Updated google calendar readme

* [GCAL] Summary command fixes (#286)

* command trigger shown

* added autocomplete to summary command

* remove join meeting column

* fix event subjects with table separator

* fixed merge import

* replace more characters in subject

* [GCAL] Add a modal to create events (#281)

* add webapp folder

* WIP

* opening create event modal from slash command works

* add time selectors and initial impl of attendee selector

* delete .npminstall

* ignore .npminstall

* [GCAL/MSCAL] Add endpoint to create events from the frontend (#291)

* add remoteid to event attendee

* api endpoint

* conversion fixes

* api logic

* frontend logic to test

* check if user belongs to channel

* updated interface

* use api/v1 prefix

* implement getchannelmember

* all day events

* pluginAPI.CanLinkEventToChannel

* autocomplete users

* create event fetch call

* channel autocomplete

* improved error messages displayed to users

* better error handling

* channel selector store channel id

* properly set email addresses for attendees

* event location as string

* response messages

* little refactor

* attendee selector can invite arbitrary emails

* uppercase error dynamically

* lowercase error

* remove punctuation

* linted ts files

* goimports

* fixed import

* link events on creation

* Add channel action to create events

* add channel_id to payload

* time selector every 15 minutes

* time selector start/end with limits

* capitalized error messages

* don't allow 0 minute events

* display timezone in channel reminders

* utc time parsing

* remove nullfunc

* properly initialize variables

* address some comments

* npm run fix

* Update webapp/src/components/time_selector.tsx

Co-authored-by: Michael Kochell <[email protected]>

* Update webapp/src/components/time_selector.tsx

Co-authored-by: Michael Kochell <[email protected]>

* refactor options with useMemo

* capitalization in function for clarity

* npm run fix

* get plugin id from manifest

* remove no-ops

* refactor createEvent

* fix channel autocomplete url

* fix lint

* fix user string typo

* make it so `make apply` assumes gcal for now

* more careful error handling

* reorganize frontend error handling

* default to CALENDAR_PROVIDER=gcal

* use Client4.autocompleteChannels instead of custom plugin endpoint

* fix manifest test

---------

Co-authored-by: Michael Kochell <[email protected]>

* gofmt

---------

Co-authored-by: Felipe Martin <[email protected]>
Co-authored-by: Felipe Martin <[email protected]>

* [GCAL/MSCAL] Store linked events per user to remove links on disconnection (#296)

* add webapp folder

* WIP

* opening create event modal from slash command works

* add time selectors and initial impl of attendee selector

* delete .npminstall

* ignore .npminstall

* add remoteid to event attendee

* api endpoint

* conversion fixes

* api logic

* frontend logic to test

* check if user belongs to channel

* updated interface

* use api/v1 prefix

* implement getchannelmember

* all day events

* pluginAPI.CanLinkEventToChannel

* autocomplete users

* create event fetch call

* channel autocomplete

* improved error messages displayed to users

* better error handling

* channel selector store channel id

* properly set email addresses for attendees

* event location as string

* response messages

* little refactor

* attendee selector can invite arbitrary emails

* uppercase error dynamically

* lowercase error

* remove punctuation

* linted ts files

* goimports

* fixed import

* link events on creation

* Add channel action to create events

* add channel_id to payload

* time selector every 15 minutes

* time selector start/end with limits

* capitalized error messages

* don't allow 0 minute events

* display timezone in channel reminders

* utc time parsing

* remove nullfunc

* properly initialize variables

* address some comments

* npm run fix

* store linked events for user to remove links on disconnection

* typo

* remove unused items after merge

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL/MSCAL] Remind only accepted events (#295)

* remind only accepted events

* fixed tests

* excludeDeclinedEvents

* normalize msgraph event response

* Remove GoogleDomainVerifyKey setting (#299)

* fix: encrypt user store (#297)

* feat: send notifications when an event is created (#300)

* typo: user already connected message (#301)

* typo: user already connected message

* test: fix change

* typo: user already connected message (#301)

* typo: user already connected message

* test: fix change

* [GCAL/MSCAL] Exclude rejected events from agenda commands (#302)

* exclude rejected events from agenda commands

* test: check that declied event are excluded

* fix possible nil pointer

* [GCAL/MSCAL] Create event modal only for connected accounts (#303)

* only connected users chan use slash command

* prevent channel menu action from allowing too

* npm run fix

* lint errors

* retrieve provider configuration to use in messages

* websocket events

* add message to mobile users

* npm run fix

* Update webapp/src/plugin_hooks.ts

Co-authored-by: Michael Kochell <[email protected]>

* register modal in setup

* events create

* trigger from provide config

* using dispatch

* missing semicolon

* Update webapp/src/plugin_hooks.ts

Co-authored-by: Michael Kochell <[email protected]>

* singular

---------

Co-authored-by: Michael Kochell <[email protected]>

* updated settings to use style and removed current value line (#305)

* show link to connect if not connected (#306)

* [GCAL/MSCAL] Reduce welcome steps  (#308)

* reduce welcome steps and edit defaults

* Update server/mscalendar/welcome_flow.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL/MSCAL] Control start/date times if the selected date is today (#307)

* improvements to create event datetimes

* reset starttime endtime on date change

* repopulate times if date changed

* npm run fix

* database replication workaround (#312)

* [GCAL/MSCAL] Catch errors when using `findmeetings` commands without enough parameters (#313)

* fix: handle error in find meetings parameters command

* changed loop variable usage

* Replace Equals with ElementsMatch

* makefile dist build for production (#314)

* [GCAL/MSCAL] Create event UX improvements (#309)

* Optional fields

* time picker defaults

* Add custom icon to Create Event menu item

* add custom icon to date selector

* npm run fix

* header menu icon multiline

* use scss

* using proper typeRoots

* scoped css style

* [GCAL] Store conference data (#298)

* extract conference data into new attribute

* removed log

* removed unused fuunction

* tests

* Update server/remote/gcal/get_default_calendar_view_test.go

Co-authored-by: Michael Kochell <[email protected]>

* more realistic datetime values

---------

Co-authored-by: Michael Kochell <[email protected]>

* Common code refactor, back to mscalendar plugin (#334)

* refactor: mscalendar -> engine

* remove gcal assets

* refactored common code outside server package

* check-style

* go mod tidy

* REPO_URL -> REPOSITORY_URL

* delete unknown file

* updated mocks

* apped user to handle after all actions (#335)

* refactor msgraph to mscalendar

* goimports

* removed apply command from merge

* remove "REVIEW:" comments

---------

Co-authored-by: Felipe Martin <[email protected]>
Co-authored-by: Felipe Martin <[email protected]>
raghavaggarwal2308 added a commit that referenced this pull request Aug 9, 2024
* oauth works

* autocomplete

* viewcal works

* add unimplemented if blocks

* fix tests and lint

* implement CreateMySubscription, RenewSubscription, and DeleteSubscription gcal methods

* WIP gcal subs

* setup-attach make target

* fix lint and tests

* chore: more compatible tar command

* add review comments

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* bug: get timezone from datetime instead of event data (#271)

* [GCAL] Allow building two different plugins under the same codebase (#268)

* plugin profile images

* receive provider flag

* manifests

* retrieve manifest id from file

* Build time configuration

* revert manifest

* using go static configuration for providers

* removed unused build flags

* revert manifest

* Added basic Google Calendar instructions

* Update providers/GoogleCalendar.md

Co-authored-by: Michael Kochell <[email protected]>

* Update providers/GoogleCalendar.md

Co-authored-by: Michael Kochell <[email protected]>

* Update server/plugin/plugin.go

Co-authored-by: Michael Kochell <[email protected]>

* remoove log

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Endpoint to autocomplete connected calendar users (#275)

* user_store: more information fields on the index

* feat: endpoint to autocomplete calendar connected users

* revert test event store hashed

* Update server/api/autocomplete.go

Co-authored-by: Michael Kochell <[email protected]>

* Update server/api/autocomplete.go

Co-authored-by: Michael Kochell <[email protected]>

* dont expose private data in endpoint

* lint

* Update server/store/user_store.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Refactor Microsoft Calendar references to provider references (#276)

* chore: replace provider display name

* chore: replace command trigger references

* revert previous changes

* [GCAL] Enable notifications and reminders when a superuser token is not supported (#272)

* nil control

* use subscriptions default ttl

* return specific error when no superuser token can be used

* notification formatting logic to other file

* Client.GetEventsBetweenDates

* typo: import

* shorter command name :)

* availability without super user token

* delete store subs only if we successfuly do on remote

* comment

* ignore missing subs

* update sync method

* allow switching acting user on the fly

* daily summary without super user token

* formatted imports

* calendar -> calendarEvents

* processAllDailySummaryByUser
 -> processAllDailySummaryWithIndividualCredentials

* revert silenced error under notifications

* msgraph GetEventsBetweenDates

* Update server/mscalendar/daily_summary.go

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* Client.GetEventsBetweenDates

* fix: store last post time

* refactored availability logic

* availability test

* refactored daily summary logic

* test: availability

* daily summary tests (wip)

* daily summary test

* fix: merge duplications

* slack attachment for notifications

* lint and test

* goimports

* Update server/mscalendar/availability.go

Co-authored-by: Michael Kochell <[email protected]>

* remove logges

* nullify client when changing acting user

* move withActiveUser filter to fenced code outside of general method

* tests: handling more scenarios

* Fixed test after bugfix

* fixed test assertions

* allow engine copy to perform safe state mutations

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Added encrypted key value storage (#270)

* Added encrypted kvstore

* encrypt only oauth2 kv store

* retrieve encryption setting from provider config

* explicitly disable encrypted store for mscalendar

* remove old comment

* [GCAL] today/tomorrow commands with styling (#273)

* feat: added today and tomorrow commands with attachments

* remove unused function

* linted

* now -> day

* remove unused code

* today/tomorrow autocomplete

* return tables on today/tomorrow commands

* check for nil location

* revert tomorrow day times four

* fix markdown table render and test

* [GCAL] Fix test in main branch from PR merges (#277)

* fix: test from merges

* add meeting url

* [GCAL] Move configuration readyness logic to remotes (#279)

* Move configuration logic to remotes

* check encryption key as well

* Update server/plugin/plugin.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Remove unused code (#278)

* remove batch requests from gcal code

* More info in readme

* [GCAL] Fix event notifications not working due to missing scope permissions plus internal state (#282)

* fix: notifications scope and acting user logic

* remove log

* avoid calling notifications if the engine fails to load

* [GCAL] Unsubscriptions (#283)

* fix: notifications scope and acting user logic

* fix: gcal unsubscribe requiring more parameters

* update gcal manifest (#285)

* [GCAL] Better logging information (#287)

* fix: better log information

* log missing error

* use correct manifest file on manifest calls (#290)

* [GCAL] Embed tzdata and correctly parse location from event datetime (#288)

* fix: embed tzdata to prevent errors on systems without it installed

* move to main

* avoid overwritting location if empty

* use tags instead of import

* [GCAL] Event notifications behind a feature flag (#292)

* put event notifications behind a feature flag

* admin only un/subscribe commands

* properly fence notification processor

* ignore notifications if there's no processor (#293)

* [GCAL] Remove join event column (broken from merges) (#294)

* remove join column from merges

* revert manifest

* [GCAL] Channels reminder underlying logic (#274)

* nil control

* use subscriptions default ttl

* return specific error when no superuser token can be used

* notification formatting logic to other file

* Client.GetEventsBetweenDates

* typo: import

* shorter command name :)

* availability without super user token

* delete store subs only if we successfuly do on remote

* comment

* ignore missing subs

* update sync method

* allow switching acting user on the fly

* daily summary without super user token

* formatted imports

* calendar -> calendarEvents

* processAllDailySummaryByUser
 -> processAllDailySummaryWithIndividualCredentials

* revert silenced error under notifications

* msgraph GetEventsBetweenDates

* Update server/mscalendar/daily_summary.go

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL] Create event logic (#269)

* remote logic

* allow datetimes without timezone

* add calendar settings readonly scope to get tz

* event conversion

* scopes

* revert datetime.time

* Client.GetEventsBetweenDates

* fix: store last post time

* refactored availability logic

* availability test

* refactored daily summary logic

* test: availability

* daily summary tests (wip)

* daily summary test

* fix: merge duplications

* slack attachment for notifications

* lint and test

* goimports

* Allow poster to create posts

* Allow store event metadata

* styling

* store recurring event id

* deliver channel notifications

* test: fixed for base case

* test: channel reminders

* test: recurring events

* move from slice to map

* Added store methods to interact with event metadata

* lint

* lint imports

* restore logic lost in merge

* duplicated test

* Update server/mscalendar/availability_test.go

Co-authored-by: Michael Kochell <[email protected]>

* remove recurrent event id field

---------

Co-authored-by: Michael Kochell <[email protected]>

* Updated google calendar readme

* [GCAL] Summary command fixes (#286)

* command trigger shown

* added autocomplete to summary command

* remove join meeting column

* fix event subjects with table separator

* fixed merge import

* replace more characters in subject

* [GCAL] Add a modal to create events (#281)

* add webapp folder

* WIP

* opening create event modal from slash command works

* add time selectors and initial impl of attendee selector

* delete .npminstall

* ignore .npminstall

* [GCAL/MSCAL] Add endpoint to create events from the frontend (#291)

* add remoteid to event attendee

* api endpoint

* conversion fixes

* api logic

* frontend logic to test

* check if user belongs to channel

* updated interface

* use api/v1 prefix

* implement getchannelmember

* all day events

* pluginAPI.CanLinkEventToChannel

* autocomplete users

* create event fetch call

* channel autocomplete

* improved error messages displayed to users

* better error handling

* channel selector store channel id

* properly set email addresses for attendees

* event location as string

* response messages

* little refactor

* attendee selector can invite arbitrary emails

* uppercase error dynamically

* lowercase error

* remove punctuation

* linted ts files

* goimports

* fixed import

* link events on creation

* Add channel action to create events

* add channel_id to payload

* time selector every 15 minutes

* time selector start/end with limits

* capitalized error messages

* don't allow 0 minute events

* display timezone in channel reminders

* utc time parsing

* remove nullfunc

* properly initialize variables

* address some comments

* npm run fix

* Update webapp/src/components/time_selector.tsx

Co-authored-by: Michael Kochell <[email protected]>

* Update webapp/src/components/time_selector.tsx

Co-authored-by: Michael Kochell <[email protected]>

* refactor options with useMemo

* capitalization in function for clarity

* npm run fix

* get plugin id from manifest

* remove no-ops

* refactor createEvent

* fix channel autocomplete url

* fix lint

* fix user string typo

* make it so `make apply` assumes gcal for now

* more careful error handling

* reorganize frontend error handling

* default to CALENDAR_PROVIDER=gcal

* use Client4.autocompleteChannels instead of custom plugin endpoint

* fix manifest test

---------

Co-authored-by: Michael Kochell <[email protected]>

* gofmt

---------

Co-authored-by: Felipe Martin <[email protected]>
Co-authored-by: Felipe Martin <[email protected]>

* [GCAL/MSCAL] Store linked events per user to remove links on disconnection (#296)

* add webapp folder

* WIP

* opening create event modal from slash command works

* add time selectors and initial impl of attendee selector

* delete .npminstall

* ignore .npminstall

* add remoteid to event attendee

* api endpoint

* conversion fixes

* api logic

* frontend logic to test

* check if user belongs to channel

* updated interface

* use api/v1 prefix

* implement getchannelmember

* all day events

* pluginAPI.CanLinkEventToChannel

* autocomplete users

* create event fetch call

* channel autocomplete

* improved error messages displayed to users

* better error handling

* channel selector store channel id

* properly set email addresses for attendees

* event location as string

* response messages

* little refactor

* attendee selector can invite arbitrary emails

* uppercase error dynamically

* lowercase error

* remove punctuation

* linted ts files

* goimports

* fixed import

* link events on creation

* Add channel action to create events

* add channel_id to payload

* time selector every 15 minutes

* time selector start/end with limits

* capitalized error messages

* don't allow 0 minute events

* display timezone in channel reminders

* utc time parsing

* remove nullfunc

* properly initialize variables

* address some comments

* npm run fix

* store linked events for user to remove links on disconnection

* typo

* remove unused items after merge

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL/MSCAL] Remind only accepted events (#295)

* remind only accepted events

* fixed tests

* excludeDeclinedEvents

* normalize msgraph event response

* Remove GoogleDomainVerifyKey setting (#299)

* fix: encrypt user store (#297)

* feat: send notifications when an event is created (#300)

* typo: user already connected message (#301)

* typo: user already connected message

* test: fix change

* typo: user already connected message (#301)

* typo: user already connected message

* test: fix change

* [GCAL/MSCAL] Exclude rejected events from agenda commands (#302)

* exclude rejected events from agenda commands

* test: check that declied event are excluded

* fix possible nil pointer

* [GCAL/MSCAL] Create event modal only for connected accounts (#303)

* only connected users chan use slash command

* prevent channel menu action from allowing too

* npm run fix

* lint errors

* retrieve provider configuration to use in messages

* websocket events

* add message to mobile users

* npm run fix

* Update webapp/src/plugin_hooks.ts

Co-authored-by: Michael Kochell <[email protected]>

* register modal in setup

* events create

* trigger from provide config

* using dispatch

* missing semicolon

* Update webapp/src/plugin_hooks.ts

Co-authored-by: Michael Kochell <[email protected]>

* singular

---------

Co-authored-by: Michael Kochell <[email protected]>

* updated settings to use style and removed current value line (#305)

* show link to connect if not connected (#306)

* [GCAL/MSCAL] Reduce welcome steps  (#308)

* reduce welcome steps and edit defaults

* Update server/mscalendar/welcome_flow.go

Co-authored-by: Michael Kochell <[email protected]>

---------

Co-authored-by: Michael Kochell <[email protected]>

* [GCAL/MSCAL] Control start/date times if the selected date is today (#307)

* improvements to create event datetimes

* reset starttime endtime on date change

* repopulate times if date changed

* npm run fix

* database replication workaround (#312)

* [GCAL/MSCAL] Catch errors when using `findmeetings` commands without enough parameters (#313)

* fix: handle error in find meetings parameters command

* changed loop variable usage

* Replace Equals with ElementsMatch

* makefile dist build for production (#314)

* [GCAL/MSCAL] Create event UX improvements (#309)

* Optional fields

* time picker defaults

* Add custom icon to Create Event menu item

* add custom icon to date selector

* npm run fix

* header menu icon multiline

* use scss

* using proper typeRoots

* scoped css style

* [GCAL] Store conference data (#298)

* extract conference data into new attribute

* removed log

* removed unused fuunction

* tests

* Update server/remote/gcal/get_default_calendar_view_test.go

Co-authored-by: Michael Kochell <[email protected]>

* more realistic datetime values

---------

Co-authored-by: Michael Kochell <[email protected]>

* Common code refactor, back to mscalendar plugin (#334)

* refactor: mscalendar -> engine

* remove gcal assets

* refactored common code outside server package

* check-style

* go mod tidy

* REPO_URL -> REPOSITORY_URL

* delete unknown file

* updated mocks

* apped user to handle after all actions (#335)

* refactor msgraph to mscalendar

* refactor: removed unused commands

* Update calendar/command/command.go

Co-authored-by: Michael Kochell <[email protected]>

* go mod tidy

* removed added code from merge

---------

Co-authored-by: Michael Kochell <[email protected]>
Co-authored-by: Raghav Aggarwal <[email protected]>
Co-authored-by: Doug Lauder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants