Combine Friends Activity + Groups Activity on Elgg 3

For Elgg 3.0

Can anyone share the code that can be used for elgg_list_river to show only Friends combined with Groups (the user is member of) Activity?