From: David Yip Date: Fri, 17 Nov 2017 23:40:00 +0000 (-0600) Subject: Merge remote-tracking branch 'origin/master' into merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=1ab12ba38ebd42be93b63b7cf0d3c6a81060b741;p=mastodon.git Merge remote-tracking branch 'origin/master' into merge-upstream --- 1ab12ba38ebd42be93b63b7cf0d3c6a81060b741 diff --cc app/models/account.rb index 230a5d298,9353c40da..a4b8e1c0b --- a/app/models/account.rb +++ b/app/models/account.rb @@@ -53,9 -53,8 +53,10 @@@ class Account < ApplicationRecor include AccountInteractions include Attachmentable include Remotable + include Paginable + MAX_NOTE_LENGTH = 500 + enum protocol: [:ostatus, :activitypub] # Local users diff --cc app/models/follow.rb index ea00a377a,795ecf55a..b82da7227 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@@ -3,12 -3,11 +3,13 @@@ # # Table name: follows # + # id :integer not null, primary key # created_at :datetime not null # updated_at :datetime not null -# account_id :integer not null -# target_account_id :integer not null +# account_id :bigint not null +# id :bigint not null, primary key +# target_account_id :bigint not null +# show_reblogs :boolean default(TRUE), not null # class Follow < ApplicationRecord diff --cc app/models/follow_request.rb index 962b61411,fac91b513..21f01e18b --- a/app/models/follow_request.rb +++ b/app/models/follow_request.rb @@@ -3,12 -3,11 +3,13 @@@ # # Table name: follow_requests # + # id :integer not null, primary key # created_at :datetime not null # updated_at :datetime not null -# account_id :integer not null -# target_account_id :integer not null +# account_id :bigint not null +# id :bigint not null, primary key +# target_account_id :bigint not null +# show_reblogs :boolean default(TRUE), not null # class FollowRequest < ApplicationRecord diff --cc app/services/fan_out_on_write_service.rb index 2214d73dd,bbaf3094b..0f77556dc --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@@ -10,13 -10,11 +10,14 @@@ class FanOutOnWriteService < BaseServic deliver_to_self(status) if status.account.local? + render_anonymous_payload(status) + if status.direct_visibility? deliver_to_mentioned_followers(status) + deliver_to_direct_timelines(status) else deliver_to_followers(status) + deliver_to_lists(status) end return if status.account.silenced? || !status.public_visibility? || status.reblog? diff --cc db/schema.rb index 0691c4220,345b05850..c2de16885 --- a/db/schema.rb +++ b/db/schema.rb @@@ -489,8 -496,11 +508,12 @@@ ActiveRecord::Schema.define(version: 20 add_foreign_key "follow_requests", "accounts", name: "fk_76d644b0e7", on_delete: :cascade add_foreign_key "follows", "accounts", column: "target_account_id", name: "fk_745ca29eac", on_delete: :cascade add_foreign_key "follows", "accounts", name: "fk_32ed1b5560", on_delete: :cascade + add_foreign_key "glitch_keyword_mutes", "accounts", on_delete: :cascade add_foreign_key "imports", "accounts", name: "fk_6db1b6e408", on_delete: :cascade + add_foreign_key "list_accounts", "accounts", on_delete: :cascade + add_foreign_key "list_accounts", "follows", on_delete: :cascade + add_foreign_key "list_accounts", "lists", on_delete: :cascade + add_foreign_key "lists", "accounts", on_delete: :cascade add_foreign_key "media_attachments", "accounts", name: "fk_96dd81e81b", on_delete: :nullify add_foreign_key "media_attachments", "statuses", on_delete: :nullify add_foreign_key "mentions", "accounts", name: "fk_970d43f9d1", on_delete: :cascade