mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 15:57:29 -06:00
[bugfix/chore] Announce reliability updates (#2405)
* [bugfix/chore] `Announce` updates * test update * fix tests * TestParseAnnounce * update comments * don't lock/unlock, change function signature * naming stuff * don't check domain block twice * UnwrapIfBoost * beep boop
This commit is contained in:
parent
d1cac53cbb
commit
0e2c342191
15 changed files with 425 additions and 285 deletions
|
|
@ -50,8 +50,10 @@ func (suite *AnnounceTestSuite) TestNewAnnounce() {
|
|||
suite.True(ok)
|
||||
suite.Equal(announcingAccount.ID, boost.AccountID)
|
||||
|
||||
// only the URI will be set on the boosted status because it still needs to be dereferenced
|
||||
suite.NotEmpty(boost.BoostOf.URI)
|
||||
// only the URI will be set for the boosted status
|
||||
// because it still needs to be dereferenced
|
||||
suite.Nil(boost.BoostOf)
|
||||
suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI)
|
||||
}
|
||||
|
||||
func (suite *AnnounceTestSuite) TestAnnounceTwice() {
|
||||
|
|
@ -81,8 +83,10 @@ func (suite *AnnounceTestSuite) TestAnnounceTwice() {
|
|||
return nil
|
||||
})
|
||||
|
||||
// only the URI will be set on the boosted status because it still needs to be dereferenced
|
||||
suite.NotEmpty(boost.BoostOf.URI)
|
||||
// only the URI will be set for the boosted status
|
||||
// because it still needs to be dereferenced
|
||||
suite.Nil(boost.BoostOf)
|
||||
suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI)
|
||||
|
||||
ctx2 := createTestContext(receivingAccount2, announcingAccount)
|
||||
announce2 := suite.testActivities["announce_forwarded_1_turtle"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue