8000 Fix flag of new content notification space by yurabakhtin · Pull Request #7014 · humhub/humhub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix flag of new content notification space #7014

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

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

yurabakhtin
Copy link
Contributor

What kind of change does this PR introduce? (check at least one)

  • Bugfix

The PR fulfills these requirements:

  • All tests are passing
  • Changelog was modified

Other information:
#7005

@@ -91,7 +91,7 @@ public function init()
if ($this->space->isMember()) {
$membership = $this->space->getMembership();

if (!$membership->send_notifications) {
if (!$membership->send_notifications && !Yii::$app->notification->hasSpace($this->space)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need the !$membership->send_notifications check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it may be deleted, If we will remove the !$membership->send_notifications from here the result is not changed because inside the method hasSpace() this checking is done too but there is an additional sql query to the table space_memberhip for all spaces.
I have decided to keep it here only to avoid the sql query when this setting is already enabled per current User and Space.
I.e. the removing will make the code cleaner but a bit slower.

Copy link
Contributor

Choose a reason for hiding this comment

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

@yurabakhtin Thanks, then let's leave it as it is!

@luke- luke- merged commit 3696a0e into master Jun 10, 2024
6 checks passed
@luke- luke- deleted the fix/7005-receive-new-content-notification-space branch December 21, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Receive 'New Content' Notifications for spaces in global settings is not taking in account in the space
2 participants
0