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

Communicate upfront when user is not allowed to send a DM #21896

Closed
Tracked by #22659
alya opened this issue Apr 22, 2022 · 22 comments · Fixed by #26650
Closed
Tracked by #22659

Communicate upfront when user is not allowed to send a DM #21896

alya opened this issue Apr 22, 2022 · 22 comments · Fixed by #26650
Assignees
Labels

Comments

@alya
Copy link
Contributor

alya commented Apr 22, 2022

[updated Apr 2023]

At present, when a user is not allowed to send a DM, we notify them via a banner after the "Send" button is pressed:

Screen Shot 2022-04-22 at 2 48 24 PM

This can cause frustration, as the user may have spent some time composing the message.

Instead, if a user does not have permission to send a DM message, we should:

  • Change the banner text to: "You are not allowed to send direct messages in this organization."
  • Show the banner immediately whenever a DM addressee is selected that the user is not allowed to send a DM to. (See comment below.)
  • Disable the "Send" button.
  • Show a tooltip on the "Send" button with the same content as the banner.

CZO discussion 1
CZO discussion 2

For stream messages, the corresponding issue is tracked as #25219.

@karanka
Copy link
Collaborator

karanka commented Apr 22, 2022

@alya would this be in the message_send.py?

@yashd26
Copy link
Collaborator

yashd26 commented Apr 24, 2022

Hey @karanka, are you working on this issue?

@manila
Copy link
Collaborator

manila commented Apr 27, 2022

@zulipbot claim

@zulipbot
Copy link
Member

Hello @manila, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

@manila
Copy link
Collaborator

manila commented Apr 27, 2022

I'd like to work on this issue if possible (my other issue is pending further discussion). There are two considerations that seem important when solving this:

  1. Private Messages are allowed for bots when PM's are disabled org wide and thus shouldn't be stopped
  2. Private Messages to other users should be stopped early when PM's are disabled in the org and so we should receive an error as soon as it's clear an individual user is being included when composing a message

My proposal for this might look something like this:

issue-21896

Feedback and ideas welcome! My initial thought is that only using a tooltip on the send button could be easily overlooked. I think utilizing the compose warnings might be more effective especially if they can happen as soon as a user (not a bot) is added as a recipient

@manila
Copy link
Collaborator

manila commented May 1, 2022

@zulipbot claim

@zulipbot
Copy link
Member

zulipbot commented May 11, 2022

@manila You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

@manila
Copy link
Collaborator

manila commented May 11, 2022

Hello! PR #21971 is ready for review which may close this issue, as I understand it I would need to un-assign myself on this issue to formally claim another?

There could still be some discussion around this issue so I'll opt to stay on this one for now

@alya
Copy link
Contributor Author

alya commented May 17, 2022

I would need to un-assign myself on this issue to formally claim another?

@manila yep, that's right, but please feel free to informally claim something with a comment while waiting for feedback here.

@amanagr
Copy link
Member

amanagr commented May 17, 2022

@manila also note the new task at the end of issue description:

When a user is not allowed to send messages to a particular stream, disable the "Send" button when composing to that stream. Tooltip: "You are not allowed to send messages to #**stream name**." See CZO thread.

@manila
Copy link
Collaborator

manila commented May 17, 2022

Thank you for pointing out the updated issue description, I'll re-work my existing PR #21971 to meet these specs

@medhatiwari
Copy link
Collaborator

Hey @manila are you still working on the extended part of this issue?
If not would like to work on this!

@manila
Copy link
Collaborator

manila commented May 20, 2022

Hey @medhatiwari, thanks for checking in, I have been actively working on the updated issue and expect to submit an updated PR shortly. Did you have any additional ideas or comments that you thought might be helpful in regard to this issue?

Would you like to be tagged when I submit my PR as a peer reviewer?

@medhatiwari
Copy link
Collaborator

