summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/update.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/federation/federatingdb/update.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/federation/federatingdb/update.go')
-rw-r--r--internal/federation/federatingdb/update.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/internal/federation/federatingdb/update.go b/internal/federation/federatingdb/update.go
index 599544e34..f3a04cbcc 100644
--- a/internal/federation/federatingdb/update.go
+++ b/internal/federation/federatingdb/update.go
@@ -121,7 +121,7 @@ func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error {
return fmt.Errorf("UPDATE: error converting to account: %s", err)
}
- if updatedAcct.Domain == config.GetHost() {
+ if updatedAcct.Domain == config.GetHost() || updatedAcct.Domain == config.GetAccountDomain() {
// no need to update local accounts
// in fact, if we do this will break the shit out of things so do NOT
return nil
@@ -136,13 +136,8 @@ func (f *federatingDB) Update(ctx context.Context, asType vocab.Type) error {
updatedAcct.ID = requestingAcct.ID
updatedAcct.Language = requestingAcct.Language
- // do the update
- updatedAcct, err = f.db.UpdateAccount(ctx, updatedAcct)
- if err != nil {
- return fmt.Errorf("UPDATE: database error inserting updated account: %s", err)
- }
-
- // pass to the processor for further processing of eg., avatar/header
+ // pass to the processor for further updating of eg., avatar/header, emojis
+ // the actual db insert/update will take place a bit later
f.fedWorker.Queue(messages.FromFederator{
APObjectType: ap.ObjectProfile,
APActivityType: ap.ActivityUpdate,