Skip to content

compose: Don't show compose box for private, unsubscribed channels #1652

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chrisbobbe
Copy link
Collaborator

@chrisbobbe chrisbobbe commented Jul 2, 2025

I noticed this while working on #1555.

Fixes #1651.

Before After
Screenshot 2025-07-01 at 5 22 34 PM Screenshot 2025-07-01 at 5 27 04 PM

@chrisbobbe chrisbobbe requested a review from rajveermalviya July 2, 2025 00:25
@chrisbobbe chrisbobbe added a-compose Compose box, autocomplete, attaching files/images maintainer review PR ready for review by Zulip maintainers labels Jul 2, 2025
Copy link
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

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

Thanks @chrisbobbe! LGTM.

@rajveermalviya rajveermalviya added integration review Added by maintainers when PR may be ready for integration and removed maintainer review PR ready for review by Zulip maintainers labels Jul 2, 2025
@rajveermalviya rajveermalviya requested a review from gnprice July 2, 2025 20:11
user: store.selfUser, byDate: DateTime.now())) {
if (
channel == null
|| (channel.inviteOnly && channel is! Subscription)
Copy link
Member

Choose a reason for hiding this comment

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

Huh interesting. Is this the right logic?

You could be viewing a channel that's private, you're not subscribed, but you have content access to (now that that's a thing). In that case I'd expect the rule for whether you can post to be the same as it is for a public channel.

Copy link
Collaborator Author

@chrisbobbe chrisbobbe Jul 3, 2025

Choose a reason for hiding this comment

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

you have content access to (now that that's a thing)

Are you thinking of shared vs. protected history, or is there a newer feature than that that I'm not aware of?

Copy link
Member

Choose a reason for hiding this comment

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

This one: https://zulip.com/help/configure-who-can-subscribe

This permission grants access to channel content: users who are allowed to subscribe to a channel will also be able to read messages in it without subscribing.

It looks like in order to send, one then has to actually subscribe:

A designer on the team could then follow a link to a conversation in the private engineering channel, and read it without subscribing. They could subscribe if they need to send a message there, without asking for help.

Seems like a wart that that's different from the behavior for public channels, though. And ISTR a recent chat thread where either Alya or Tim said that behavior for public channels was likely to change.

I think the upshot is:

  • this logic should live somewhere more central, in model code; probably within the hasPostingPermission method (which in turn should ultimately be on ChannelStore, after other refactors);
  • the public-vs-private quirk should get a comment pointing to the help page and/or to a relevant chat thread;
  • let's finish taking care of search and some other priorities before returning to finish this 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

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

zulip/zulip#21433 has some work by a current GSoC participant.

@gnprice gnprice added this to the M7: Future milestone Jul 3, 2025
@gnprice
Copy link
Member

gnprice commented Jul 3, 2025

(Propagated the milestone from the issue.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-compose Compose box, autocomplete, attaching files/images integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compose: Hide compose box for private, unsubscribed channels
4 participants