This pull request adds an optional exclude_user_id parameter to the send_notification_to_group and send_group_notification functions. The main objective is to allow the exclusion of a user from receiving notifications that they themselves have triggered within a group they are part of.
Changes
Add exclude_user_id=None parameter to send_notification_to_group in utils.py.
Extend send_group_notification in __init__.py to support the new exclude_user_id parameter.
Motivation
Before this change, if a user sent a notification to a group they belong to, they would receive the notification themselves. In scenarios where a user triggers an event that results in a group notification, this behavior leads to redundant and potentially confusing notifications for the user who initiated the action. This update provides a way to prevent such situations.
Backward Compatibility
The changes introduced in this PR are backward-compatible. The new exclude_user_id parameter is optional, and omitting it will not affect the existing functionality.
Summary
This pull request adds an optional
exclude_user_id
parameter to thesend_notification_to_group
andsend_group_notification
functions. The main objective is to allow the exclusion of a user from receiving notifications that they themselves have triggered within a group they are part of.Changes
exclude_user_id=None
parameter tosend_notification_to_group
inutils.py
.send_group_notification
in__init__.py
to support the newexclude_user_id
parameter.Motivation
Before this change, if a user sent a notification to a group they belong to, they would receive the notification themselves. In scenarios where a user triggers an event that results in a group notification, this behavior leads to redundant and potentially confusing notifications for the user who initiated the action. This update provides a way to prevent such situations.
Backward Compatibility
The changes introduced in this PR are backward-compatible. The new
exclude_user_id
parameter is optional, and omitting it will not affect the existing functionality.