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

Do not show edit message option in message action sheet if edit time is passed or message edit is not allowed on that realm. #2792

Open
jainkuniya opened this issue Jul 12, 2018 · 3 comments · May be fixed by #4599
Labels
blocked on other work To come back to after another related PR, or some other task. @zulip/shared Good spots to share code with the webapp

Comments

@jainkuniya
Copy link
Member

This will fix issues like

https://chat.zulip.org/#narrow/stream/48-mobile/topic/Inability.20to.20edit.20a.20message.20right.20after.20posting

@zulipbot claim

rajprakash00 added a commit to rajprakash00/zulip-mobile that referenced this issue Apr 5, 2021
Currently in zulip web app when edit/delete time limit
exceeds, edit/delete option button is removed.

Handle this feature in mobile version too, like this:

1.If it is "Private messages" narrow remove the buttons.
2.If it is "Topic or Stream messages" narrow keep edit
  button for editing of topic names, remove delete button.

Fixes: zulip#2792,zulip#2793
Signed-off-by: rajprakash00 <rajprakash1999@gmail.com>
@chrisbobbe
Copy link
Contributor

I believe there are two realm-specific server settings we'll need to read, in order to fix this issue:

  • Whether the realm allows editing messages
  • The time limit on editing messages

So in particular we can't do something like assume message-editing is allowed and use a hard-coded time limit of 60 minutes, just because those are the settings on CZO. 🙂

rajprakash00 added a commit to rajprakash00/zulip-mobile that referenced this issue Apr 7, 2021
Currently in zulip web app when edit/delete time limit
exceeds, edit/delete option button is removed.

Handle this feature in mobile version too, like this:

1.If it is "Private messages" narrow remove the buttons.
2.If it is "Topic or Stream messages" narrow keep edit
  button for editing of topic names, remove delete button.

Fixes: zulip#2792,zulip#2793
Signed-off-by: rajprakash00 <rajprakash1999@gmail.com>
rajprakash00 added a commit to rajprakash00/zulip-mobile that referenced this issue Apr 8, 2021
Handle the actual edit,delete message realm data as
follows:

* Import realm permission,timelimit data for edit,delete
  message into `realmReducer` from `initalDatatypes`.Handle
  types for them in `reduxTypes`.

* Add all new realm data in `BackgroundData` in `MessageList`.

* Handle the `backgroundData` params in `messageActionsheet`.

* Add all the new realm data in `baseBackgroundData` in test
  files : `messageActionSheet-test`,`generateInboundEvents-test`
  and to `expectedState` in `realmReducer-test` file.

Fixes: zulip#2792
Fixes: zulip#2793
Signed-off-by: rajprakash00 <rajprakash1999@gmail.com>
rajprakash00 added a commit to rajprakash00/zulip-mobile that referenced this issue May 2, 2021
Handle the actual edit,delete message realm data as
follows:

* Import realm permission,timelimit data for edit,delete
  message into `realmReducer` from `initalDatatypes`.Handle
  types for them in `reduxTypes`.

* Add all new realm data in `BackgroundData` in `MessageList`.

* Handle the `backgroundData` params in `messageActionsheet`.

* Add all the new realm data in `baseBackgroundData` in test
  files : `messageActionSheet-test`,`generateInboundEvents-test`
  and to `expectedState` in `realmReducer-test` file.

Fixes: zulip#2792
Fixes: zulip#2793
Signed-off-by: rajprakash00 <rajprakash1999@gmail.com>
@chrisbobbe
Copy link
Contributor

chrisbobbe commented Oct 21, 2021

@chrisbobbe
Copy link
Contributor

I believe there are two realm-specific server settings we'll need to read, in order to fix this issue:

  • Whether the realm allows editing messages
  • The time limit on editing messages

So in particular we can't do something like assume message-editing is allowed and use a hard-coded time limit of 60 minutes, just because those are the settings on CZO. 🙂

It occurs to me that we also have to have some pretty subtle logic with some more inputs, like the user's role. Let's get #3898 done before this if we can.

@chrisbobbe chrisbobbe added blocked on other work To come back to after another related PR, or some other task. and removed zz-in progress labels Oct 27, 2021
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Oct 27, 2021
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Oct 27, 2021
@gnprice gnprice added the @zulip/shared Good spots to share code with the webapp label Nov 1, 2021
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Nov 2, 2021
chrisbobbe added a commit to chrisbobbe/zulip-mobile that referenced this issue Nov 2, 2021
gnprice pushed a commit to chrisbobbe/zulip-mobile that referenced this issue Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked on other work To come back to after another related PR, or some other task. @zulip/shared Good spots to share code with the webapp
Projects
None yet
4 participants