diff options
author | 2022-12-10 22:43:11 +0100 | |
---|---|---|
committer | 2022-12-10 21:43:11 +0000 | |
commit | 5e060d0bcb9af77e7b6d11acba99db6219d4f68e (patch) | |
tree | 8dee821f5577ed38be754d73370ed2b74c8f0d2b /internal/processing/admin/getemojis.go | |
parent | [chore] make single pull request template (#1239) (diff) | |
download | gotosocial-5e060d0bcb9af77e7b6d11acba99db6219d4f68e.tar.xz |
[feature] Start implementing refetch of lost media files via `/api/v1/admin/media_refetch` (#1221)
* [chore] Move ShortcodeDomain to its own little util func
* [feature] Add RefetchEmojis function to media manager
* [feature] Expose admin media refresh via admin API
* update following review feedback
- change/fix log levels
- make sure not to try to refetch local emojis
- small style refactoring + comments
* log on emoji refetch start
Signed-off-by: kim <grufwub@gmail.com>
Co-authored-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/processing/admin/getemojis.go')
-rw-r--r-- | internal/processing/admin/getemojis.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/internal/processing/admin/getemojis.go b/internal/processing/admin/getemojis.go index d44b4d250..a15ce6e75 100644 --- a/internal/processing/admin/getemojis.go +++ b/internal/processing/admin/getemojis.go @@ -88,14 +88,10 @@ func (p *processor) EmojisGet(ctx context.Context, account *gtsmodel.Account, us Items: items, Path: "api/v1/admin/custom_emojis", NextMaxIDKey: "max_shortcode_domain", - NextMaxIDValue: shortcodeDomain(emojis[count-1]), + NextMaxIDValue: util.ShortcodeDomain(emojis[count-1]), PrevMinIDKey: "min_shortcode_domain", - PrevMinIDValue: shortcodeDomain(emojis[0]), + PrevMinIDValue: util.ShortcodeDomain(emojis[0]), Limit: limit, ExtraQueryParams: []string{filterBuilder.String()}, }) } - -func shortcodeDomain(emoji *gtsmodel.Emoji) string { - return emoji.Shortcode + "@" + emoji.Domain -} |