diff options
Diffstat (limited to 'internal/typeutils')
| -rw-r--r-- | internal/typeutils/astointernal.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index 7125e0a03..35f1e7cb7 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -268,10 +268,12 @@ func (c *Converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab // status.URL // // Web URL of this status (optional). - if statusURL, err := ap.ExtractURL(statusable); err == nil { - status.URL = statusURL.String() + if statusURL := ap.GetURL(statusable); len(statusURL) != 0 { + // Take the first hit. + status.URL = statusURL[0].String() } else { - status.URL = status.URI // Fall back to the URI. + // Fall back to the URI. + status.URL = status.URI } // status.Content |
