Skip to content

Commit 4fbb425

Browse files
Stay on current page after checking messages/requests.
1 parent 103c47a commit 4fbb425

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Controller/Admin/CheckerController.php

+4
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ private function handleMessages(Request $request, int $type): Response
253253
$this->checkerModel->unmarkAsSpamByChecker($noSpamMessageIds);
254254
$this->addFlash('notice', 'Set spam status');
255255

256+
if ($type === self::MESSAGES_BLOCK_WORDS_PROCESSED) {
257+
return $this->redirectToRoute('admin_spam_messages_block_words');
258+
}
259+
256260
return $this->redirectToRoute('admin_spam_messages');
257261
}
258262
}

src/Model/ConversationModel.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,15 @@ public function getLastMessageInConversation(Message $probableParent): Message
265265
{
266266
// Check if there is already a newer message than the one used for the request
267267
// as there might be a clash of replies
268-
/** @var MessageRepository */
268+
/** @var MessageRepository $messageRepository */
269269
$messageRepository = $this->entityManager->getRepository(Message::class);
270270
/** @var Message[] $messages */
271271
$messages = $messageRepository->findBy(['subject' => $probableParent->getSubject()]);
272272

273273
return $messages[\count($messages) - 1];
274274
}
275275

276-
public function markConversationAsRead(Member $member, array $thread)
276+
public function markConversationAsRead(Member $member, array $thread): void
277277
{
278278
// Walk through the thread and mark all messages as read (for current member)
279279
$em = $this->entityManager;

0 commit comments

Comments
 (0)