Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor calendar engine into its own package (#267)
* 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]>
- Loading branch information