mirror of
https://github.com/discourse/discourse.git
synced 2025-03-24 13:09:25 +08:00
When system flags users as sockpuppets, show a reason in the admin flags ui
This commit is contained in:
parent
debd9bfb25
commit
c7aaee907b
@ -38,7 +38,8 @@ Discourse.FlaggedPost = Discourse.Post.extend({
|
|||||||
r.push({
|
r.push({
|
||||||
user: _this.userLookup[action.user_id],
|
user: _this.userLookup[action.user_id],
|
||||||
message: action.message,
|
message: action.message,
|
||||||
permalink: action.permalink
|
permalink: action.permalink,
|
||||||
|
bySystemUser: (action.user_id === -1 ? true : false)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -54,7 +54,13 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class='message'>
|
<td class='message'>
|
||||||
<div>{{#link-to 'adminUser' user}}{{avatar user imageSize="small"}}{{/link-to}} {{message}} <a href="{{unbound permalink}}"><button class='btn'><i class="icon-reply"></i> {{i18n admin.flags.view_message}}</button></a></div>
|
<div>
|
||||||
|
{{#link-to 'adminUser' user}}{{avatar user imageSize="small"}}{{/link-to}}
|
||||||
|
{{message}}
|
||||||
|
{{#unless bySystemUser}}
|
||||||
|
<a href="{{unbound permalink}}"><button class='btn'><i class="icon-reply"></i> {{i18n admin.flags.view_message}}</button></a>
|
||||||
|
{{/unless}}
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
@ -40,9 +40,9 @@ class SpamRulesEnforcer
|
|||||||
|
|
||||||
def flag_sockpuppet_users
|
def flag_sockpuppet_users
|
||||||
system_user = Discourse.system_user
|
system_user = Discourse.system_user
|
||||||
PostAction.act(system_user, @post, PostActionType.types[:spam]) rescue PostAction::AlreadyActed
|
PostAction.act(system_user, @post, PostActionType.types[:spam], message: I18n.t('flag_reason.sockpuppet')) rescue PostAction::AlreadyActed
|
||||||
if (first_post = @post.topic.posts.by_post_number.first).try(:user).try(:new_user?)
|
if (first_post = @post.topic.posts.by_post_number.first).try(:user).try(:new_user?)
|
||||||
PostAction.act(system_user, first_post, PostActionType.types[:spam]) rescue PostAction::AlreadyActed
|
PostAction.act(system_user, first_post, PostActionType.types[:spam], message: I18n.t('flag_reason.sockpuppet')) rescue PostAction::AlreadyActed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1159,3 +1159,6 @@ en:
|
|||||||
fetch_failure: "Sorry, there has been an error while fetching the image."
|
fetch_failure: "Sorry, there has been an error while fetching the image."
|
||||||
unknown_image_type: "Sorry, but the file you tried to upload doesn't appear to be an image."
|
unknown_image_type: "Sorry, but the file you tried to upload doesn't appear to be an image."
|
||||||
size_not_found: "Sorry, but we couldn't determine the size of the image. Maybe your image is corrupted?"
|
size_not_found: "Sorry, but we couldn't determine the size of the image. Maybe your image is corrupted?"
|
||||||
|
|
||||||
|
flag_reason:
|
||||||
|
sockpuppet: "A new user created a topic, and another new user at the same IP address replied. See the flag_sockpuppets site setting."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user