BP_REST_Messages_Actions_Endpoint::rest_unread_thread( integer $thread_id, boolen $value )

Read/Unread message thread based on the logged in user.

Description

Parameters

$thread_id

(integer) (Required) ID of the Messages Thread.

$value

(boolen) (Required) Action value.

Return

(bool|void)

Source

File: bp-messages/classes/class-bp-rest-messages-actions-endpoint.php

	protected function rest_unread_thread( $thread_id, $value ) {
		if ( empty( $value ) ) {
			messages_mark_thread_read( $thread_id );
			return true;
		} elseif ( ! empty( $value ) ) {
			messages_mark_thread_unread( $thread_id );
		}

		return false;
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.