summaryrefslogtreecommitdiff
path: root/internal/cache/size.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-03-22 14:03:46 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-22 14:03:46 +0100
commit7f4a0a1aeb8a294ee967c63d7a48446df013ec44 (patch)
treeb9b3836fa0abe1d7a5758d07d6ebb6486a353d56 /internal/cache/size.go
parent[bugfix] add all possible busy result codes to the sqlite errBusy catching ch... (diff)
downloadgotosocial-7f4a0a1aeb8a294ee967c63d7a48446df013ec44.tar.xz
[chore] Move local account settings to separate db table (#2770)
* [chore] Move local account settings to separate database model * don't use separate settings_id
Diffstat (limited to 'internal/cache/size.go')
-rw-r--r--internal/cache/size.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/internal/cache/size.go b/internal/cache/size.go
index b1c431c55..080fefea3 100644
--- a/internal/cache/size.go
+++ b/internal/cache/size.go
@@ -28,6 +28,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/config"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/id"
+ "github.com/superseriousbusiness/gotosocial/internal/util"
)
const (
@@ -219,9 +220,6 @@ func sizeofAccount() uintptr {
Bot: func() *bool { ok := true; return &ok }(),
Locked: func() *bool { ok := true; return &ok }(),
Discoverable: func() *bool { ok := false; return &ok }(),
- Privacy: gtsmodel.VisibilityFollowersOnly,
- Sensitive: func() *bool { ok := true; return &ok }(),
- Language: "fr",
URI: exampleURI,
URL: exampleURI,
InboxURI: exampleURI,
@@ -236,9 +234,7 @@ func sizeofAccount() uintptr {
SensitizedAt: exampleTime,
SilencedAt: exampleTime,
SuspendedAt: exampleTime,
- HideCollections: func() *bool { ok := true; return &ok }(),
SuspensionOrigin: exampleID,
- EnableRSS: func() *bool { ok := true; return &ok }(),
}))
}
@@ -251,6 +247,22 @@ func sizeofAccountNote() uintptr {
}))
}
+func sizeofAccountSettings() uintptr {
+ return uintptr(size.Of(&gtsmodel.AccountSettings{
+ AccountID: exampleID,
+ CreatedAt: exampleTime,
+ UpdatedAt: exampleTime,
+ Reason: exampleText,
+ Privacy: gtsmodel.VisibilityFollowersOnly,
+ Sensitive: util.Ptr(true),
+ Language: "fr",
+ StatusContentType: "text/plain",
+ CustomCSS: exampleText,
+ EnableRSS: util.Ptr(true),
+ HideCollections: util.Ptr(false),
+ }))
+}
+
func sizeofApplication() uintptr {
return uintptr(size.Of(&gtsmodel.Application{
ID: exampleID,