Skip to content
Prev Previous commit
Next Next commit
Set read-only state for changelog rooms
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Apr 1, 2019
commit 1ed73636025a676dee26e8a3160a92ff2df21446
4 changes: 4 additions & 0 deletions lib/Chat/SystemMessage/Listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ public static function register(EventDispatcherInterface $dispatcher): void {
/** @var Room $room */
$room = $event->getSubject();

if ($room->getType() === Room::CHANGELOG_CONVERSATION) {
return;
}

/** @var self $listener */
$listener = \OC::$server->query(self::class);

Expand Down
1 change: 1 addition & 0 deletions lib/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ public function getChangelogRoom(string $userId): Room {
if ($row === false) {
$room = $this->createRoom(Room::CHANGELOG_CONVERSATION, $userId);
$room->addUsers(['userId' => $userId]);
$room->setReadOnly(Room::READ_ONLY);
return $room;
}

Expand Down