Add: フレンドサーバー (#61)
* Fix mastodon version * テーブル作成 * Wip: フレンドサーバーフォローの承認を受信 * Wip: フレンド申請拒否を受信 * Wip: フォローリクエストを受理 * Wip: 相手からのフォロー・アンフォローを受理 * 普通のフォローとフレンドサーバーのフォローを区別するテストを追加 * ドメインブロックによるフォロー拒否 * ドメインブロックしたあと、申請中のフォロリクを取り下げる処理 * スタブに条件を追加 * Wip: 相手からのDelete信号に対応 * DB定義が消えていたので修正 * Wip: ローカル公開投稿をフレンドに送信する処理など * Wip: 未収載+誰でもの投稿をフレンドに送る設定 * Wip: ローカル公開をそのまま送信する設定を考慮 * Fix test * Wip: 他サーバーからのローカル公開投稿の受け入れ * Wip: Web画面作成 * Fix test * Wip: ローカル公開を連合TLに流す * Wip: フレンドサーバーの削除ボタン * Wip: メール通知や設定のテストなど * Wip: 翻訳を作成 * Fix: 却下されたあとフォローボタンが表示されない問題 * Wip: 編集できない問題 * 有効にしていないフレンドサーバーをリストで無効表示
This commit is contained in:
parent
acb29e5b11
commit
87e858a202
66 changed files with 1638 additions and 51 deletions
|
@ -64,6 +64,26 @@ RSpec.describe AdminMailer do
|
|||
end
|
||||
end
|
||||
|
||||
describe '.new_pending_friend_server' do
|
||||
let(:recipient) { Fabricate(:account, username: 'Barklums') }
|
||||
let(:friend) { Fabricate(:friend_domain, passive_state: :pending, domain: 'abc.com') }
|
||||
let(:mail) { described_class.with(recipient: recipient).new_pending_friend_server(friend) }
|
||||
|
||||
before do
|
||||
recipient.user.update(locale: :en)
|
||||
end
|
||||
|
||||
it 'renders the headers' do
|
||||
expect(mail.subject).to eq('New friend server up for review on cb6e6126.ngrok.io (abc.com)')
|
||||
expect(mail.to).to eq [recipient.user_email]
|
||||
expect(mail.from).to eq ['notifications@localhost']
|
||||
end
|
||||
|
||||
it 'renders the body' do
|
||||
expect(mail.body.encoded).to match 'The new friend server abc.com is waiting for your review. You can approve or reject this application.'
|
||||
end
|
||||
end
|
||||
|
||||
describe '.new_trends' do
|
||||
let(:recipient) { Fabricate(:account, username: 'Snurf') }
|
||||
let(:links) { [] }
|
||||
|
|
|
@ -8,6 +8,11 @@ class AdminMailerPreview < ActionMailer::Preview
|
|||
AdminMailer.with(recipient: Account.first).new_pending_account(User.pending.first)
|
||||
end
|
||||
|
||||
# Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_pending_friend_server
|
||||
def new_pending_friend_server
|
||||
AdminMailer.with(recipient: Account.first).new_pending_friend_server(User.pending.first)
|
||||
end
|
||||
|
||||
# Preview this email at http://localhost:3000/rails/mailers/admin_mailer/new_trends
|
||||
def new_trends
|
||||
AdminMailer.with(recipient: Account.first).new_trends(PreviewCard.joins(:trend).limit(3), Tag.limit(3), Status.joins(:trend).where(reblog_of_id: nil).limit(3))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue