File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ def poll(self, source):
150
150
#
151
151
# https://dev.twitter.com/rest/public/search
152
152
# https://developers.google.com/+/api/latest/activities/search
153
- query = ' OR ' .join ('"%s"' % domain for domain in source .domains )
153
+ query = ' OR ' .join ('"%s"' % domain for domain in source .domains
154
+ if not util .in_webmention_blacklist (domain ))
154
155
mentions = source .get_activities_response (
155
156
search_query = query , group_id = gr_source .SEARCH , ** kwargs
156
157
).get ('items' , [])
Original file line number Diff line number Diff line change @@ -555,6 +555,13 @@ def test_search_for_mentions_skips_redirected_posse_post(self):
555
555
original_posts = ['http://or.ig/post' ],
556
556
)])
557
557
558
+ def test_search_for_mentions_skips_blacklisted_domains (self ):
559
+ """https://github.com/snarfed/bridgy/issues/490"""
560
+ self .sources [0 ].domains = ['good' , 't.co' ]
561
+ self .sources [0 ].put ()
562
+ self .post_task ()
563
+ self .assertEquals ('"good"' , self .sources [0 ].last_search_query )
564
+
558
565
def test_wrong_last_polled (self ):
559
566
"""If the source doesn't have our last polled value, we should quit.
560
567
"""
You can’t perform that action at this time.
0 commit comments