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

streams: Send message when a user is unsubscribed from a channel. #32149

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

Conversation

Aditya8840
Copy link
Collaborator

@Aditya8840 Aditya8840 commented Oct 27, 2024

Previously, Notification Bot only sent messages to notify users when they were added to channels by others. However, there was no corresponding notification when they were removed from channels.

This commit ensures that when a user is unsubscribed from a channel by another user, Notification Bot sends a message to inform them, using a silent mention of the acting user. The message follows this format:

@_username unsubscribed you from the channel #channel_name.

Fixes: #29272


Screenshots and Screen Captures

Scenario Screenshot
Single Stream Unsubscribe Notification Single Stream Unsubscribe Notification
Multiple Streams Unsubscribe Notification Multiple Streams Unsubscribe Notification
Change Type Image Link
Documentation Change 1 Documentation Change 1
Documentation Change 2 Documentation Change 2

Self-review Checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@Aditya8840 Aditya8840 force-pushed the unsubscribe branch 6 times, most recently from d0723af to 5b34d4d Compare October 27, 2024 20:54
@Aditya8840 Aditya8840 marked this pull request as draft October 31, 2024 19:44
@Aditya8840 Aditya8840 force-pushed the unsubscribe branch 3 times, most recently from 7c518dd to 930404c Compare November 3, 2024 21:45
@Aditya8840 Aditya8840 marked this pull request as ready for review November 3, 2024 21:46
@Aditya8840
Copy link
Collaborator Author

@alya , This PR is ready for review !!

@prakhar1144
Copy link
Member

@Aditya8840 #29307 already has some work on this with a lot of review feedbacks. Does this PR has work on top of that ?

See: https://zulip.readthedocs.io/en/latest/contributing/continuing-unfinished-work.html#review-existing-work-and-feedback

@Aditya8840
Copy link
Collaborator Author

Sure, I'll rebase the commit. This PR also addresses the previously unaddressed feedback on #29307. I’d appreciate initial feedback on the implementation.

Aditya8840 and others added 2 commits November 17, 2024 03:42
This commit introduces a silent mention notification to be sent
when a user is subscribed to a channel.
Previously, Notification Bot only sent messages to notify users when
they were added to channels by others. However, there was no
corresponding notification when they were removed from channels.

This commit ensures that when a user is unsubscribed from a channel
by another user, Notification Bot sends a message to inform them,
using a silent mention of the acting user. The message follows this
format:

"@_**username** unsubscribed you from the channel #channel_name."

Fixes: zulip#29272
Co-authored-by: Tanmay Kumar <tnmkr@users.noreply.github.com>
@Aditya8840
Copy link
Collaborator Author

@prakhar1144 I have rebased this PR. Could you please take a look and provide some initial feedback?

@zulipbot
Copy link
Member

Heads up @Aditya8840, we just merged some commits that conflict with the changes you made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

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