Skip to content

Suspension public comment is displayed on user profile even if empty #1940

@trichoplax

Description

@trichoplax

Describe the bug
This is very minor. A space appears before the full stop at the end of the standard suspension message shown at the top of a user's profile. This shows as:

This user has been temporarily suspended .

To Reproduce
Steps to reproduce the behavior:

  1. Go to a user page as a mod or admin
  2. Click on "Moderator Tools"
  3. Click on "warn or suspend user"
  4. Suspend the user without choosing a public notice
  5. See space before full stop as described above

Expected behavior
When there is no public notice to display, there should be no space added.

Additional context
In app/views/users/show.html.erb on line 13:

  <% if @user.community_user.suspension_public_comment.nil? %>

This appears to never evaluate to true, even if no public notice is selected.

Metadata

Metadata

Assignees

Labels

area: backendChanges to server-side codecomplexity: easyIssues that should take limited effort to resolve/fix/build.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions