I found a solution for the unread problem:
bp_has_message_threads() has a parameter ‘type’.
So i added this to my params: $aParams ['type'] = 'unread';
thanks, that helps. Its a pity, that bp_message_thread_has_unread() only checks for the loggedin user.
Do you think it would be possible to copy and modify this function in a custom.php ?
@danbp and Henry Wright:
For our project, we want to forward unread messages via JSON API to an external system, which has a central processing and provides these messages to external displays of users – outside WordPress. Therefore, we need a central access to all unread messages of all users.