Incompatibility with ActivityPub plugin

Viewing 1 post (of 1 total)
  • #24012
    matthew_exon
    Participant

    The ActivityPub plugin allows users from Mastodon and other platforms to comment on WordPress articles, and have them displayed alongside comments from logged-in local users. Since AP users normally have profile pictures, it also supplies avatars for those comments.

    This interacts badly with the One User Avatar plugin. OUA sees that there is no email address associated with the comment and concludes that it must be anonymous. It therefore replaces the avatar with “[email protected]”. The result is that with both plugins enabled, comments from AP users appear with featureless grey heads instead of profile pictures. Disabling OUA plugin, by contrast, shows AP users’ profile pictures, but of course now local users have anonymous grey heads.

    I found that simply removing these two lines from class-wp-user-avatar-functions.php solves the problem, allowing local user avatars and AP profile pictures to both be displayed correctly:

    } else {
    $avatar = get_wp_user_avatar( ‘[email protected]’, $size, $default, $alt, $class );

    I think this is the correct behaviour. People enable OUA because they want local users to have avatars, not because of its fabulous handling for anonymous comments. When OUA can’t find a specific avatar for a comment, it should simply not modify the value at all.

    Alternatively, it could detect if the input value is a default or if another plugin has already found a better solution, and only use “[email protected]” in the former case.

Viewing 1 post (of 1 total)

Tagged: 

You must be logged in to reply to this topic.