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

conversation state: Only Moderators can write #5259

Closed
wants to merge 3 commits into from

Conversation

jakobroehrl
Copy link
Contributor

Signed-off-by: Jakob Röhrl jakob.roehrl@web.de
solves: #3886

appinfo/routes.php Outdated Show resolved Hide resolved
src/services/conversationsService.js Outdated Show resolved Hide resolved
src/store/conversationsStore.js Outdated Show resolved Hide resolved
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
@jakobroehrl jakobroehrl force-pushed the enh/limitWritingToMods branch 3 times, most recently from 0bb8fab to 407bfa5 Compare February 26, 2021 12:14
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
@jakobroehrl

This comment has been minimized.

@jakobroehrl

This comment has been minimized.

@PVince81
Copy link
Member

PVince81 commented Mar 4, 2021

  • increase the field width

image

@ma12-co or replace it with something similar-looking like the notifications ?

@PVince81
Copy link
Member

PVince81 commented Mar 4, 2021

  • bug: the reply and delete options are still visible in the menu even when I can't post (could be a separate bug that existed before)

image

@PVince81
Copy link
Member

PVince81 commented Mar 4, 2021

@PVince81

This comment has been minimized.

@jakobroehrl

This comment has been minimized.

@PVince81
Copy link
Member

PVince81 commented Mar 8, 2021

  • please search for "readonly" on the server side, there are various places to extend like for example the occ commands to allow setting the new flag

How to change it here? @PVince81

1. https://github.com/nextcloud/spreed/blob/master/lib/Command/Room/TRoomCommand.php#L149

2. https://github.com/nextcloud/spreed/blob/master/lib/Command/Room/Update.php#L102

For 1. change the boolean to int and check where the function is called.

For 2, that line is for validating the occ command input. Just add the new constant you introduced into the array.

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
*
* @throws InvalidArgumentException
*/
protected function setRoomReadOnly(Room $room, bool $readOnly): void {
protected function setRoomReadOnly(Room $room, int $readOnly): void {
Copy link
Member

Choose a reason for hiding this comment

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

please also change the next line, you need to compare the int value now

Copy link
Member

Choose a reason for hiding this comment

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

please recheck the whole function, it needs to be rewritten to handle the int value as it's not a bool any more

@PVince81
Copy link
Member

Further locations I've found by grepping variations of "readOnly", "read-only", "read_only" that will need adjusting:

@jakobroehrl jakobroehrl removed their assignment Mar 17, 2021
@nickvergessen
Copy link
Member

Turning into a draft for the open points to have the review/to merge list cleaner

@nickvergessen
Copy link
Member

@jakobroehrl any chance you want to continue on this?

@jakobroehrl
Copy link
Contributor Author

@jakobroehrl any chance you want to continue on this?

I don't think so, sorry. It's a little bit to deep into PHP. Maybe you can do it? and I support? Or we just close it?

@nickvergessen
Copy link
Member

I will close the PR for now. Anyone can pick it up whenever they want and reopen the PR.

@nickvergessen nickvergessen deleted the enh/limitWritingToMods branch October 7, 2021 16:46
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.

3 participants