Events
- Most core actions in this package will dispatch event(s). This gives you the flexibility to attach your own event listeners as needed.
- By default, specific events have already been subscribed to internally through the event subscribers. Depending on your config settings, these subscribers can be enabled or disabled.
- Note that all the events dispatched will come from the namespace
RTippin\Messenger\Events
BotActionFailedEvent
- Dispatched when a
BotActionHandlerfails being triggered, resulting in an exception. The exception will be caught and forwarded into this event.-
$event->action:BotActionmodel that failed. -
$event->exception:Throwableexception thrown.
-
BotActionHandledEvent
- Dispatched when a
BotActionHandleris successfully handled.-
$event->action:BotActionmodel that was triggered. -
$event->message:Messagemodel that triggered theBotAction. -
$event->trigger:string|nulltrigger that was matched on theBotAction.
-
BotActionRemovedEvent
- Dispatched when a
BotActionis deleted.-
$event->provider:?MessengerProvidernullable provider that deleted theBotAction. -
$event->action:arraydata of the deletedBotAction.
-
BotActionUpdatedEvent
- Dispatched when a
BotActionis updated.-
$event->provider:MessengerProviderprovider that updated theBotAction. -
$event->action:BotActionmodel that was updated.
-
BotArchivedEvent
- Dispatched when a
Botis archived.-
$event->provider:MessengerProviderprovider that archived theBot. -
$event->bot:Botmodel that was archived.
-
BotAvatarEvent
- Dispatched when a
Botavatar is uploaded or removed.-
$event->provider:MessengerProviderprovider that updated theBotavatar. -
$event->bot:Botmodel that had its avatar updated.
-
BotUpdatedEvent
- Dispatched when a
Bothas its settings uploaded.-
$event->provider:MessengerProviderprovider that updated theBot. -
$event->bot:Botmodel that was updated. -
$event->originalName:stringoriginal name of theBotbefore being updated, should the bot be given a new name.
-
BroadcastFailedEvent
- Dispatched when a broadcast fails and throws an exception. The exception will be caught and forwarded into this event.
-
$event->abstractBroadcast: AbstractMessengerBroadcastclassstringbeing broadcasted. -
$event->channels:arrayof channels for the broadcast. -
$event->with:arrayof data to be broadcasted. -
$event->exception:Throwableexception thrown.
-
CallEndedEvent
- Dispatched when a
Callis ended.-
$event->provider:?MessengerProvidernullable provider that ended theCall. -
$event->call:Callmodel that was ended.
-
CallIgnoredEvent
- Dispatched when a
Callis ignored.-
$event->provider:MessengerProviderprovider that ignored theCall. -
$event->call:Callmodel that was ignored.
-
CallJoinedEvent
- Dispatched when a
CallParticipantjoins/re-joins aCall.-
$event->participant:CallParticipantmodel that joined theCall. -
$event->call:Callmodel that was joined.
-
CallLeftEvent
- Dispatched when a
CallParticipantleftCall.-
$event->participant:CallParticipantmodel that left theCall. -
$event->call:Callmodel that was left.
-
CallStartedEvent
- Dispatched when a
Callis created.-
$event->thread:Threadmodel theCallbelongs to. -
$event->call:Callmodel that was created.
-
DemotedAdminEvent
- Dispatched when a
Participantis demoted from group admin.-
$event->provider:MessengerProviderprovider that demoted theParticipant. -
$event->thread:Threadmodel theParticipantbelongs to. -
$event->participant:Participantmodel that was demoted.
-
EmbedsRemovedEvent
- Dispatched when embeds on a
Messageare removed.-
$event->provider:MessengerProviderprovider that removed embeds. -
$event->message:Messagemodel embeds were removed from.
-
FriendApprovedEvent
- Dispatched when a
PendingFriendis accepted.-
$event->friend:Friendmodel that was created. -
$event->inverseFriend:Friendinverse model that was created.
-
FriendCancelledEvent
- Dispatched when a
SentFriendis cancelled.-
$event->friend:SentFriendmodel that was deleted.
-
FriendDeniedEvent
- Dispatched when a
PendingFriendis denied.-
$event->friend:PendingFriendmodel that was denied.
-
FriendRemovedEvent
- Dispatched when a
Friendis removed.-
$event->friend:Friendmodel being removed. -
$event->inverseFriend:?Friendnullable inverse model to theFriendremoved.
-
FriendRequestEvent
- Dispatched when a
SentFriendis created.-
$event->friend:SentFriendmodel that was created.
-
InviteArchivedEvent
- Dispatched when an
Inviteis archived.-
$event->provider:?MessengerProvidernullable provider that archived theInvite. -
$event->invite:Invitemodel that was archived.
-
InviteUsedEvent
- Dispatched when an
Inviteis used to join aThread.-
$event->provider:MessengerProviderprovider that used theInviteto join theThread. -
$event->thread:Threadmodel theInvitebelongs to. -
$event->invite:Invitemodel used to join theThread.
-
KickedFromCallEvent
- Dispatched when a
CallParticipantis kicked or un-kicked.-
$event->provider:MessengerProviderprovider that kicked/un-kicked theCallParticipant. -
$event->participant:CallParticipantmodel that was kicked/un-kicked. -
$event->call:Callmodel theCallParticipantbelongs to.
-
KnockEvent
- Dispatched when a knock is sent to a
Thread.-
$event->provider:MessengerProviderprovider that sent the knock. -
$event->thread:Threadmodel the knock was sent to.
-
MessageArchivedEvent
- Dispatched when a
Messageis archived.-
$event->provider:MessengerProviderprovider archived theMessage. -
$event->message:Messagemodel that was archived.
-
MessageEditedEvent
- Dispatched when a
Messageis edited.-
$event->message:Messagemodel that was archived. -
$event->originalBody:?stringnullable original body of the message being edited.
-
NewBotActionEvent
- Dispatched when a
BotActionis created.-
$event->botAction:BotActionmodel that was created.
-
NewBotEvent
- Dispatched when a
Botis created.-
$event->bot:Botmodel that was created.
-
NewInviteEvent
- Dispatched when an
Inviteis created.-
$event->invite:Invitemodel that was created.
-
NewMessageEvent
- Dispatched when a
Messageis created.-
$event->message:Messagemodel that was created. -
$event->thread:Threadmodel theMessagebelongs to. -
$event->isGroupAdmin:boolwhether the message sender is a group thread admin or not. -
$event->senderIp:?stringnullable IP of the message sender.
-
NewThreadEvent
- Dispatched when a
Threadis created.-
$event->provider:MessengerProviderprovider that created theThread. -
$event->thread:Threadmodel that was created.
-
PackagedBotInstalledEvent
- Dispatched after a packaged bot was successfully installed in a thead.
-
$event->packagedBot:PackagedBotDTOclass. -
$event->thread:Threadmodel the package was installed in. -
$event->provider:MessengerProviderprovider who installed the package.
-
ParticipantMutedEvent
- Dispatched when a
Participantmutes itsThread.-
$event->participant:Participantmodel that was muted.
-
ParticipantPermissionsEvent
- Dispatched when a
Participantpermissions is updated.-
$event->provider:MessengerProviderprovider that updated theParticipantpermissions. -
$event->thread:Threadmodel theParticipantbelongs to. -
$event->participant:Participantmodel that was updated.
-
ParticipantReadEvent
- Dispatched when a
Participantmarks aThreadas read.-
$event->participant:Participantmodel that was marked read.
-
ParticipantsAddedEvent
- Dispatched when adding participants to a
Thread.-
$event->provider:MessengerProviderprovider adding the participants. -
$event->thread:Threadmodel the added participants belong to. -
$event->participants:CollectionofParticipantmodels that were added to theThread.
-
ParticipantUnMutedEvent
- Dispatched when a
Participantun-mutes itsThread.-
$event->participant:Participantmodel that was un-muted.
-
PromotedAdminEvent
- Dispatched when a
Participantis promoted to a group admin.-
$event->provider:MessengerProviderprovider that promoted theParticipant. -
$event->thread:Threadmodel theParticipantbelongs to. -
$event->participant:Participantmodel that was promoted.
-
PushNotificationEvent
- Dispatched when any
private channelbroadcast is emitted.-
$event->broadcastAs:stringbroadcast event name. -
$event->recipients:Collectionof all recipientID/TYPEthe broadcast was sent to. -
$event->data:arraydata that was sent in the broadcast.
-
ReactionAddedEvent
- Dispatched when a
MessageReactionis created.-
$event->reaction:MessageReactionmodel that was created.
-
ReactionRemovedEvent
- Dispatched when a
MessageReactionis deleted.-
$event->provider:MessengerProviderprovider that deleted theMessageReaction. -
$event->reaction:arraydata of the removedMessageReactionmodel.
-
ReactionRemovedEvent
- Dispatched when a
MessageReactionis deleted.-
$event->provider:MessengerProviderprovider that deleted theMessageReaction. -
$event->reaction:arraydata of the removedMessageReactionmodel.
-
RemovedFromThreadEvent
- Dispatched when a
Participantis removed from aThread.-
$event->provider:MessengerProviderprovider that removed theParticipant. -
$event->thread:Threadmodel theParticipantwas removed from. -
$event->participant:Participantmodel that was removed.
-
StatusHeartbeatEvent
- Dispatched when a
MessengerProviderhits theheartbeatendpoint.-
$event->provider:MessengerProviderprovider using theheartbeat. -
$event->IP:stringIP from theMessengerProvider. -
$event->away:boolwhether theMessengerProvideris away/idle or not.
-
ThreadApprovalEvent
- Dispatched when a private
Threadapproval is approved or denied.-
$event->provider:MessengerProviderprovider that approved/denied the approval. -
$event->thread:Threadmodel being approved/denied. -
$event->approved:boolwhether theThreadwas approved or denied.
-
ThreadArchivedEvent
- Dispatched when a
Threadis archived.-
$event->provider:?MessengerProvidernullable provider that archived theThread. -
$event->thread:Threadmodel that was archived.
-
ThreadAvatarEvent
- Dispatched when a
Threadavatar is uploaded or removed.-
$event->provider:MessengerProviderprovider that updated theThreadavatar. -
$event->thread:Threadmodel that was updated.
-
ThreadLeftEvent
- Dispatched when a
Participantleaves a groupThread.-
$event->provider:MessengerProviderprovider that left theThread. -
$event->thread:Threadmodel that was left. -
$event->participant:Participantmodel that left theThread.
-
ThreadSettingsEvent
- Dispatched when a group
Threadsettings is updated.-
$event->provider:MessengerProviderprovider that updated theThreadsettings. -
$event->thread:Threadmodel being updated. -
$event->nameChanged:boolwhether theThreadname was changed or not.
-