From 87177d840b9703f572392ef4bd0f5013fd5c3a77 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 28 May 2021 19:57:04 +0200 Subject: Announce/boost (#35) Remote boosts incoming/outgoing now working. --- internal/db/pg/pg.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/db/pg/pg.go') diff --git a/internal/db/pg/pg.go b/internal/db/pg/pg.go index 9b6c7a114..64d6fb636 100644 --- a/internal/db/pg/pg.go +++ b/internal/db/pg/pg.go @@ -963,7 +963,7 @@ func (ps *postgresService) PullRelevantAccountsFromStatus(targetStatus *gtsmodel if targetStatus.InReplyToAccountID != "" { repliedToAccount := >smodel.Account{} if err := ps.conn.Model(repliedToAccount).Where("id = ?", targetStatus.InReplyToAccountID).Select(); err != nil { - return accounts, err + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting repliedToAcount with id %s: %s", targetStatus.InReplyToAccountID, err) } accounts.ReplyToAccount = repliedToAccount } @@ -973,11 +973,11 @@ func (ps *postgresService) PullRelevantAccountsFromStatus(targetStatus *gtsmodel // retrieve the boosted status first boostedStatus := >smodel.Status{} if err := ps.conn.Model(boostedStatus).Where("id = ?", targetStatus.BoostOfID).Select(); err != nil { - return accounts, err + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting boostedStatus with id %s: %s", targetStatus.BoostOfID, err) } boostedAccount := >smodel.Account{} if err := ps.conn.Model(boostedAccount).Where("id = ?", boostedStatus.AccountID).Select(); err != nil { - return accounts, err + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting boostedAccount with id %s: %s", boostedStatus.AccountID, err) } accounts.BoostedAccount = boostedAccount @@ -985,7 +985,7 @@ func (ps *postgresService) PullRelevantAccountsFromStatus(targetStatus *gtsmodel if boostedStatus.InReplyToAccountID != "" { boostedStatusRepliedToAccount := >smodel.Account{} if err := ps.conn.Model(boostedStatusRepliedToAccount).Where("id = ?", boostedStatus.InReplyToAccountID).Select(); err != nil { - return accounts, err + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting boostedStatusRepliedToAccount with id %s: %s", boostedStatus.InReplyToAccountID, err) } accounts.BoostedReplyToAccount = boostedStatusRepliedToAccount } @@ -996,12 +996,12 @@ func (ps *postgresService) PullRelevantAccountsFromStatus(targetStatus *gtsmodel mention := >smodel.Mention{} if err := ps.conn.Model(mention).Where("id = ?", mentionID).Select(); err != nil { - return accounts, fmt.Errorf("error getting mention with id %s: %s", mentionID, err) + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting mention with id %s: %s", mentionID, err) } mentionedAccount := >smodel.Account{} if err := ps.conn.Model(mentionedAccount).Where("id = ?", mention.TargetAccountID).Select(); err != nil { - return accounts, fmt.Errorf("error getting mentioned account: %s", err) + return accounts, fmt.Errorf("PullRelevantAccountsFromStatus: error getting mentioned account: %s", err) } accounts.MentionedAccounts = append(accounts.MentionedAccounts, mentionedAccount) } -- cgit v1.2.3