ChatFacade
extends Facade
Table of Contents
Methods
-
addReceivingMiddleware()
: self
-
addSendingMiddleware()
: self
-
addWebhookMiddleware()
: self
-
channel()
: Channel
-
getAndDeleteModalContext()
: array<string|int, mixed>|null
-
getUser()
: UserInfo|null
-
handleWebhook()
: ResponseInterface
-
initialize()
: void
-
onAction()
: self
-
onAppHomeOpened()
: self
-
onAssistantContextChanged()
: self
-
onAssistantThreadStarted()
: self
-
onDirectMessage()
: self
-
onMemberJoinedChannel()
: self
-
onMessageDelivered()
: self
-
onMessageRead()
: self
-
onModalClose()
: self
-
onModalSubmit()
: self
-
onNewMention()
: self
-
onNewMessage()
: self
-
onOptionsLoad()
: self
-
onReaction()
: self
-
onSlashCommand()
: self
-
onSubscribedMessage()
: self
-
openDM()
: string|null
-
processAction()
: void
-
processAppHomeOpened()
: void
-
processAssistantContextChanged()
: void
-
processAssistantThreadStarted()
: void
-
processMemberJoinedChannel()
: void
-
processMessage()
: void
-
processMessageDelivered()
: void
-
processMessageRead()
: void
-
processModalClose()
: void
-
processModalSubmit()
: void
-
processOptionsLoad()
: array<string|int, mixed>|null
-
processReaction()
: void
-
processSlashCommand()
: void
-
registerAdapter()
: self
-
resolveAdapter()
: Adapter|null
-
shutdown()
: void
-
storeModalContext()
: void
-
thread()
: Thread
-
getFacadeAccessor()
: string
addReceivingMiddleware()
public
static addReceivingMiddleware(ReceivingMiddleware $middleware) : self
Parameters
-
$middleware
: ReceivingMiddleware
-
addSendingMiddleware()
public
static addSendingMiddleware(SendingMiddleware $middleware) : self
Parameters
-
$middleware
: SendingMiddleware
-
addWebhookMiddleware()
public
static addWebhookMiddleware(WebhookMiddleware $middleware) : self
Parameters
-
$middleware
: WebhookMiddleware
-
channel()
public
static channel(string $channelId) : Channel
Parameters
-
$channelId
: string
-
getAndDeleteModalContext()
public
static getAndDeleteModalContext(string $adapterName, string $contextId) : array<string|int, mixed>|null
Parameters
-
$adapterName
: string
-
-
$contextId
: string
-
Return values
array<string|int, mixed>|null
getUser()
public
static getUser(string $adapterName, string $userId) : UserInfo|null
Parameters
-
$adapterName
: string
-
-
$userId
: string
-
handleWebhook()
public
static handleWebhook(string $adapterName, ServerRequestInterface $request[, array<string|int, mixed> $options = = '[]' ]) : ResponseInterface
Parameters
-
$adapterName
: string
-
-
$request
: ServerRequestInterface
-
-
$options
: array<string|int, mixed>
= = '[]'
-
Return values
ResponseInterface
initialize()
public
static initialize() : void
onAction()
public
static onAction(string|array<string|int, mixed>|callable $actionId[, callable|null $handler = = 'null' ]) : self
Parameters
-
$actionId
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onAppHomeOpened()
public
static onAppHomeOpened(callable $handler) : self
Parameters
-
$handler
: callable
-
onAssistantContextChanged()
public
static onAssistantContextChanged(callable $handler) : self
Parameters
-
$handler
: callable
-
onAssistantThreadStarted()
public
static onAssistantThreadStarted(callable $handler) : self
Parameters
-
$handler
: callable
-
onDirectMessage()
public
static onDirectMessage(callable $handler) : self
Parameters
-
$handler
: callable
-
onMemberJoinedChannel()
public
static onMemberJoinedChannel(callable $handler) : self
Parameters
-
$handler
: callable
-
onMessageDelivered()
public
static onMessageDelivered(callable $handler) : self
Parameters
-
$handler
: callable
-
onMessageRead()
public
static onMessageRead(callable $handler) : self
Parameters
-
$handler
: callable
-
onModalClose()
public
static onModalClose(string|array<string|int, mixed>|callable $callbackId[, callable|null $handler = = 'null' ]) : self
Parameters
-
$callbackId
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onModalSubmit()
public
static onModalSubmit(string|array<string|int, mixed>|callable $callbackId[, callable|null $handler = = 'null' ]) : self
Parameters
-
$callbackId
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onNewMention()
public
static onNewMention(callable $handler) : self
Parameters
-
$handler
: callable
-
onNewMessage()
public
static onNewMessage(string $pattern, callable $handler) : self
Parameters
-
$pattern
: string
-
-
$handler
: callable
-
onOptionsLoad()
public
static onOptionsLoad(string|array<string|int, mixed>|callable $actionId[, callable|null $handler = = 'null' ]) : self
Parameters
-
$actionId
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onReaction()
public
static onReaction(string|array<string|int, mixed>|callable $emoji[, callable|null $handler = = 'null' ]) : self
Parameters
-
$emoji
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onSlashCommand()
public
static onSlashCommand(string|array<string|int, mixed>|callable $command[, callable|null $handler = = 'null' ]) : self
Parameters
-
$command
: string|array<string|int, mixed>|callable
-
-
$handler
: callable|null
= = 'null'
-
onSubscribedMessage()
public
static onSubscribedMessage(callable $handler) : self
Parameters
-
$handler
: callable
-
openDM()
public
static openDM(string $adapterName, string $userId) : string|null
Parameters
-
$adapterName
: string
-
-
$userId
: string
-
Return values
string|null
processAction()
public
static processAction(Adapter $adapter, string $threadId, string $actionId, string|null $value, string $messageId, Author $user[, string|null $triggerId = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$threadId
: string
-
-
$actionId
: string
-
-
$value
: string|null
-
-
$messageId
: string
-
-
$user
: Author
-
-
$triggerId
: string|null
= = 'null'
-
-
$raw
: mixed
= = 'null'
-
processAppHomeOpened()
public
static processAppHomeOpened(Adapter $adapter, string $channelId, string $userId[, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$channelId
: string
-
-
$userId
: string
-
-
$raw
: mixed
= = 'null'
-
processAssistantContextChanged()
public
static processAssistantContextChanged(Adapter $adapter, string $channelId, string $threadId, string $userId, mixed $context[, string|null $threadTs = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$channelId
: string
-
-
$threadId
: string
-
-
$userId
: string
-
-
$context
: mixed
-
-
$threadTs
: string|null
= = 'null'
-
-
$raw
: mixed
= = 'null'
-
processAssistantThreadStarted()
public
static processAssistantThreadStarted(Adapter $adapter, string $channelId, string $threadId, string $userId, mixed $context[, string|null $threadTs = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$channelId
: string
-
-
$threadId
: string
-
-
$userId
: string
-
-
$context
: mixed
-
-
$threadTs
: string|null
= = 'null'
-
-
$raw
: mixed
= = 'null'
-
processMemberJoinedChannel()
public
static processMemberJoinedChannel(Adapter $adapter, string $channelId, string $userId[, string|null $inviterId = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$channelId
: string
-
-
$userId
: string
-
-
$inviterId
: string|null
= = 'null'
-
-
$raw
: mixed
= = 'null'
-
processMessage()
public
static processMessage(Adapter $adapter, string $threadId, Message $message) : void
Parameters
-
$adapter
: Adapter
-
-
$threadId
: string
-
-
$message
: Message
-
processMessageDelivered()
public
static processMessageDelivered(string $threadId, array<string|int, mixed> $messageIds, string $userId[, mixed $raw = = 'null' ]) : void
Parameters
-
$threadId
: string
-
-
$messageIds
: array<string|int, mixed>
-
-
$userId
: string
-
-
$raw
: mixed
= = 'null'
-
processMessageRead()
public
static processMessageRead(string $threadId, string $userId[, mixed $raw = = 'null' ][, int|null $timestamp = = 'null' ]) : void
Parameters
-
$threadId
: string
-
-
$userId
: string
-
-
$raw
: mixed
= = 'null'
-
-
$timestamp
: int|null
= = 'null'
-
processModalClose()
public
static processModalClose(Adapter $adapter, string $callbackId, Author $user[, mixed $raw = = 'null' ][, string|null $viewId = = 'null' ][, string|null $contextId = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$callbackId
: string
-
-
$user
: Author
-
-
$raw
: mixed
= = 'null'
-
-
$viewId
: string|null
= = 'null'
-
-
$contextId
: string|null
= = 'null'
-
processModalSubmit()
public
static processModalSubmit(Adapter $adapter, string $callbackId, array<string|int, mixed> $values, Author $user[, mixed $raw = = 'null' ][, string|null $viewId = = 'null' ][, string|null $contextId = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$callbackId
: string
-
-
$values
: array<string|int, mixed>
-
-
$user
: Author
-
-
$raw
: mixed
= = 'null'
-
-
$viewId
: string|null
= = 'null'
-
-
$contextId
: string|null
= = 'null'
-
processOptionsLoad()
public
static processOptionsLoad(Adapter $adapter, string $actionId, string $query, Author $user[, mixed $raw = = 'null' ]) : array<string|int, mixed>|null
Parameters
-
$adapter
: Adapter
-
-
$actionId
: string
-
-
$query
: string
-
-
$user
: Author
-
-
$raw
: mixed
= = 'null'
-
Return values
array<string|int, mixed>|null
processReaction()
public
static processReaction(Adapter $adapter, string $threadId, string $emoji, string $messageId, Author $user[, bool $added = = 'true' ][, string $rawEmoji = = '\'\'' ][, mixed $raw = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$threadId
: string
-
-
$emoji
: string
-
-
$messageId
: string
-
-
$user
: Author
-
-
$added
: bool
= = 'true'
-
-
$rawEmoji
: string
= = '\'\''
-
-
$raw
: mixed
= = 'null'
-
processSlashCommand()
public
static processSlashCommand(Adapter $adapter, string $channelId, string $command, string $text[, Author|null $user = = 'null' ][, mixed $raw = = 'null' ][, string|null $triggerId = = 'null' ]) : void
Parameters
-
$adapter
: Adapter
-
-
$channelId
: string
-
-
$command
: string
-
-
$text
: string
-
-
$user
: Author|null
= = 'null'
-
-
$raw
: mixed
= = 'null'
-
-
$triggerId
: string|null
= = 'null'
-
registerAdapter()
public
static registerAdapter(string $name, Adapter $adapter) : self
Parameters
-
$name
: string
-
-
$adapter
: Adapter
-
resolveAdapter()
public
static resolveAdapter(string $name[, ServerRequestInterface|null $request = = 'null' ]) : Adapter|null
Parameters
-
$name
: string
-
-
$request
: ServerRequestInterface|null
= = 'null'
-
shutdown()
public
static shutdown() : void
storeModalContext()
public
static storeModalContext(string $adapterName, string $contextId, array<string|int, mixed> $data[, int $ttlMs = = '86400000' ]) : void
Parameters
-
$adapterName
: string
-
-
$contextId
: string
-
-
$data
: array<string|int, mixed>
-
-
$ttlMs
: int
= = '86400000'
-
thread()
public
static thread(string $threadId) : Thread
Parameters
-
$threadId
: string
-
getFacadeAccessor()
protected
static getFacadeAccessor() : string