VAT
Your cart

Your cart is empty.

Mobile app 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_app_url

FilterSince 0.2.0 Runs in src/App/App.php.

Filters the address of the mobile app (for example on another domain that serves the same site).

ArgumentTypeDescription
$urlstringAddress of the app.
add_filter( 'addochat_app_url', function ( $url ) {
	return $url;
} );

addochat_push_payload

FilterSince 0.2.0 Runs in src/Push/Sender.php.

Filters a push notification before it goes to a device. Return false to send nothing.

ArgumentTypeDescription
$payloadarray<string, mixed>|falseTitle, body, url (the app with the conversation), tag (one notification per conversation) and badge (number on the app icon).
$conversationarray<string, mixed>Conversation.
$eventstringwaiting (a chat waits for a colleague) or message (a visitor wrote in a chat of this colleague).
$user_idintColleague the device belongs to.
add_filter( 'addochat_push_payload', function ( $payload, $conversation, $event, $user_id ) {
	return $payload;
}, 10, 4 );

addochat_push_sent

ActionSince 0.2.0 Runs in src/Push/Sender.php.

Fires after a push notification went to the push service of a device.

ArgumentTypeDescription
$statusintHTTP status of the push service (201 accepted, 404 or 410 gone, 0 not sent).
$user_idintColleague the device belongs to.
$eventstringwaiting, message or test.
$conversationarray<string, mixed>Conversation, empty for a test.
add_action( 'addochat_push_sent', function ( $status, $user_id, $event, $conversation ) {
	// ...
}, 10, 4 );

Ready to connect your AI to real tools?

Start free trial