[bugfix] Fix status fields in_reply_to_id and in_reply_to_account_id not being nullable (#798)

* make reply status fields nullable pointers

* update tests
This commit is contained in:
tobi
2022-09-02 17:00:11 +02:00
committed by GitHub
parent d68c04a6c0
commit 4e13408fd4
5 changed files with 32 additions and 16 deletions

View File

@ -331,8 +331,8 @@ func (suite *StatusCreateTestSuite) TestReplyToLocalStatus() {
suite.Equal(fmt.Sprintf("<p>hello <span class=\"h-card\"><a href=\"http://localhost:8080/@%s\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>%s</span></a></span> this reply should work!</p>", testrig.NewTestAccounts()["local_account_2"].Username, testrig.NewTestAccounts()["local_account_2"].Username), statusReply.Content)
suite.False(statusReply.Sensitive)
suite.Equal(model.VisibilityPublic, statusReply.Visibility)
suite.Equal(testrig.NewTestStatuses()["local_account_2_status_1"].ID, statusReply.InReplyToID)
suite.Equal(testrig.NewTestAccounts()["local_account_2"].ID, statusReply.InReplyToAccountID)
suite.Equal(testrig.NewTestStatuses()["local_account_2_status_1"].ID, *statusReply.InReplyToID)
suite.Equal(testrig.NewTestAccounts()["local_account_2"].ID, *statusReply.InReplyToAccountID)
suite.Len(statusReply.Mentions, 1)
}