Skip to content
Permalink
Browse files
author list
  • Loading branch information
leon9665 committed Mar 21, 2020
1 parent ee7568b commit 3394af78127bdd8d037c2d49983b7b9491397296
Showing 5 changed files with 72 additions and 38 deletions.
@@ -21,6 +21,7 @@ import ImageUserBlockList from 'app/utils/ImageUserBlockList';
import ContentEditedWrapper from '../elements/ContentEditedWrapper';
import { allowDelete } from 'app/utils/StateFunctions';
import { Role } from 'app/utils/Community';
import { _user_list } from 'app/utils/steemApi';

export function sortComments(cont, comments, sort_order) {
const rshares = post => Long.fromString(String(post.get('net_rshares')));
@@ -268,18 +269,24 @@ class CommentImpl extends React.Component {
} else {
replies = comment.replies;
sortComments(cont, replies, this.props.sort_order);
replies = replies.map((reply, idx) => (
<Comment
key={idx}
postref={reply}
cont={cont}
sort_order={this.props.sort_order}
depth={depth + 1}
rootComment={rootComment}
showNegativeComments={showNegativeComments}
onHide={this.props.onHide}
/>
));
replies = replies.map((reply, idx) => {
// const author = reply && reply.split('/')[0];
// if(author && _user_list.indexOf(author) > -1) {
// return ''
// }
return (
<Comment
key={idx}
postref={reply}
cont={cont}
sort_order={this.props.sort_order}
depth={depth + 1}
rootComment={rootComment}
showNegativeComments={showNegativeComments}
onHide={this.props.onHide}
/>
);
});
}
}

