blocked original repost causes all reposts to also be blocked

This commit is contained in:
Lex Berezhny 2020-02-22 12:49:20 -05:00
parent 8c7908b200
commit 7de8670616
2 changed files with 5 additions and 3 deletions

View file

@ -38,7 +38,9 @@ class Censor:
for claim_hash, lookup in (
(row['claim_hash'], self.streams),
(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)
if censoring_channel_hash:
was_censored = True

View file

@ -961,9 +961,9 @@ class StreamCommands(ClaimTestCase):
result = await self.out(self.daemon.jsonrpc_claim_search(any_tags=['bad-stuff'], order_by=['height']))
filtered = result['blocked']
self.assertEqual(0, len(result['items']))
self.assertEqual(2, filtered['total'])
self.assertEqual(3, filtered['total'])
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#'))
# filtered channel should still resolve