Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
shadowban-eu-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
shadowban-eu-backend
Commits
21f88a63
Commit
21f88a63
authored
Apr 21, 2021
by
Raphael Beer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: false negative when reply deboosting finds user replying to themselves
parent
dafb10c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/reply_deboosting.py
tests/reply_deboosting.py
+2
-2
No files found.
tests/reply_deboosting.py
View file @
21f88a63
...
@@ -11,9 +11,9 @@ async def test(session, user_id, screen_name):
...
@@ -11,9 +11,9 @@ async def test(session, user_id, screen_name):
reply_tweet_ids
=
[]
reply_tweet_ids
=
[]
for
tid
in
tweet_ids
:
for
tid
in
tweet_ids
:
if
"in_reply_to_status_id_str"
not
in
tweets_replies
[
"globalObjects"
][
"tweets"
][
tid
]
or
tweets_replies
[
"globalObjects"
][
"tweets"
][
tid
][
"user_id_str"
]
!=
user_id
:
continue
tweet
=
tweets_replies
[
"globalObjects"
][
"tweets"
][
tid
]
tweet
=
tweets_replies
[
"globalObjects"
][
"tweets"
][
tid
]
if
"in_reply_to_status_id_str"
not
in
tweet
or
tweet
[
"in_reply_to_user_id_str"
]
==
user_id
or
tweet
[
"user_id_str"
]
!=
user_id
:
continue
conversation_tweet
=
get_nested
(
tweets_replies
,
[
"globalObjects"
,
"tweets"
,
tweet
[
"conversation_id_str"
]])
conversation_tweet
=
get_nested
(
tweets_replies
,
[
"globalObjects"
,
"tweets"
,
tweet
[
"conversation_id_str"
]])
if
conversation_tweet
is
not
None
and
conversation_tweet
.
get
(
"user_id_str"
)
==
user_id
:
if
conversation_tweet
is
not
None
and
conversation_tweet
.
get
(
"user_id_str"
)
==
user_id
:
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment