mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 02:01:40 +09:00
쪽지 발송 시 스팸필터가 작동하도록 개선
- communication.sendMessage 트리거 추가 - 쪽지 발송 차단 시 메시지 추가
This commit is contained in:
parent
a5f408e05f
commit
6d8137bfc9
5 changed files with 76 additions and 4 deletions
|
|
@ -194,6 +194,19 @@ class communicationController extends communication
|
|||
$receiver_args->readed = 'N';
|
||||
$receiver_args->regdate = date("YmdHis");
|
||||
|
||||
// Call a trigger (before)
|
||||
$trigger_args = new stdClass();
|
||||
$trigger_args->sender_srl = $sender_srl;
|
||||
$trigger_args->receiver_srl = $receiver_srl;
|
||||
$trigger_args->title = $title;
|
||||
$trigger_args->content = $content;
|
||||
$trigger_args->sender_log = $sender_log;
|
||||
$triggerOutput = ModuleHandler::triggerCall('communication.sendMessage', 'before', $trigger_args);
|
||||
if(!$triggerOutput->toBool())
|
||||
{
|
||||
return $triggerOutput;
|
||||
}
|
||||
|
||||
$oDB = DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
|
|
@ -216,6 +229,14 @@ class communicationController extends communication
|
|||
return $output;
|
||||
}
|
||||
|
||||
// Call a trigger (after)
|
||||
$triggerOutput = ModuleHandler::triggerCall('communication.sendMessage', 'after', $trigger_args);
|
||||
if(!$triggerOutput->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $triggerOutput;
|
||||
}
|
||||
|
||||
// create a flag that message is sent (in file format)
|
||||
$flag_path = './files/member_extra_info/new_message_flags/' . getNumberingPath($receiver_srl);
|
||||
FileHandler::makeDir($flag_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue