diff --git a/extensions/lock/js/src/forum/components/DiscussionLockedNotification.js b/extensions/lock/js/src/forum/components/DiscussionLockedNotification.js index ab2f92d10..dddc4abea 100644 --- a/extensions/lock/js/src/forum/components/DiscussionLockedNotification.js +++ b/extensions/lock/js/src/forum/components/DiscussionLockedNotification.js @@ -12,6 +12,6 @@ export default class DiscussionLockedNotification extends Notification { } content() { - return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {user: this.props.notification.sender()}); + return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {user: this.props.notification.fromUser()}); } } diff --git a/extensions/lock/src/Listener/CreatePostWhenDiscussionIsLocked.php b/extensions/lock/src/Listener/CreatePostWhenDiscussionIsLocked.php index 93283cd17..3234ad930 100755 --- a/extensions/lock/src/Listener/CreatePostWhenDiscussionIsLocked.php +++ b/extensions/lock/src/Listener/CreatePostWhenDiscussionIsLocked.php @@ -96,10 +96,10 @@ class CreatePostWhenDiscussionIsLocked $post = $discussion->mergePost($post); - if ($discussion->start_user_id !== $user->id) { + if ($discussion->user_id !== $user->id) { $notification = new DiscussionLockedBlueprint($post); - $this->notifications->sync($notification, $post->exists ? [$discussion->startUser] : []); + $this->notifications->sync($notification, $post->exists ? [$discussion->user] : []); } } } diff --git a/extensions/lock/src/Notification/DiscussionLockedBlueprint.php b/extensions/lock/src/Notification/DiscussionLockedBlueprint.php index ccbc3bcda..98e508ba9 100644 --- a/extensions/lock/src/Notification/DiscussionLockedBlueprint.php +++ b/extensions/lock/src/Notification/DiscussionLockedBlueprint.php @@ -33,7 +33,7 @@ class DiscussionLockedBlueprint implements BlueprintInterface /** * {@inheritdoc} */ - public function getSender() + public function getFromUser() { return $this->post->user; } diff --git a/extensions/lock/src/Post/DiscussionLockedPost.php b/extensions/lock/src/Post/DiscussionLockedPost.php index f65bfe076..497bb1828 100755 --- a/extensions/lock/src/Post/DiscussionLockedPost.php +++ b/extensions/lock/src/Post/DiscussionLockedPost.php @@ -61,7 +61,7 @@ class DiscussionLockedPost extends AbstractEventPost implements MergeableInterfa $post = new static; $post->content = static::buildContent($isLocked); - $post->time = time(); + $post->created_at = time(); $post->discussion_id = $discussionId; $post->user_id = $userId;