From fc43de6012e08d3389b989104806b2a2db181416 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Mon, 13 Nov 2023 11:04:16 +0300 Subject: [PATCH] add friendica true remote timeline fix --- mastodon/status.go | 8 ++++++++ templates/timeline.tmpl | 1 + 2 files changed, 9 insertions(+) diff --git a/mastodon/status.go b/mastodon/status.go index e77b99b..7c9896a 100644 --- a/mastodon/status.go +++ b/mastodon/status.go @@ -371,6 +371,14 @@ func (c *Client) TrueRemoteTimeline(ctx context.Context, instance string, instan status.URL = "https://" + instance + "/notes/" + statusMisskey.ID publicstatuses = append(publicstatuses, &status) } + case "friendica": + err = json.NewDecoder(resp.Body).Decode(&publicstatuses) + if err != nil { + return nil, err + } + for _, status := range publicstatuses { + status.URL = status.URI // Fix federate URL + } default: err = json.NewDecoder(resp.Body).Decode(&publicstatuses) if err != nil { diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index 102f0c6..3964e2b 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -26,6 +26,7 @@