- 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
- Dispatched when a
BotActionHandler
fails being triggered, resulting in an exception. The exception will be caught and forwarded into this event.$event->action
:BotAction
model that failed.$event->exception
:Throwable
exception thrown.
- Dispatched when a
BotActionHandler
is successfully handled.$event->action
:BotAction
model that was triggered.$event->message
:Message
model that triggered theBotAction
.$event->trigger
:string|null
trigger that was matched on theBotAction
.
- Dispatched when a
BotAction
is deleted.$event->provider
:?MessengerProvider
nullable provider that deleted theBotAction
.$event->action
:array
data of the deletedBotAction
.
- Dispatched when a
BotAction
is updated.$event->provider
:MessengerProvider
provider that updated theBotAction
.$event->action
:BotAction
model that was updated.
- Dispatched when a
Bot
is archived.$event->provider
:MessengerProvider
provider that archived theBot
.$event->bot
:Bot
model that was archived.
- Dispatched when a
Bot
avatar is uploaded or removed.$event->provider
:MessengerProvider
provider that updated theBot
avatar.$event->bot
:Bot
model that had its avatar updated.
- Dispatched when a
Bot
has its settings uploaded.$event->provider
:MessengerProvider
provider that updated theBot
.$event->bot
:Bot
model that was updated.$event->originalName
:string
original name of theBot
before being updated, should the bot be given a new name.
- Dispatched when a broadcast fails and throws an exception. The exception will be caught and forwarded into this event.
$event->abstractBroadcast
: AbstractMessengerBroadcast
classstring
being broadcasted.$event->channels
:array
of channels for the broadcast.$event->with
:array
of data to be broadcasted.$event->exception
:Throwable
exception thrown.
- Dispatched when a
Call
is ended.$event->provider
:?MessengerProvider
nullable provider that ended theCall
.$event->call
:Call
model that was ended.
- Dispatched when a
Call
is ignored.$event->provider
:MessengerProvider
provider that ignored theCall
.$event->call
:Call
model that was ignored.
- Dispatched when a
CallParticipant
joins/re-joins aCall
.$event->participant
:CallParticipant
model that joined theCall
.$event->call
:Call
model that was joined.
- Dispatched when a
CallParticipant
leftCall
.$event->participant
:CallParticipant
model that left theCall
.$event->call
:Call
model that was left.
- Dispatched when a
Call
is created.$event->thread
:Thread
model theCall
belongs to.$event->call
:Call
model that was created.
- Dispatched when a
Participant
is demoted from group admin.$event->provider
:MessengerProvider
provider that demoted theParticipant
.$event->thread
:Thread
model theParticipant
belongs to.$event->participant
:Participant
model that was demoted.
- Dispatched when embeds on a
Message
are removed.$event->provider
:MessengerProvider
provider that removed embeds.$event->message
:Message
model embeds were removed from.
- Dispatched when a
PendingFriend
is accepted.$event->friend
:Friend
model that was created.$event->inverseFriend
:Friend
inverse model that was created.
- Dispatched when a
SentFriend
is cancelled.$event->friend
:SentFriend
model that was deleted.
- Dispatched when a
PendingFriend
is denied.$event->friend
:PendingFriend
model that was denied.
- Dispatched when a
Friend
is removed.$event->friend
:Friend
model being removed.$event->inverseFriend
:?Friend
nullable inverse model to theFriend
removed.
- Dispatched when a
SentFriend
is created.$event->friend
:SentFriend
model that was created.
- Dispatched when an
Invite
is archived.$event->provider
:?MessengerProvider
nullable provider that archived theInvite
.$event->invite
:Invite
model that was archived.
- Dispatched when an
Invite
is used to join aThread
.$event->provider
:MessengerProvider
provider that used theInvite
to join theThread
.$event->thread
:Thread
model theInvite
belongs to.$event->invite
:Invite
model used to join theThread
.
- Dispatched when a
CallParticipant
is kicked or un-kicked.$event->provider
:MessengerProvider
provider that kicked/un-kicked theCallParticipant
.$event->participant
:CallParticipant
model that was kicked/un-kicked.$event->call
:Call
model theCallParticipant
belongs to.
- Dispatched when a knock is sent to a
Thread
.$event->provider
:MessengerProvider
provider that sent the knock.$event->thread
:Thread
model the knock was sent to.
- Dispatched when a
Message
is archived.$event->provider
:MessengerProvider
provider archived theMessage
.$event->message
:Message
model that was archived.
- Dispatched when a
Message
is edited.$event->message
:Message
model that was archived.$event->originalBody
:?string
nullable original body of the message being edited.
- Dispatched when a
BotAction
is created.$event->botAction
:BotAction
model that was created.
- Dispatched when a
Bot
is created.$event->bot
:Bot
model that was created.
- Dispatched when an
Invite
is created.$event->invite
:Invite
model that was created.
- Dispatched when a
Message
is created.$event->message
:Message
model that was created.$event->thread
:Thread
model theMessage
belongs to.$event->isGroupAdmin
:bool
whether the message sender is a group thread admin or not.$event->senderIp
:?string
nullable IP of the message sender.
- Dispatched when a
Thread
is created.$event->provider
:MessengerProvider
provider that created theThread
.$event->thread
:Thread
model that was created.
- Dispatched after a packaged bot was successfully installed in a thead.
$event->packagedBot
:PackagedBotDTO
class.$event->thread
:Thread
model the package was installed in.$event->provider
:MessengerProvider
provider who installed the package.
- Dispatched when a
Participant
mutes itsThread
.$event->participant
:Participant
model that was muted.
- Dispatched when a
Participant
permissions is updated.$event->provider
:MessengerProvider
provider that updated theParticipant
permissions.$event->thread
:Thread
model theParticipant
belongs to.$event->participant
:Participant
model that was updated.
- Dispatched when a
Participant
marks aThread
as read.$event->participant
:Participant
model that was marked read.
- Dispatched when adding participants to a
Thread
.$event->provider
:MessengerProvider
provider adding the participants.$event->thread
:Thread
model the added participants belong to.$event->participants
:Collection
ofParticipant
models that were added to theThread
.
- Dispatched when a
Participant
un-mutes itsThread
.$event->participant
:Participant
model that was un-muted.
- Dispatched when a
Participant
is promoted to a group admin.$event->provider
:MessengerProvider
provider that promoted theParticipant
.$event->thread
:Thread
model theParticipant
belongs to.$event->participant
:Participant
model that was promoted.
- Dispatched when any
private channel
broadcast is emitted.$event->broadcastAs
:string
broadcast event name.$event->recipients
:Collection
of all recipientID/TYPE
the broadcast was sent to.$event->data
:array
data that was sent in the broadcast.
- Dispatched when a
MessageReaction
is created.$event->reaction
:MessageReaction
model that was created.
- Dispatched when a
MessageReaction
is deleted.$event->provider
:MessengerProvider
provider that deleted theMessageReaction
.$event->reaction
:array
data of the removedMessageReaction
model.
- Dispatched when a
MessageReaction
is deleted.$event->provider
:MessengerProvider
provider that deleted theMessageReaction
.$event->reaction
:array
data of the removedMessageReaction
model.
- Dispatched when a
Participant
is removed from aThread
.$event->provider
:MessengerProvider
provider that removed theParticipant
.$event->thread
:Thread
model theParticipant
was removed from.$event->participant
:Participant
model that was removed.
- Dispatched when a
MessengerProvider
hits theheartbeat
endpoint.$event->provider
:MessengerProvider
provider using theheartbeat
.$event->IP
:string
IP from theMessengerProvider
.$event->away
:bool
whether theMessengerProvider
is away/idle or not.
- Dispatched when a private
Thread
approval is approved or denied.$event->provider
:MessengerProvider
provider that approved/denied the approval.$event->thread
:Thread
model being approved/denied.$event->approved
:bool
whether theThread
was approved or denied.
- Dispatched when a
Thread
is archived.$event->provider
:?MessengerProvider
nullable provider that archived theThread
.$event->thread
:Thread
model that was archived.
- Dispatched when a
Thread
avatar is uploaded or removed.$event->provider
:MessengerProvider
provider that updated theThread
avatar.$event->thread
:Thread
model that was updated.
- Dispatched when a
Participant
leaves a groupThread
.$event->provider
:MessengerProvider
provider that left theThread
.$event->thread
:Thread
model that was left.$event->participant
:Participant
model that left theThread
.
- Dispatched when a group
Thread
settings is updated.$event->provider
:MessengerProvider
provider that updated theThread
settings.$event->thread
:Thread
model being updated.$event->nameChanged
:bool
whether theThread
name was changed or not.