This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove PubSubHubbub-related columns from accounts table (mastodon#16170)
- Loading branch information
Showing
15 changed files
with
24 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
db/post_migrate/20210507001928_remove_hub_url_from_accounts.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
class RemoveHubURLFromAccounts < ActiveRecord::Migration[5.2] | ||
def change | ||
safety_assured do | ||
remove_column :accounts, :secret, :string, null: false, default: '' | ||
remove_column :accounts, :remote_url, :string, null: false, default: '' | ||
remove_column :accounts, :salmon_url, :string, null: false, default: '' | ||
remove_column :accounts, :hub_url, :string, null: false, default: '' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,24 +22,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
|
||
before do | ||
FollowRequest.create(account: bob, target_account: sender) | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(bob, sender) | ||
end | ||
|
||
it 'removes follow request' do | ||
expect(bob.requested?(sender)).to be false | ||
end | ||
|
||
it 'creates follow relation' do | ||
expect(bob.following?(sender)).to be true | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', protocol: :activitypub, inbox_url: 'http://example.com/inbox')).account } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,19 +17,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
|
||
before do | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(sender, bob) | ||
end | ||
|
||
it 'creates a blocking relation' do | ||
expect(sender.blocking?(bob)).to be true | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox')).account } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', protocol: :ostatus, domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
let(:status) { Fabricate(:status, account: bob, uri: 'tag:example.com:blahblah') } | ||
|
||
before do | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(sender, status) | ||
end | ||
|
||
it 'creates a favourite' do | ||
expect(status.favourites.first).to_not be_nil | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, protocol: :activitypub, username: 'bob', domain: 'example.com', inbox_url: 'http://example.com/inbox')).account } | ||
let(:status) { Fabricate(:status, account: bob) } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,24 +22,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
|
||
before do | ||
FollowRequest.create(account: bob, target_account: sender) | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(bob, sender) | ||
end | ||
|
||
it 'removes follow request' do | ||
expect(bob.requested?(sender)).to be false | ||
end | ||
|
||
it 'does not create follow relation' do | ||
expect(bob.following?(sender)).to be false | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', protocol: :activitypub, inbox_url: 'http://example.com/inbox')).account } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
|
||
before do | ||
sender.block!(bob) | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(sender, bob) | ||
end | ||
|
||
it 'destroys the blocking relation' do | ||
expect(sender.blocking?(bob)).to be false | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox')).account } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,20 +18,6 @@ | |
end | ||
end | ||
|
||
describe 'remote OStatus' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', protocol: :ostatus, domain: 'example.com', salmon_url: 'http://salmon.example.com')).account } | ||
|
||
before do | ||
sender.follow!(bob) | ||
stub_request(:post, "http://salmon.example.com/").to_return(:status => 200, :body => "", :headers => {}) | ||
subject.call(sender, bob) | ||
end | ||
|
||
it 'destroys the following relation' do | ||
expect(sender.following?(bob)).to be false | ||
end | ||
end | ||
|
||
describe 'remote ActivityPub' do | ||
let(:bob) { Fabricate(:user, email: '[email protected]', account: Fabricate(:account, username: 'bob', protocol: :activitypub, domain: 'example.com', inbox_url: 'http://example.com/inbox')).account } | ||
|
||
|