Skip to content

fix(feed): accept every LinkedIn post link and catch "dev weekend" typos - #86

Merged
junaiddshaukat merged 1 commit into
mainfrom
fix/feed-share-links
Nov 1, 2026
Merged

junaiddshaukat merged 1 commit into
mainfrom
fix/feed-share-links

Conversation

@junaiddshaukat

Copy link
Copy Markdown
Member

Why

  • "Submit for review" rejected normal LinkedIn links. Only links containing activity-<id> worked. Links from LinkedIn's share button are lnkd.in short links or contain ugcPost-<id>, so they failed with "Please paste a public LinkedIn post link".
  • Posts that write "dev weekend" (singular) or similar spellings didn't count as mentioning Dev Weekends.

What changes

  • Every kind of post link is accepted in the /feed submit form and the admin "Add posts by link" box:
    • https://lnkd.in/... short links (followed only on lnkd.in, at most 3 redirects)
    • /posts/...-ugcPost-<id> and /posts/...-share-<id>. The activity ID is read from the post's public embed.
    • /feed/update/urn:li:activity|ugcPost|share:<id>
    • Tracking parameters like ?utm_source=share are dropped.
  • Typo-tolerant mention check: "Dev Weekends", "dev weekend", "DevWeekend", "#devweekends", "dev-weekends" and "dev_weekends", in any letter case. The search pre-filter uses the same match, so more real posts reach the full check.
  • Admin import is capped at 300 links per paste.
  • Resubmitting a post that was already reviewed and hidden now says so, instead of "waiting for review".

Testing

  • Link resolution against real LinkedIn: 11 cases pass, including both links that failed on the live site. Both resolve to the same post, activity 7458002700706672640. Non-LinkedIn links, profile links, http:// links and broken short links are rejected.
  • On a local server with a throwaway database:
    • The submit API accepts both links. That post is already on the feed (it's in the starter list), and a non-post link gets the new error message.
    • Admin import of the short link, the ugcPost link and a junk link adds the post once and reports the junk link as invalid.
  • The 18 posts that "Check live posts" hides still fail with the wider match. None of them says "dev weekend".
  • tsc and next lint pass.

🤖 Generated with Claude Code

- The submit form and admin import now accept lnkd.in short links,
  ugcPost and share links, and /feed/update/ links. The activity ID
  /feed needs is looked up from the post's public embed. Before, only
  links with "activity-<id>" were accepted, so links from LinkedIn's
  share button were rejected.
- A post counts as mentioning Dev Weekends for any spelling: "Dev
  Weekends", "dev weekend", "DevWeekend", "dev-weekends", "dev_weekends".
  Search results use the same match, so fewer real posts are missed.
- Admin import is capped at 300 links per paste.
- A resubmitted post that was already reviewed and hidden now says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@junaiddshaukat
junaiddshaukat merged commit e4ac054 into main Nov 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant