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(conversations): add option to force passwords #13767

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Nov 13, 2024

☑️ Resolves

in public conversations

🛠️ API Checklist

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@miaulalala miaulalala added this to the 🖤 Next Major (31) milestone Nov 13, 2024
@miaulalala miaulalala self-assigned this Nov 13, 2024
@miaulalala miaulalala added the feature: api 🛠️ OCS API for conversations, chats and participants label Nov 13, 2024
docs/settings.md Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Service/RoomService.php Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
@miaulalala miaulalala marked this pull request as ready for review November 14, 2024 18:19
lib/Manager.php Show resolved Hide resolved
lib/Manager.php Show resolved Hide resolved
lib/Service/RoomService.php Outdated Show resolved Hide resolved
tests/php/Service/RoomServiceTest.php Outdated Show resolved Hide resolved
@nickvergessen
Copy link
Member

We also need 2 capabilities:

  1. A feature flag, so client can know when they can send the password in the createRoom request (and it needs to be documented in
    | `objectId` | string | Id of an object this room references, room token is used for the parent of a breakout room |
    )
  2. A config flag, if the password requirement is enforced

@miaulalala miaulalala marked this pull request as draft November 18, 2024 12:03
@miaulalala miaulalala marked this pull request as ready for review November 18, 2024 17:07
docs/conversation.md Outdated Show resolved Hide resolved
lib/Service/RoomService.php Show resolved Hide resolved
lib/Service/RoomService.php Show resolved Hide resolved
lib/Service/RoomService.php Show resolved Hide resolved
lib/Service/RoomService.php Show resolved Hide resolved
@nickvergessen
Copy link
Member

Can you rebase, so CI runs?

@miaulalala miaulalala force-pushed the feat/add-password-config-option branch from ad9fb9f to 25d7135 Compare November 20, 2024 10:56
docs/conversation.md Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Controller/RoomController.php Outdated Show resolved Hide resolved
lib/Service/RoomService.php Outdated Show resolved Hide resolved
@nickvergessen
Copy link
Member

Almost there, just a small bug and some documentation fixes

@miaulalala miaulalala marked this pull request as draft November 21, 2024 14:27
@miaulalala miaulalala force-pushed the feat/add-password-config-option branch from f7e9726 to 4a5795f Compare November 25, 2024 11:28
@miaulalala miaulalala force-pushed the feat/add-password-config-option branch 2 times, most recently from cf54d5d to 010bb92 Compare November 27, 2024 13:47
@miaulalala miaulalala changed the title feat: add option to force passwords in public conversations feat(conversations): add option to force passwords Nov 27, 2024
@miaulalala miaulalala force-pushed the feat/add-password-config-option branch from 010bb92 to 3fd8877 Compare November 27, 2024 13:49
@miaulalala miaulalala marked this pull request as ready for review November 27, 2024 13:50
@@ -115,7 +115,6 @@
## Creating a new conversation

*Note:* Creating a conversation as a child breakout room, will automatically set the lobby when breakout rooms are not started and will always overwrite the room type with the parent room type. Also, moderators of the parent conversation will be automatically added as moderators.

Copy link
Member

Choose a reason for hiding this comment

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

this needs to be readded (otherwise the docs list breaks), try to run mkdocs serve locally
grafik

Copy link
Member

Choose a reason for hiding this comment

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

$password parameter should also be added to Allow guests in a conversation (public conversation)

@@ -645,10 +654,10 @@ protected function createCircleRoom(string $targetCircleId): DataResponse {
}

/**
* @return DataResponse<Http::STATUS_CREATED, TalkRoom, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error?: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
* @return DataResponse<Http::STATUS_CREATED, TalkRoom, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error?: string, hint?: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
Copy link
Member

Choose a reason for hiding this comment

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

Should we use message to align with the other cases where we add the human readable message?

Suggested change
* @return DataResponse<Http::STATUS_CREATED, TalkRoom, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error?: string, hint?: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
* @return DataResponse<Http::STATUS_CREATED, TalkRoom, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error?: string, message?: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>

Same then in the actual code I guess

} catch (TypeException $e) {
return new DataResponse(['error' => $e->getReason()], Http::STATUS_BAD_REQUEST);
}

return new DataResponse();

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

nitpick

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

Successfully merging this pull request may close these issues.

Add option to force passwords for public conversations
3 participants