summaryrefslogtreecommitdiff
path: root/internal/typeutils
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-09 16:15:25 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-09 16:15:25 +0200
commit555ea8edfb2c30d149b3ca6cb0fbe53f2798c7bc (patch)
tree24567c4c365a007fcd2d6603e696b363129abb77 /internal/typeutils
parentMerge pull request #198 from NyaaaWhatsUpDoc/update/sqlite-library (diff)
downloadgotosocial-555ea8edfb2c30d149b3ca6cb0fbe53f2798c7bc.tar.xz
Import export (#194)
* start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * update bun library -> v1.0.4 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library -> v4.3.1-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * handle oauth token scope, fix user.SigninCount + token.UserID Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update oauth library --> v4.3.2-SSB Signed-off-by: kim (grufwub) <grufwub@gmail.com> * update sqlite library -> v1.13.0 Signed-off-by: kim (grufwub) <grufwub@gmail.com> * review changes * start with export/import code * messing about with decoding/encoding * some more fiddling * stuff is WORKING * working pretty alright! * go fmt * fix up tests, add docs * start backup/restore doc * tweaks * credits * update advancedVisibility settings * review changes Co-authored-by: kim (grufwub) <grufwub@gmail.com> Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
Diffstat (limited to 'internal/typeutils')
-rw-r--r--internal/typeutils/astointernal.go5
-rw-r--r--internal/typeutils/internal.go5
2 files changed, 9 insertions, 1 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go
index 580f999bc..9b87e03d3 100644
--- a/internal/typeutils/astointernal.go
+++ b/internal/typeutils/astointernal.go
@@ -325,6 +325,11 @@ func (c *converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
// advanced visibility for this status
// TODO: a lot of work to be done here -- a new type needs to be created for this in go-fed/activity using ASTOOL
+ // for now we just set everything to true
+ status.Federated = true
+ status.Boostable = true
+ status.Replyable = true
+ status.Likeable = true
// sensitive
// TODO: this is a bool
diff --git a/internal/typeutils/internal.go b/internal/typeutils/internal.go
index 23839b9a8..b6a425732 100644
--- a/internal/typeutils/internal.go
+++ b/internal/typeutils/internal.go
@@ -70,7 +70,10 @@ func (c *converter) StatusToBoost(ctx context.Context, s *gtsmodel.Status, boost
BoostOfID: s.ID,
BoostOfAccountID: s.AccountID,
Visibility: s.Visibility,
- VisibilityAdvanced: s.VisibilityAdvanced,
+ Federated: s.Federated,
+ Boostable: s.Boostable,
+ Replyable: s.Replyable,
+ Likeable: s.Likeable,
// attach these here for convenience -- the boosted status/account won't go in the DB
// but they're needed in the processor and for the frontend. Since we have them, we can