-
Notifications
You must be signed in to change notification settings - Fork 448
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
Add ability to invite groups #1268
Conversation
a08bdb7
to
e7cffa7
Compare
e7cffa7
to
25a15a0
Compare
lib/Controller/RoomController.php
Outdated
@@ -769,7 +769,10 @@ public function addParticipantToRoom(string $token, string $newParticipant): Dat | |||
|
|||
$newUser = $this->userManager->get($newParticipant); | |||
if (!$newUser instanceof IUser) { | |||
return new DataResponse([], Http::STATUS_NOT_FOUND); | |||
$newUser = $this->groupManager->get($newParticipant); |
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 needs to be explicit, if you selected the group, the user with the same name should not be added.
Similar to when a room is created, the share tpye should be handed in and then reacted upon respectivly.
@nickvergessen updated! |
Fix a missing , Move to tabs
Signed-off-by: Joas Schilling <coding@schilljs.com>
4fb59f7
to
ad06759
Compare
* @return DataResponse | ||
*/ | ||
public function addParticipantToRoom(string $token, string $newParticipant): DataResponse { | ||
public function addParticipantToRoom(string $token, string $newParticipant, string $source = 'users'): DataResponse { |
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.
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.
Instead of:
$.post(
OC.linkToOCS('apps/spreed/api/v1/room', 2) + token + '/participants/guests',
{
newParticipant: email
}
)
you do:
$.post(
OC.linkToOCS('apps/spreed/api/v1/room', 2) + token + '/participants',
{
newParticipant: email,
source: 'emails'
}
)
lets do this.
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.
Added as a new commit, if anyone of you does not agree, we can simply drop it from this PR.
Signed-off-by: Joas Schilling <coding@schilljs.com>
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.
Fixed the web UI and the endpoint, all good now.
Signed-off-by: Joas Schilling <coding@schilljs.com>
I agree, except that I'd change the capability to a different name (other than "invite-group"). Maybe unified-invite seems more appropriate? |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Adjusted the capability |
I want to have the ability to invite groups to a conversation, as well as users. Re-using the existing endpoint sounds sane to me so this is my attempt.
Be gentle! :)
Todos: