diff options
author | 2022-05-20 04:34:36 -0400 | |
---|---|---|
committer | 2022-05-20 10:34:36 +0200 | |
commit | caa0cde0e025708a762659758d9de7851745cbfe (patch) | |
tree | 49ff2f70b5a15a3bf73832c8032ce7f4d5023392 /internal/processing/media.go | |
parent | [bugfix] Stop some statuses from being home timelined when they shouldn't be ... (diff) | |
download | gotosocial-caa0cde0e025708a762659758d9de7851745cbfe.tar.xz |
[feature] implement custom_emojis endpoint (#563)
* implement custom_emojis api endpoint
* add tests for getting custom emoji out of the database and converting to api emoji
* change sort direction of emoji query
* change logging level and initialize array with known length as per kim's suggestions
* add continue to lessen risk of making a malformed struct during conversion from db to api emojis
Diffstat (limited to 'internal/processing/media.go')
-rw-r--r-- | internal/processing/media.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/processing/media.go b/internal/processing/media.go index 5bf9ccec4..907ce1fd2 100644 --- a/internal/processing/media.go +++ b/internal/processing/media.go @@ -41,3 +41,7 @@ func (p *processor) MediaUpdate(ctx context.Context, authed *oauth.Auth, mediaAt func (p *processor) FileGet(ctx context.Context, authed *oauth.Auth, form *apimodel.GetContentRequestForm) (*apimodel.Content, gtserror.WithCode) { return p.mediaProcessor.GetFile(ctx, authed.Account, form) } + +func (p *processor) CustomEmojisGet(ctx context.Context) ([]*apimodel.Emoji, gtserror.WithCode) { + return p.mediaProcessor.GetCustomEmojis(ctx) +} |