Skip to content

Commit d339ea4

Browse files
committed
Get new share post id with remote scraper
1 parent 077c05c commit d339ea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handlers/embed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func Embed(w http.ResponseWriter, r *http.Request) {
9898
postID = mediaidToCode(mediaID)
9999
} else if strings.Contains(r.URL.Path, "/share/") {
100100
postID, err = getSharePostID(postID)
101-
if err != nil {
101+
if err != nil && len(scraper.RemoteScraperAddr) == 0 {
102102
slog.Error("Failed to get new postID from share URL", "postID", postID, "err", err)
103103
viewsData.Description = "Failed to get new postID from share URL"
104104
views.Embed(viewsData, w)

0 commit comments

Comments
 (0)