| @@ -77,8 +77,14 @@ | ||
| 77 | 77 | $user->to_array(), |
| 78 | 78 | array( 'icon', 'name', 'webfinger' ) |
| 79 | 79 | ); |
| 80 | 80 | } |
| 81 | + | |
| 82 | + // add `@` prefix if it's missing | |
| 83 | + if ( '@' !== substr( $attrs['profileData']['webfinger'], 0, 1 ) ) { | |
| 84 | + $attrs['profileData']['webfinger'] = '@' . $attrs['profileData']['webfinger']; | |
| 85 | + } | |
| 86 | + | |
| 81 | 87 | $wrapper_attributes = get_block_wrapper_attributes( |
| 82 | 88 | array( |
| 83 | 89 | 'aria-label' => __( 'Follow me on the Fediverse', 'activitypub' ), |
| 84 | 90 | 'class' => 'activitypub-follow-me-block-wrapper', |