How to add a notification when a relation or friends publish new content?
When it comes to Facebook type notifications, the Message module is indeed very useful. I'll give an example below of using one view's results view_with_users in another view's contextual filter my_messages_view.

For this to work, in your main messages view, you have to go into your contextual filter's settings (probably Message Author or something), then scroll to the bottom and click Allow multiple values. Instead of the usual Provide default: Current User, we will send all the friends to the view with a module.

Note: In the below example, I've sent the current user's uid to the additional view as an example, but your screenshot doesn't have that contextual filter so it's either not needed, or you may need to tweak the friends view to work programmatically.

custom_views_args.module

&lt;?php

function custom_views_args_views_pre_view(&amp;$view, &amp;$display_id, &amp;$args){ 
    global $user;
    // Target our Messages view
    if($view-&gt;name == 'my_messages_view') { 
        // Get users from our friends view
        $friends = views_get_view_result('view_with_users', 'view_display_name', $user-&gt;uid);
        // Add each uid to array
        $friends_array = [];
            foreach($friends as $friend){
            $friends_array[] = $friend-&gt;uid;
        }
        // Add current user's uid to array as well
        $friends_array[] = $user-&gt;uid;
        // Create + separated Contextual Filter
        $messages_con_filter = implode("+", $friends_array);

        // Send the filter to the Messages view
        // $args[0] is the first filter in the list in the view
        $args[0] = $messages_con_filter;

    }
}


See this thread for more info about Facebook-style notification. There may be other useful threads but I happened to answer that one. OP's question should give you some useful pointers. My answer there is quite specific but might give you ideas on how to make messages "seen".

Pierre wrote this in the comments above.


  for each of those friends such notification can be marked as read by each friend individually


If you use a non-global Flag for "seen", then it will do the above.