Loading Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ Ruby 2.1 is no longer officially supported. ## Bug fixes * Fix height too high on mobile SPV [#7480](https://github.com/diaspora/diaspora/pull/7480) * Improve stream when ignoring a person who posts a lot of tagged posts [#7503](https://github.com/diaspora/diaspora/pull/7503) ## Features * Add support for mentions in comments to the backend [#6818](https://github.com/diaspora/diaspora/pull/6818) Loading lib/evil_query.rb +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ module EvilQuery def followed_tags_posts! logger.debug("[EVIL-QUERY] followed_tags_posts!") StatusMessage.public_tag_stream(@user.followed_tag_ids) StatusMessage.public_tag_stream(@user.followed_tag_ids).excluding_hidden_content(@user) end def mentioned_posts Loading spec/lib/evil_query_spec.rb +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,18 @@ describe EvilQuery::MultiStream do expect(evil_query.make_relation!.map(&:id)).not_to include(public_post.id) expect(evil_query.make_relation!.map(&:id)).not_to include(private_post.id) end it "doesn't include posts with tags from ignored users" do tag = ActsAsTaggableOn::Tag.find_or_create_by(name: "test") alice.tag_followings.create(tag_id: tag.id) alice.blocks.create(person_id: eve.person_id) bob_post = bob.post(:status_message, text: "public #test post 1", to: "all", public: true) eve_post = eve.post(:status_message, text: "public #test post 2", to: "all", public: true) expect(evil_query.make_relation!.map(&:id)).to include(bob_post.id) expect(evil_query.make_relation!.map(&:id)).not_to include(eve_post.id) end end end Loading Loading
Changelog.md +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ Ruby 2.1 is no longer officially supported. ## Bug fixes * Fix height too high on mobile SPV [#7480](https://github.com/diaspora/diaspora/pull/7480) * Improve stream when ignoring a person who posts a lot of tagged posts [#7503](https://github.com/diaspora/diaspora/pull/7503) ## Features * Add support for mentions in comments to the backend [#6818](https://github.com/diaspora/diaspora/pull/6818) Loading
lib/evil_query.rb +1 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ module EvilQuery def followed_tags_posts! logger.debug("[EVIL-QUERY] followed_tags_posts!") StatusMessage.public_tag_stream(@user.followed_tag_ids) StatusMessage.public_tag_stream(@user.followed_tag_ids).excluding_hidden_content(@user) end def mentioned_posts Loading
spec/lib/evil_query_spec.rb +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,18 @@ describe EvilQuery::MultiStream do expect(evil_query.make_relation!.map(&:id)).not_to include(public_post.id) expect(evil_query.make_relation!.map(&:id)).not_to include(private_post.id) end it "doesn't include posts with tags from ignored users" do tag = ActsAsTaggableOn::Tag.find_or_create_by(name: "test") alice.tag_followings.create(tag_id: tag.id) alice.blocks.create(person_id: eve.person_id) bob_post = bob.post(:status_message, text: "public #test post 1", to: "all", public: true) eve_post = eve.post(:status_message, text: "public #test post 2", to: "all", public: true) expect(evil_query.make_relation!.map(&:id)).to include(bob_post.id) expect(evil_query.make_relation!.map(&:id)).not_to include(eve_post.id) end end end Loading