| @@ -1861,9 +1861,10 @@ | ||
| 1861 | 1861 | $submitted_url, |
| 1862 | 1862 | $api_key, |
| 1863 | 1863 | null, |
| 1864 | 1864 | $bot_id, |
| 1865 | - 'url' // content_type | |
| 1865 | + 'url', // content_type | |
| 1866 | + MxChat_Utils::extract_page_title($body_content) // the page's own title (plan d9ee66) | |
| 1866 | 1867 | ); |
| 1867 | 1868 | |
| 1868 | 1869 | if (is_wp_error($db_result)) { |
| 1869 | 1870 | $error_message = esc_html__('Failed to store content in database: ', 'mxchat') . esc_html($db_result->get_error_message()); |
| @@ -9806,9 +9807,9 @@ | ||
| 9806 | 9807 | // Not an error - just no content found (maybe a redirect or empty page) |
| 9807 | 9808 | return false; |
| 9808 | 9809 | } |
| 9809 | 9810 | |
| 9810 | - // Submit to database with content_type | |
| 9811 | + // Submit to database with content_type (+ the page's own title, plan d9ee66) | |
| 9811 | 9812 | $result = MxChat_Utils::submit_content_to_db( |
| 9812 | 9813 | $sanitized, |
| 9813 | 9814 | $url, |
| 9814 | 9815 | $api_key, |
| @@ -9813,9 +9814,10 @@ | ||
| 9813 | 9814 | $url, |
| 9814 | 9815 | $api_key, |
| 9815 | 9816 | null, |
| 9816 | 9817 | $bot_id, |
| 9817 | - $content_type | |
| 9818 | + $content_type, | |
| 9819 | + MxChat_Utils::extract_page_title($html) | |
| 9818 | 9820 | ); |
| 9819 | 9821 | |
| 9820 | 9822 | return $result; |
| 9821 | 9823 | } |