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

feat: apply personal out-of-office data to the auto responder #9077

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Nov 20, 2023

Fix #8925
Requires nextcloud/server#41440

I had to move the sieve "parser" to the backend. There should be no regressions and it should behave exactly like before. Proof: I moved all tests and test data to the backend and they all pass without modifications.

Note: This PR looks huge but to be fair there are a lot of tests and test data.

TODO

  • Listen to out-of-office events
  • Test events

@st3iny st3iny self-assigned this Nov 20, 2023
@st3iny st3iny force-pushed the feat/ooo-auto-responder-integration branch 2 times, most recently from a5fe9c2 to f1afc7d Compare November 21, 2023 17:46
@st3iny st3iny marked this pull request as ready for review November 21, 2023 17:46
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Amazing

We will need to suppress some missing classes for Psalm

lib/Controller/OutOfOfficeController.php Show resolved Hide resolved
@ChristophWurst ChristophWurst added this to the v3.5.0 milestone Nov 23, 2023
@ChristophWurst
Copy link
Member

Psalm is still not happy

@ChristophWurst
Copy link
Member

/backport to stable3.5

}

public function handle(Event $event): void {
if (!($event instanceof OutOfOfficeStartedEvent) && !($event instanceof OutOfOfficeEndedEvent)) {
Copy link
Member

Choose a reason for hiding this comment

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

currently not covered: ooo changed event. listening to that would allow Mail to reflect changes to the ooo message when ooo is ongoing

Copy link
Member

Choose a reason for hiding this comment

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

the current feature set is fine for an mvp. we can add change propagation later.

@ChristophWurst
Copy link
Member

OCP packages were outdated. Psalm passes now after rerun.

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

Tested & works

It's also super nice to see that the same account configured on an installation of this branch is compatible with a 3.5.0rc1 installation. The other installation still recognizes the autoresponder as enabled with the data set from the new automation.

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst ChristophWurst force-pushed the feat/ooo-auto-responder-integration branch from 6f8c0fb to 3cbdf1f Compare November 24, 2023 09:38
@ChristophWurst ChristophWurst merged commit 4f955d8 into main Nov 24, 2023
35 checks passed
@ChristophWurst ChristophWurst deleted the feat/ooo-auto-responder-integration branch November 24, 2023 09:44
@ChristophWurst
Copy link
Member

/backport to stable3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Out-of-office: Apply user info to auto responder settings (if enabled)
2 participants