From ac6ed3d939fe9dad81aadbd04541e905c625ca82 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 15 Aug 2022 12:35:05 +0200 Subject: [chore] Update bun / sqlite versions; update gtsmodels (#754) * upstep bun and sqlite versions * allow specific columns to be updated in the db * only update necessary columns for user * bit tidier * only update necessary fields of media_attachment * only update relevant instance fields * update tests * update only specific account columns * use bool pointers on gtsmodels includes attachment, status, account, user * update columns more selectively * test all default fields on new account insert * updating remaining bools on gtsmodels * initialize pointer fields when extracting AP emoji * copy bools properly * add copyBoolPtr convenience function + test it * initialize false bool ptrs a bit more neatly --- internal/typeutils/astointernal_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'internal/typeutils/astointernal_test.go') diff --git a/internal/typeutils/astointernal_test.go b/internal/typeutils/astointernal_test.go index dbd852d3f..7024018d6 100644 --- a/internal/typeutils/astointernal_test.go +++ b/internal/typeutils/astointernal_test.go @@ -51,9 +51,9 @@ func (suite *ASToInternalTestSuite) TestParsePerson() { suite.Equal("Geoff Brando New Personson", acct.DisplayName) suite.Equal("hey I'm a new person, your instance hasn't seen me yet uwu", acct.Note) suite.Equal("https://unknown-instance.com/@brand_new_person", acct.URL) - suite.True(acct.Discoverable) + suite.True(*acct.Discoverable) suite.Equal("https://unknown-instance.com/users/brand_new_person#main-key", acct.PublicKeyURI) - suite.False(acct.Locked) + suite.False(*acct.Locked) } func (suite *ASToInternalTestSuite) TestParsePublicStatus() { @@ -145,10 +145,10 @@ func (suite *ASToInternalTestSuite) TestParseReplyWithMention() { suite.Equal(inReplyToAccount.ID, status.InReplyToAccountID) suite.Equal(inReplyToStatus.ID, status.InReplyToID) suite.Equal(inReplyToStatus.URI, status.InReplyToURI) - suite.True(status.Federated) - suite.True(status.Boostable) - suite.True(status.Replyable) - suite.True(status.Likeable) + suite.True(*status.Federated) + suite.True(*status.Boostable) + suite.True(*status.Replyable) + suite.True(*status.Likeable) suite.Equal(`

@the_mighty_zork nice there it is:

social.pixie.town/users/f0x/st

`, status.Content) suite.Len(status.Mentions, 1) m1 := status.Mentions[0] @@ -177,9 +177,9 @@ func (suite *ASToInternalTestSuite) TestParseOwncastService() { suite.Equal("https://owncast.example.org/logo/external", acct.HeaderRemoteURL) suite.Equal("Rob's Owncast Server", acct.DisplayName) suite.Equal("linux audio stuff ", acct.Note) - suite.True(acct.Bot) - suite.False(acct.Locked) - suite.True(acct.Discoverable) + suite.True(*acct.Bot) + suite.False(*acct.Locked) + suite.True(*acct.Discoverable) suite.Equal("https://owncast.example.org/federation/user/rgh", acct.URI) suite.Equal("https://owncast.example.org/federation/user/rgh", acct.URL) suite.Equal("https://owncast.example.org/federation/user/rgh/inbox", acct.InboxURI) -- cgit v1.2.3