mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-20 04:57:29 -06:00
unfollows from gts => remote now working
This commit is contained in:
parent
6c7b7659f8
commit
3623205fd7
21 changed files with 368 additions and 47 deletions
|
|
@ -157,7 +157,7 @@ func (p *processor) dereferenceStatusFields(status *gtsmodel.Status) error {
|
|||
|
||||
// it might have been processed elsewhere so check first if it's already in the database or not
|
||||
maybeAttachment := >smodel.MediaAttachment{}
|
||||
err := p.db.GetWhere("remote_url", a.RemoteURL, maybeAttachment)
|
||||
err := p.db.GetWhere([]db.Where{{Key: "remote_url", Value: a.RemoteURL}}, maybeAttachment)
|
||||
if err == nil {
|
||||
// we already have it in the db, dereferenced, no need to do it again
|
||||
l.Debugf("attachment already exists with id %s", maybeAttachment.ID)
|
||||
|
|
@ -206,7 +206,7 @@ func (p *processor) dereferenceStatusFields(status *gtsmodel.Status) error {
|
|||
m.OriginAccountURI = status.GTSAccount.URI
|
||||
|
||||
targetAccount := >smodel.Account{}
|
||||
if err := p.db.GetWhere("uri", uri.String(), targetAccount); err != nil {
|
||||
if err := p.db.GetWhere([]db.Where{{Key: "uri", Value: uri.String()}}, targetAccount); err != nil {
|
||||
// proper error
|
||||
if _, ok := err.(db.ErrNoEntries); !ok {
|
||||
return fmt.Errorf("db error checking for account with uri %s", uri.String())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue