diff --git a/files/lib/system/command/WhisperCommand.class.php b/files/lib/system/command/WhisperCommand.class.php index 351f4b6..3918fe5 100644 --- a/files/lib/system/command/WhisperCommand.class.php +++ b/files/lib/system/command/WhisperCommand.class.php @@ -1,11 +1,11 @@ getMessageObjectTypeID('be.bastelstu.chat.messageType.whisper'); $recipient = $this->assertUser($this->assertParameter($parameters, 'username')); $this->setText($this->assertParameter($parameters, 'text')); + + WCF::getDB()->beginTransaction(); $message = (new MessageAction([ ], 'create', [ 'data' => [ 'roomID' => $room->roomID , 'userID' => $user->userID , 'username' => $user->username @@ -79,5 +80,6 @@ class WhisperCommand extends AbstractInputProcessedCommand implements ICommand { 'hasEmbeddedObjects' => 1 ]); } + WCF::getDB()->commitTransaction(); } }