Prevent nil pointer panic from ActivityObject() method
Previously, we might potentially return a nil activitystreams.Object, which would crash the app. This fixes that.
This commit is contained in:
parent
06054a2cd7
commit
a9bed9fea9
2
posts.go
2
posts.go
|
@ -1182,7 +1182,7 @@ func (p *PublicPost) ActivityObject(app *App) *activitystreams.Object {
|
|||
actorIRI, err := app.db.GetProfilePageFromHandle(app, handle)
|
||||
if err != nil {
|
||||
log.Info("Can't find this user either in the database nor in the remote instance")
|
||||
return nil
|
||||
continue
|
||||
}
|
||||
mentionedUsers[handle] = actorIRI
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue