-
Notifications
You must be signed in to change notification settings - Fork 434
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(bots): Add events for enabling and disabling bots #12551
feat(bots): Add events for enabling and disabling bots #12551
Conversation
d677d44
to
2abc0f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be documented in https://github.com/nextcloud/spreed/blob/main/docs/bots.md if possible
2abc0f9
to
61928d5
Compare
@nickvergessen resolved all the suggestions and also updated the docs please verify, specially the bots.md :) |
61928d5
to
809f366
Compare
Thanks @sanskar-soni-9 |
Head branch was pushed to by a user without write access
809f366
to
916e7ef
Compare
fixed linting |
@nickvergessen Integration test is failing, with |
lib/Command/Bot/Remove.php
Outdated
$output->writeln('<info>Remove bot from given conversations</info>'); | ||
|
||
foreach ($tokens as $token) { | ||
$event = new BotDisabledEvent($this->roomManager->getRoomByToken($token), $botServer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And similarly we need to check if the room existed here:
$event = new BotDisabledEvent($this->roomManager->getRoomByToken($token), $botServer); | |
try { | |
$room = $this->roomManager->getRoomByToken($token); | |
} catch (RoomNotFoundException) { | |
continue; | |
} | |
$event = new BotDisabledEvent($room, $botServer); |
(+ importing the OCA\Talk\Exceptions\RoomNotFoundException
exception)
916e7ef
to
9902be1
Compare
oops dont know how that happened, let me fix this |
9902be1
to
4594691
Compare
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
4594691
to
e8af04d
Compare
also rebased to the current head |
It was always broken, just was not a problem so far as the missing room object was not attempted to be used. |
No no I used both |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
☑️ Resolves
Overview
This allows the bot server to be notified when a bot is enabled or disabled, enabling it to take appropriate action.
Demo Example
2024-06-20.17-30-59.mp4
🏁 Checklist
docs/
has been updated or is not required