Commit d85436cf authored by Mark Harding's avatar Mark Harding

(chore): serialized appeal sent

1 merge request!100Epic/reporting and moderation
Pipeline #62745497 canceled with stages
......@@ -33,7 +33,7 @@ class ReportsAppealSummon implements QueueRunner
$params = $data->getData();
/** @var Appeal $appeal */
$appeal = $params['appeal'] ?? null;
$appeal = $params['appeal'] ? unserialize($params['appeal']) : null;
/** @var string[] $cohort */
$cohort = $params['cohort'] ?? null;
......
......@@ -26,10 +26,21 @@ class SummonDelegate
public function onAppeal(Appeal $appeal)
{
switch ($appeal->getReport()->getReasonCode()) {
case 1: // Illegal
case 3: // Encourages or incites violence
case 5: // Personal and confidential information
case 15: // Trademark infringement
case 10: // Copyright
case 16: // Token manipulation
case 13: // Malware
return; // Can not have community jury
}
$this->queue
->setQueue('ReportsAppealSummon')
->send([
'appeal' => $appeal,
'appeal' => serialize($appeal),
'cohort' => null, // TODO: It can be an array of user guids. For development purposes only.
]);
}
......
......@@ -207,7 +207,7 @@ class Manager
$this->queueClient
->setQueue('ReportsAppealSummon')
->send([
'appeal' => $appeal,
], 70);
'appeal' => serialize($appeal),
], 10); // loop every 10 seconds
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment