From 46cbb9c551b53e0255a382757744b2b1ae815b71 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 21 Mar 2016 08:41:00 +0100 Subject: [PATCH] Increase note truncation length on account grids, improve FanOutOnWrite a bit, fix tests (the recorded Salmon fixture expects LOCAL_DOMAIN to be something specific unfortunately) --- .travis.yml | 5 +++-- app/services/fan_out_on_write_service.rb | 2 +- app/views/accounts/_grid_card.html.haml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bb2b90168..bcfecc8f35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,9 @@ cache: bundler env: global: - - LOCAL_DOMAIN=example.com - - LOCAL_HTTPS=false + - LOCAL_DOMAIN=cb6e6126.ngrok.io + - LOCAL_HTTPS=true + - RAILS_ENV=test addons: postgresql: 9.4 diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 87a83e892b..3d94f10491 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -11,7 +11,7 @@ class FanOutOnWriteService < BaseService # Deliver to local followers status.account.followers.each do |follower| - next if (status.reply? && !follower.following?(replied_to_user)) || !follower.local? + next if (status.reply? && !(follower.id = replied_to_user.id || follower.following?(replied_to_user))) || !follower.local? push(:home, follower.id, status) end diff --git a/app/views/accounts/_grid_card.html.haml b/app/views/accounts/_grid_card.html.haml index 454272d8cf..d7751a323c 100644 --- a/app/views/accounts/_grid_card.html.haml +++ b/app/views/accounts/_grid_card.html.haml @@ -5,4 +5,4 @@ = link_to url_for_target(account) do %span.display_name= display_name(account) %span.username= "@#{account.acct}" - %p.note= truncate(account.note, length: 124) + %p.note= truncate(account.note, length: 150)