mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 16:24:43 +03:00
Add "invitationReject" event
This commit is contained in:
parent
b83cb193f1
commit
1dea407037
@ -70,6 +70,16 @@ final class Events
|
||||
*/
|
||||
const INVITATION_ACCEPT = 'invitationAccept';
|
||||
|
||||
/**
|
||||
* An invitation is rejected.
|
||||
*
|
||||
* This event is triggered after an invitation has been rejected by a
|
||||
* visitor. An associative array with the following items is passed to the
|
||||
* event handlers:
|
||||
* - "invitation": an instance of {@link \Mibew\Thread} class.
|
||||
*/
|
||||
const INVITATION_REJECT = 'invitationReject';
|
||||
|
||||
/**
|
||||
* An operator cannot be authenticated.
|
||||
*
|
||||
|
@ -206,6 +206,8 @@ function invitation_accept($visitor_id)
|
||||
/**
|
||||
* Inviation was rejected by visitor
|
||||
*
|
||||
* Triggers {@link \Mibew\EventDispatcher\Events::INVITATION_REJECT} event.
|
||||
*
|
||||
* @param int $visitor_id ID of the visitor
|
||||
*/
|
||||
function invitation_reject($visitor_id)
|
||||
@ -237,6 +239,9 @@ function invitation_reject($visitor_id)
|
||||
':now' => time(),
|
||||
)
|
||||
);
|
||||
|
||||
$args = array('invitation' => $thread);
|
||||
EventDispatcher::getInstance()->triggerEvent(Events::INVITATION_REJECT, $args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user