$aIds = $arg0->fromMemory($arg0->_sGroupContactsCache . $arg1, "getColumn", "SELECT `tp`.`ID` AS `id` FROM `sys_messages` AS `tm` INNER JOIN `Profiles` AS `tp` ON (`tm`.`Sender`=`tp`.`ID` AND `tm`.`Recipient`='" . $arg1 . "') OR (`tm`.`Recipient`=`tp`.`ID` AND `tm`.`Sender`='" . $arg1 . "')"); return isProfileActive($arg2) && in_array($arg2, $aIds);