forked from LBRYCommunity/lbry-sdk
blocked original repost causes all reposts to also be blocked
This commit is contained in:
parent
8c7908b200
commit
7de8670616
2 changed files with 5 additions and 3 deletions
|
@ -38,7 +38,9 @@ class Censor:
|
||||||
for claim_hash, lookup in (
|
for claim_hash, lookup in (
|
||||||
(row['claim_hash'], self.streams),
|
(row['claim_hash'], self.streams),
|
||||||
(row['claim_hash'], self.channels),
|
(row['claim_hash'], self.channels),
|
||||||
(row['channel_hash'], self.channels)):
|
(row['channel_hash'], self.channels),
|
||||||
|
(row['reposted_claim_hash'], self.streams),
|
||||||
|
(row['reposted_claim_hash'], self.channels)):
|
||||||
censoring_channel_hash = lookup.get(claim_hash)
|
censoring_channel_hash = lookup.get(claim_hash)
|
||||||
if censoring_channel_hash:
|
if censoring_channel_hash:
|
||||||
was_censored = True
|
was_censored = True
|
||||||
|
|
|
@ -961,9 +961,9 @@ class StreamCommands(ClaimTestCase):
|
||||||
result = await self.out(self.daemon.jsonrpc_claim_search(any_tags=['bad-stuff'], order_by=['height']))
|
result = await self.out(self.daemon.jsonrpc_claim_search(any_tags=['bad-stuff'], order_by=['height']))
|
||||||
filtered = result['blocked']
|
filtered = result['blocked']
|
||||||
self.assertEqual(0, len(result['items']))
|
self.assertEqual(0, len(result['items']))
|
||||||
self.assertEqual(2, filtered['total'])
|
self.assertEqual(3, filtered['total'])
|
||||||
self.assertEqual(1, len(filtered['channels']))
|
self.assertEqual(1, len(filtered['channels']))
|
||||||
self.assertEqual(2, filtered['channels'][0]['blocked'])
|
self.assertEqual(3, filtered['channels'][0]['blocked'])
|
||||||
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering#'))
|
self.assertTrue(filtered['channels'][0]['channel']['short_url'].startswith('lbry://@filtering#'))
|
||||||
|
|
||||||
# filtered channel should still resolve
|
# filtered channel should still resolve
|
||||||
|
|
Loading…
Add table
Reference in a new issue