Hey @medhatiwari, thanks for checking in, I have been actively working on the updated issue and expect to submit an updated PR shortly. Did you have any additional ideas or comments that you thought might be helpful in regard to this issue?

Heya, I just wanted to confirm If I could contribute.

Would you like to be tagged when I submit my PR as a peer reviewer?

Yeah definitely, would love to see your work!

manila added a commit to manila/zulip that referenced this issue May 23, 2022
manila added a commit to manila/zulip that referenced this issue May 23, 2022
manila added a commit to manila/zulip that referenced this issue May 29, 2022
manila added a commit to manila/zulip that referenced this issue Jun 10, 2022
manila added a commit to manila/zulip that referenced this issue Jun 11, 2022
manila added a commit to manila/zulip that referenced this issue Sep 18, 2022
Disable send button if private messages are disabled and user is composing
a message. Disable send button if user doesn't have permissions to send to
stream when composing. Add frontend node tests for check_send_permissions
and check_stream_send_permissions.

Fixes: zulip#21896
manila added a commit to manila/zulip that referenced this issue Sep 23, 2022
Disable send button if private messages are disabled and user is composing
a message. Disable send button if user doesn't have permissions to send to
stream when composing. Add frontend node tests for check_send_permissions
and check_stream_send_permissions.

Fixes: zulip#21896
@alya alya changed the title Disable "Send" button when user is not allowed to send private messages Disable "Send" button when user is not allowed to send a message Sep 26, 2022
manila added a commit to manila/zulip that referenced this issue Nov 8, 2022
Disable send button if private messages are disabled and user is composing
a message. Disable send button if user doesn't have permissions to send to
stream when composing. Add frontend node tests for check_send_permissions
and check_stream_send_permissions.

Fixes: zulip#21896
@palashb01
Copy link
Collaborator

Hey @manila , I noticed that the PR hasn't been updated recently. Are you still actively working on this issue, or should I take over?.

@Joelute
Copy link
Collaborator

Joelute commented Apr 18, 2023

@zulipbot claim

@alya alya changed the title Disable "Send" button when user is not allowed to send a message Communicate upfront when user is not allowed to send a DM Apr 21, 2023
Joelute added a commit to Joelute/zulip that referenced this issue Sep 6, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 6, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
Joelute added a commit to Joelute/zulip that referenced this issue Sep 7, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
@timabbott timabbott added area: compose (banners & validation) Validation and banners in the compose box and removed area: compose (misc) labels Sep 19, 2023
timabbott pushed a commit that referenced this issue Sep 21, 2023
After the changes in #25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: #21896.
timabbott pushed a commit that referenced this issue Sep 21, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: #21896.
Vector73 pushed a commit to Vector73/zulip that referenced this issue Sep 27, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
Vector73 pushed a commit to Vector73/zulip that referenced this issue Sep 27, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
ToBadForYou pushed a commit to ToBadForYou/zulip that referenced this issue Oct 7, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
ToBadForYou pushed a commit to ToBadForYou/zulip that referenced this issue Oct 7, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
macieksarnowicz pushed a commit to macieksarnowicz/zulip that referenced this issue Oct 16, 2023
After the changes in zulip#25572, users were no longer able to start a direct
message with bots if the organization disabled direct messages. However,
we should allow direct messages to bots regardless of the policy because
it's a useful interface for users to interact with various classes of
bots.

user_ids_string_to_ids_array was also modified to prevent cases where
the split function returned an array of [0] rather than [] when dealing
with a empty id string of "".

Fixes: zulip#21896.
macieksarnowicz pushed a commit to macieksarnowicz/zulip that referenced this issue Oct 16, 2023
Previously, the text on the warning banner when the user is not allowed
to direct message is "Direct messages are disabled in this organization.".
While the text on the warning banner when the user is not allowed to
send message to stream is "You do not have permission to post in this
stream". These wording is inconsistent with each other and we should
change it to keep them consistent and aligned with each other.

Fixes: zulip#21896.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
10 participants