Channels hooks
This page lists the 3 hooks of this group. Each entry shows its type, the version it arrived in, where it runs, its arguments and a starting point.
addochat_channel_reply
ActionSince 0.1.0 Runs in src/Channel/Missive.php.
Fires after a colleague answered from a channel.
| Argument | Type | Description |
|---|---|---|
$channel | string | Channel id. |
$conversation | array<string, mixed> | Conversation row. |
$user_id | int | WordPress user, 0 when the author has none. |
add_action( 'addochat_channel_reply', function ( $channel, $conversation, $user_id ) {
// ...
}, 10, 3 );
addochat_channels
FilterSince 0.1.0 Runs in src/Channel/Channels.php.
Filters the channels colleagues can answer from. Add an object that implements \Addochat\Channel\Channel (for example Slack); its webhook lives at addochat/v1/channel/<id>.
| Argument | Type | Description |
|---|---|---|
$channels | array<int, \Addochat\Channel\Channel> | Channels. |
add_filter( 'addochat_channels', function ( $channels ) {
return $channels;
} );
addochat_network_failed
ActionSince 0.1.0 Runs in src/Channel/Missive.php.
Notes a failure (log and the network error channel).
| Argument | Type | Description |
|---|---|---|
$path | string | API path. |
$error | string | Error. |
add_action( 'addochat_network_failed', function ( $path, $error ) {
// ...
}, 10, 2 );