Merge branch 'main' of github.com:superseriousbusiness/gotosocial into main
This commit is contained in:
commit
5facbed9c0
|
@ -128,16 +128,16 @@ func (m *Module) SearchGETHandler(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
searchQuery := &model.SearchQuery{
|
searchQuery := &model.SearchQuery{
|
||||||
AccountID: accountID,
|
AccountID: accountID,
|
||||||
MaxID: maxID,
|
MaxID: maxID,
|
||||||
MinID: minID,
|
MinID: minID,
|
||||||
Type: searchType,
|
Type: searchType,
|
||||||
ExcludeUnreviewed: excludeUnreviewed,
|
ExcludeUnreviewed: excludeUnreviewed,
|
||||||
Query: query,
|
Query: query,
|
||||||
Resolve: resolve,
|
Resolve: resolve,
|
||||||
Limit: limit,
|
Limit: limit,
|
||||||
Offset: offset,
|
Offset: offset,
|
||||||
Following: following,
|
Following: following,
|
||||||
}
|
}
|
||||||
|
|
||||||
results, errWithCode := m.processor.SearchGet(authed, searchQuery)
|
results, errWithCode := m.processor.SearchGet(authed, searchQuery)
|
||||||
|
|
|
@ -1148,7 +1148,6 @@ func (ps *postgresService) GetNotificationsForAccount(accountID string, limit in
|
||||||
|
|
||||||
q := ps.conn.Model(¬ifications).Where("target_account_id = ?", accountID)
|
q := ps.conn.Model(¬ifications).Where("target_account_id = ?", accountID)
|
||||||
|
|
||||||
|
|
||||||
if maxID != "" {
|
if maxID != "" {
|
||||||
n := >smodel.Notification{}
|
n := >smodel.Notification{}
|
||||||
if err := ps.conn.Model(n).Where("id = ?", maxID).Select(); err != nil {
|
if err := ps.conn.Model(n).Where("id = ?", maxID).Select(); err != nil {
|
||||||
|
|
|
@ -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)
|
// 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)
|
return fmt.Errorf("dereferenceAnnounce: error dereferencing status fields for status with id %s: %s", announce.GTSBoostedStatus.URI, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
// if it's a local account we can skip a whole bunch of stuff
|
||||||
maybeAcct := >smodel.Account{}
|
maybeAcct := >smodel.Account{}
|
||||||
if domain == p.config.Host {
|
if domain == p.config.Host {
|
||||||
if p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil {
|
if err = p.db.GetLocalAccountByUsername(username, maybeAcct); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
foundAccount = maybeAcct
|
foundAccount = maybeAcct
|
||||||
|
|
|
@ -40,10 +40,10 @@ func (c *converter) StatusToBoost(s *gtsmodel.Status, boostingAccount *gtsmodel.
|
||||||
URL: boostWrapperStatusURL,
|
URL: boostWrapperStatusURL,
|
||||||
|
|
||||||
// the boosted status is not created now, but the boost certainly is
|
// the boosted status is not created now, but the boost certainly is
|
||||||
CreatedAt: time.Now(),
|
CreatedAt: time.Now(),
|
||||||
UpdatedAt: time.Now(),
|
UpdatedAt: time.Now(),
|
||||||
Local: local,
|
Local: local,
|
||||||
AccountID: boostingAccount.ID,
|
AccountID: boostingAccount.ID,
|
||||||
|
|
||||||
// replies can be boosted, but boosts are never replies
|
// replies can be boosted, but boosts are never replies
|
||||||
InReplyToID: "",
|
InReplyToID: "",
|
||||||
|
|
Loading…
Reference in New Issue