summaryrefslogtreecommitdiff
path: root/internal/typeutils/astointernal.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-26 11:56:01 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-26 11:56:01 +0200
commitc4a08292ee44bc731ff90bad18a3f37e5ee8ef22 (patch)
tree1726f8450ec37f744204a857c3be2bfab17f206c /internal/typeutils/astointernal.go
parent[bugfix] more nil checks baybeeeeeeeeeeeeeeeeeeee (#854) (diff)
downloadgotosocial-c4a08292ee44bc731ff90bad18a3f37e5ee8ef22.tar.xz
[feature] Show + federate emojis in accounts (#837)
* Start adding account emoji * get emojis serialized + deserialized nicely * update tests * set / retrieve emojis on accounts * show account emojis in web view * fetch emojis from db based on ids * fix typo in test * lint * fix pg migration * update tests * update emoji checking logic * update comment * clarify comments + add some spacing * tidy up loops a lil (thanks kim)
Diffstat (limited to 'internal/typeutils/astointernal.go')
-rw-r--r--internal/typeutils/astointernal.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go
index b69bb247e..27464809b 100644
--- a/internal/typeutils/astointernal.go
+++ b/internal/typeutils/astointernal.go
@@ -88,6 +88,13 @@ func (c *converter) ASRepresentationToAccount(ctx context.Context, accountable a
acct.DisplayName = displayName
}
+ // account emojis (used in bio, display name, fields)
+ if emojis, err := ap.ExtractEmojis(accountable); err != nil {
+ log.Infof("ASRepresentationToAccount: error extracting account emojis: %s", err)
+ } else {
+ acct.Emojis = emojis
+ }
+
// TODO: fields aka attachment array
// note aka summary