mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] check remote status permissibility (#2703)
* add more stringent checks for remote status permissibility * add check for inreplyto of a remote status being a boost * do not permit inReplyTo boost wrapper statuses * change comment wording * fix calls to NewFederator() * add code comments for NotPermitted() and SetNotPermitted() * improve comment * check that existing != nil before attempting delete * ensure replying account isn't suspended * use a debug log instead of info. check for boost using ID * shorten log string length. make info level * add note that replying to boost wrapper status shouldn't be able to happen anyways * update to use onFail() function
This commit is contained in:
@ -90,9 +90,17 @@ func (suite *FromFediAPITestSuite) TestProcessReplyMention() {
|
||||
replyingAccount := suite.testAccounts["remote_account_1"]
|
||||
|
||||
// Set the replyingAccount's last fetched_at
|
||||
// date to something recent so no refresh is attempted.
|
||||
// date to something recent so no refresh is attempted,
|
||||
// and ensure it isn't a suspended account.
|
||||
replyingAccount.FetchedAt = time.Now()
|
||||
err := suite.state.DB.UpdateAccount(context.Background(), replyingAccount, "fetched_at")
|
||||
replyingAccount.SuspendedAt = time.Time{}
|
||||
replyingAccount.SuspensionOrigin = ""
|
||||
err := suite.state.DB.UpdateAccount(context.Background(),
|
||||
replyingAccount,
|
||||
"fetched_at",
|
||||
"suspended_at",
|
||||
"suspension_origin",
|
||||
)
|
||||
suite.NoError(err)
|
||||
|
||||
// Get replying statusable to use from remote test statuses.
|
||||
|
Reference in New Issue
Block a user