@@ -335,9 +342,7 @@ class CommentImpl extends React.Component {
</div>
<div className="Comment__header">
<div className="Comment__header_collapse">
{canFlag && (
<FlagButton post={post} isComment={true} />
)}
{canFlag && <FlagButton post={post} isComment />}
<a onClick={this.toggleCollapsed}>
{this.state.collapsed ? '[+]' : '[-]'}
</a>
@@ -17,7 +17,7 @@ import VideoAd from 'app/components/elements/VideoAd';
import shouldComponentUpdate from 'app/utils/shouldComponentUpdate';
import xhr from 'axios/index';

import { _list_temp } from 'app/utils/steemApi';
import { _list_temp, _user_list } from 'app/utils/steemApi';
import { demo } from 'app/utils/demo';

function topPosition(domElt) {
@@ -259,7 +259,10 @@ export default connect(

const list = [];
posts.map(v => {
if (blacklist.indexOf(v.get('post_id')) == -1) {
if (
blacklist.indexOf(v.get('post_id')) == -1 &&
_user_list.indexOf(v.get('author')) == -1
) {
list.push(v);
}
});
@@ -17,6 +17,7 @@ import GptAd from 'app/components/elements/GptAd';
import { isLoggedIn } from 'app/utils/UserUtil';

import Icon from 'app/components/elements/Icon';
import { _user_list } from 'app/utils/steemApi';

function isEmptyPost(post) {
// check if the post doesn't exist
@@ -141,7 +142,10 @@ class Post extends React.Component {
commentCount % 5 === 0 &&
commentCount !== replies.length &&
commentCount !== commentLimit;

// const author = reply && reply.split('/')[0];
// if(author && _user_list.indexOf(author) > -1) {
// return ''
// }
return (
<div key={post + reply}>
<Comment
@@ -2818,7 +2818,6 @@ const demo = [
gray: false,
total_votes: 432,
flag_weight: 5,
is_pinned: true,
},
beneficiaries: [],
max_accepted_payout: '1000000.000 SBD',
@@ -6700,7 +6699,6 @@ const demo = [
gray: false,
total_votes: 730,
flag_weight: 5,
is_pinned: true,
},
beneficiaries: [],
max_accepted_payout: '1000000.000 SBD',
@@ -7184,7 +7182,6 @@ const demo = [
gray: false,
total_votes: 105,
flag_weight: 3,
is_pinned: true,
},
beneficiaries: [],
max_accepted_payout: '1000000.000 SBD',
@@ -7290,7 +7287,6 @@ const demo = [
gray: false,
total_votes: 15,
flag_weight: 4,
is_pinned: true,
},
beneficiaries: [],
max_accepted_payout: '1000000.000 SBD',
@@ -8255,7 +8251,6 @@ const demo = [
gray: false,
total_votes: 225,
flag_weight: 4,
is_pinned: true,
},
beneficiaries: [],
max_accepted_payout: '1000000.000 SBD',
@@ -8976,7 +8971,6 @@ const demo = [
gray: false,
total_votes: 163,
flag_weight: 3,
is_pinned: true,
},
beneficiaries: [
{
@@ -29,25 +29,22 @@ export const _list_temp = [
85278992,
85276721,
85288504,
85284375,
85303662,
85287965,
85283636,
85273231,
85287931,
85287965,
85274894,
85241321,
85294452,
85289191,
85293865,
85303662,
85306764,
85287931,
85299660,
85290948,
85293459,
85293772,
85276721,
85276833,
85293901,
85289063,
85294452,
85293865,
85305460,
85295587,
85312343,
@@ -56,9 +53,37 @@ export const _list_temp = [
85321625,
85311891,
85318584,
85323051,
85325276,
85308914,
85321248,
85325744,
85325042,
85323948,
85325276,
85326597,
85321023,
85324738,
85334812,
85316255,
85336207,
85337563,
85323051,
85209019,
85343852,
85335737,
85341505,
];

export const _user_list = [
'roelandp',
'blocktrades',
'anyx',
'ausbitbank',
'gtg',
'themarkymark',
'lukestokes.mhth',
'therealwolf',
'netuoso',
'innerhive',
];

export async function getStateAsync(url, observer, ssr = false) {
@@ -86,7 +111,7 @@ export async function getStateAsync(url, observer, ssr = false) {
if (page == 'posts' || page == 'account') {
let posts = await loadPosts(sort, tag, observer, ssr);
let _content = ssr
? filter(posts['content'], _blist)
? filter(posts['content'], _blist, _user_list)
: posts['content'];
state['content'] = _content;
state['discussion_idx'] = posts['discussion_idx'];
@@ -139,10 +164,13 @@ export async function getBlackList() {
return (res && res.data && res.data.data) || [];
}

function filter(posts, blacklist) {
function filter(posts, blacklist, userlist) {
let content = {};
for (var key in posts) {
if (blacklist.indexOf(posts[key].post_id) === -1) {
if (
blacklist.indexOf(posts[key].post_id) === -1 &&
userlist.indexOf(posts[key].author) === -1
) {
content[key] = posts[key];
}
}

6 comments on commit 3394af7

@X40L1N
Copy link

@X40L1N X40L1N commented on 3394af7 Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot a few accounts up there. LOL

@ScottSallinen
Copy link

@ScottSallinen ScottSallinen commented on 3394af7 Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a centralized database, deleting the accounts from the back-end would be easier than censoring them from the front-end.

@KINGdotNET
Copy link

@KINGdotNET KINGdotNET commented on 3394af7 Mar 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where to look for the accounts being blacklisted? Never mind, found it.

@sourovafrin
Copy link

@sourovafrin sourovafrin commented on 3394af7 Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 Why not you just fork out all of our account, No one can post then and you won't need to keep putting us in blacklist.

@Vheissu
Copy link

@Vheissu Vheissu commented on 3394af7 Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hahahahaha. Good to see under Justin's leadership that Steemit Inc is protecting the website from those hackers.

@quetzalcoatl
Copy link

@quetzalcoatl quetzalcoatl commented on 3394af7 Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, will you all start censoring for example, comments here on GitHub as well? Shame.
Oh, or maybe it was a direct order from the government?

Please sign in to comment.