diff options
author | 2022-10-06 12:00:53 +0200 | |
---|---|---|
committer | 2022-10-06 12:00:53 +0200 | |
commit | f8528aa689dedab4f1aceb39023eff3bce5fb6b3 (patch) | |
tree | a8eb041324e53a352a0158d8eb3ff7a583ba8992 /internal/typeutils/internaltofrontend.go | |
parent | [frontend] Make emojis v. slightly larger (#891) (diff) | |
download | gotosocial-f8528aa689dedab4f1aceb39023eff3bce5fb6b3.tar.xz |
[feature] Add emoji image size to instance response (#892)
Diffstat (limited to 'internal/typeutils/internaltofrontend.go')
-rw-r--r-- | internal/typeutils/internaltofrontend.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index aa98180d3..778b73dc9 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -688,9 +688,9 @@ func (c *converter) InstanceToAPIInstance(ctx context.Context, i *gtsmodel.Insta }, MediaAttachments: &model.InstanceConfigurationMediaAttachments{ SupportedMimeTypes: media.AllSupportedMIMETypes(), - ImageSizeLimit: int(config.GetMediaImageMaxSize()), + ImageSizeLimit: int(config.GetMediaImageMaxSize()), // bytes ImageMatrixLimit: instanceMediaAttachmentsImageMatrixLimit, // height*width - VideoSizeLimit: int(config.GetMediaVideoMaxSize()), + VideoSizeLimit: int(config.GetMediaVideoMaxSize()), // bytes VideoFrameRateLimit: instanceMediaAttachmentsVideoFrameRateLimit, VideoMatrixLimit: instanceMediaAttachmentsVideoMatrixLimit, // height*width }, @@ -703,6 +703,9 @@ func (c *converter) InstanceToAPIInstance(ctx context.Context, i *gtsmodel.Insta Accounts: &model.InstanceConfigurationAccounts{ AllowCustomCSS: config.GetAccountsAllowCustomCSS(), }, + Emojis: &model.InstanceConfigurationEmojis{ + EmojiSizeLimit: int(config.GetMediaEmojiLocalMaxSize()), // bytes + }, } } |