Skip to content

Commit

Permalink
Merge branch 'main' of github.com:superseriousbusiness/gotosocial int…
Browse files Browse the repository at this point in the history
…o main
  • Loading branch information
tsmethurst committed May 29, 2021
2 parents 0fe853b + 1fe5e36 commit 5facbed
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
18 changes: 9 additions & 9 deletions internal/api/client/search/searchget.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ func (m *Module) SearchGETHandler(c *gin.Context) {
}

searchQuery := &model.SearchQuery{
AccountID: accountID,
MaxID: maxID,
MinID: minID,
Type: searchType,
AccountID: accountID,
MaxID: maxID,
MinID: minID,
Type: searchType,
ExcludeUnreviewed: excludeUnreviewed,
Query: query,
Resolve: resolve,
Limit: limit,
Offset: offset,
Following: following,
Query: query,
Resolve: resolve,
Limit: limit,
Offset: offset,
Following: following,
}

results, errWithCode := m.processor.SearchGet(authed, searchQuery)
Expand Down
1 change: 0 additions & 1 deletion internal/db/pg/pg.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,6 @@ func (ps *postgresService) GetNotificationsForAccount(accountID string, limit in

q := ps.conn.Model(&notifications).Where("target_account_id = ?", accountID)


if maxID != "" {
n := &gtsmodel.Notification{}
if err := ps.conn.Model(n).Where("id = ?", maxID).Select(); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/message/fromfederatorprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (p *processor) dereferenceAnnounce(announce *gtsmodel.Status, requestingUse
}

// now dereference additional fields straight away (we're already async here so we have time)
if err := p.dereferenceStatusFields(boostedStatus, requestingUsername); err != nil {
if err := p.dereferenceStatusFields(boostedStatus, requestingUsername); err != nil {
return fmt.Errorf("dereferenceAnnounce: error dereferencing status fields for status with id %s: %s", announce.GTSBoostedStatus.URI, err)
}

Expand Down
2 changes: 1 addition & 1 deletion internal/message/searchprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (p *processor) searchAccountByMention(authed *oauth.Auth, mention string, r
// if it's a local account we can skip a whole bunch of stuff
maybeAcct := &gtsmodel.Account{}
if domain == p.config.Host {
if p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil {
if err = p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil {
return
}
foundAccount = maybeAcct
Expand Down
2 changes: 1 addition & 1 deletion internal/typeutils/converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ type TypeConverter interface {
/*
WRAPPER CONVENIENCE FUNCTIONS
*/

// WrapPersonInUpdate
WrapPersonInUpdate(person vocab.ActivityStreamsPerson, originAccount *gtsmodel.Account) (vocab.ActivityStreamsUpdate, error)
}
Expand Down
8 changes: 4 additions & 4 deletions internal/typeutils/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ func (c *converter) StatusToBoost(s *gtsmodel.Status, boostingAccount *gtsmodel.
URL: boostWrapperStatusURL,

// the boosted status is not created now, but the boost certainly is
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
Local: local,
AccountID: boostingAccount.ID,
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
Local: local,
AccountID: boostingAccount.ID,

// replies can be boosted, but boosts are never replies
InReplyToID: "",
Expand Down

0 comments on commit 5facbed

Please sign in to comment.