VAT
Your cart

Your cart is empty.

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.

ArgumentTypeDescription
$channelstringChannel id.
$conversationarray<string, mixed>Conversation row.
$user_idintWordPress 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>.

ArgumentTypeDescription
$channelsarray<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).

ArgumentTypeDescription
$pathstringAPI path.
$errorstringError.
add_action( 'addochat_network_failed', function ( $path, $error ) {
	// ...
}, 10, 2 );

Ready to connect your AI to real tools?

Start free trial