IsLocal indicates whether the actor is local to the instance.
()
| 188 | // FindByURI returns an account by its URI if it exists locally. |
| 189 | func (a *Actors) FindByURI(uri string) (*Actor, error) { |
| 190 | var actor Actor |
| 191 | err := a.db.Scopes(PreloadActor).Where("URI = ?", uri).Take(&actor).Error |
| 192 | return &actor, err |
| 193 | } |
| 194 | |
| 195 | // Refesh schedules a refresh of an actor's data. |
| 196 | func (a *Actors) Refresh(actor *Actor) error { |
| 197 | db := a.db.Clauses(clause.OnConflict{ |
| 198 | Columns: []clause.Column{{Name: "actor_id"}}, |
| 199 | DoUpdates: clause.AssignmentColumns([]string{ |
| 200 | "created_at", |