summaryrefslogtreecommitdiff
path: root/internal/config/validate.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-12 13:03:23 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-12 13:03:23 +0200
commit268f252e0d517f2693b30d03fb8a68a0764a43bc (patch)
tree95920c06bcdfc0ca11486aa08a547d85ca35f8ce /internal/config/validate.go
parent[docs] unbreak standard css (#818) (diff)
downloadgotosocial-268f252e0d517f2693b30d03fb8a68a0764a43bc.tar.xz
[feature] Fetch + display custom emoji in statuses from remote instances (#807)
* start implementing remote emoji fetcher * update status where pk * aaa * tidy up a little * check size limits for emojis * thank you linter, i love you <3 * update swagger docs * add emoji dereference test * make emoji max sizes configurable * normalize db.ErrAlreadyExists
Diffstat (limited to 'internal/config/validate.go')
-rw-r--r--internal/config/validate.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/config/validate.go b/internal/config/validate.go
index 064eae07a..b9fdb013b 100644
--- a/internal/config/validate.go
+++ b/internal/config/validate.go
@@ -67,6 +67,14 @@ func Validate() error {
errs = append(errs, fmt.Errorf("%s must be set", WebAssetBaseDirFlag()))
}
+ if m := GetMediaEmojiLocalMaxSize(); m < 0 {
+ errs = append(errs, fmt.Errorf("%s must not be less than 0", MediaEmojiLocalMaxSizeFlag()))
+ }
+
+ if m := GetMediaEmojiRemoteMaxSize(); m < 0 {
+ errs = append(errs, fmt.Errorf("%s must not be less than 0", MediaEmojiRemoteMaxSizeFlag()))
+ }
+
if len(errs) > 0 {
errStrings := []string{}
for _, err := range errs {