Using _yoast_wpseo_title as the topic title

How can we use _yoast_wpseo_title as the default topic title?

The WordPress plugin has a wpdc_publish_format_title filter that’s applied to the post title before it’s published to Discourse. You can use the filter like this. I’m assuming that _yoast_wpseo_title is saved as post metadata:

add_filter( 'wpdc_publish_format_title', 'wpdc_custom_publish_format_title', 10, 2 );
function wpdc_custom_publish_format_title( $title, $post_id ) {
    //$title = get_post_meta( $post_id, '_yoast_wpseo_title', true  );

    return $title;