mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bugfix] If status URL is empty, use URI instead and don't log unnecessary error (#597)
* test parse status with no URL * if no status URL is available, use the URI instead
This commit is contained in:
@@ -184,10 +184,11 @@ func (c *converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab
|
||||
l := logrus.WithField("statusURI", status.URI)
|
||||
|
||||
// web url for viewing this status
|
||||
if statusURL, err := ap.ExtractURL(statusable); err != nil {
|
||||
l.Infof("ASStatusToStatus: error extracting status URL: %s", err)
|
||||
} else {
|
||||
if statusURL, err := ap.ExtractURL(statusable); err == nil {
|
||||
status.URL = statusURL.String()
|
||||
} else {
|
||||
// if no URL was set, just take the URI
|
||||
status.URL = status.URI
|
||||
}
|
||||
|
||||
// the html-formatted content of this status
|
||||
|
Reference in New Issue
Block a user