Skip to content

Commit

Permalink
Fix recurring event visibility on stream
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Sep 5, 2023
1 parent c550171 commit 0e7e0fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.5.3 (Unreleased)
-----------------------
- Enh #415: Fix recurring event visibility on stream

1.5.2 (August 11, 2023)
-----------------------
- Enh #405: Improve UI of create/edit form on mobile
Expand Down
4 changes: 3 additions & 1 deletion models/CalendarEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ public function beforeSave($insert)
$this->participation->setDefautls();
}

if (RecurrenceHelper::isRecurrentRoot($this)) {
if (RecurrenceHelper::isRecurrentRoot($this) ||
(RecurrenceHelper::isRecurrentInstance($this) && $this->content->hidden)) {
$this->streamChannel = null;
}

Expand Down Expand Up @@ -933,6 +934,7 @@ public function syncEventData($root, $original = null)
{
$this->content->created_by = $root->content->created_by;
$this->content->visibility = $root->content->visibility;
$this->content->hidden = $root->content->hidden;

if (!$original || empty($this->description) || $original->description === $this->description) {
$this->description = $root->description;
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Calendar",
"description": "Calendar for spaces or user profiles.",
"keywords": ["calendar"],
"version": "1.5.2",
"version": "1.5.3",
"humhub": {
"minVersion": "1.14"
},
Expand Down

0 comments on commit 0e7e0fd

Please sign in to comment.