Don't treat these ints as strings (quicker comparison).

This commit is contained in:
Keir 2015-12-16 13:58:05 +00:00
parent 56d606adf0
commit 9c7c6fdb37

View File

@ -241,7 +241,7 @@ function removeBadCharacters($input)
foreach($messages as $message):
$typeId = $message->getType();
$typeDisplayName = Message::$TYPE_DISPLAY_NAMES[$typeId];
$isPM = strcmp($typeId, Message::TYPE_PM) == 0;
$isPM = $typeId == Message::TYPE_PM;
// If this is a PM, then the "-> <recipient>" suffix will be applied.
$involved = $message->getSender()->getUsername() . ($isPM ? " -> " . $message->getRecipients()[0]->getUsername() : "");