This is the code im using
add_filter( 'fep_get_user_groups', function( $user_groups, $user_id ){
$groups = fep_get_option('gm_groups', array());
if( $groups && is_array( $groups) ){
foreach ( $groups as $group ) {
$user_groups[ $group['slug'] ] = $group['name'];
}
}
return $user_groups;
}, 10, 2);
add_filter( 'fep_filter_groups_to_send_message', function( $groups ){
return Fep_Group_Message::init()->get_all_groups();
});