trypost/app
Paulo Castellano bd3a349f56
fix: skip removed social accounts when duplicating posts (#226)
* fix: skip removed social accounts when duplicating posts

DuplicatePost was copying orphan post_platform rows left after disconnect
(null social_account_id with snapshot name/username/avatar), which showed
broken avatars in the draft editor. Skip platforms without a live account.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>

* refactor: filter duplicate platforms with whereHas

Use whereHas('socialAccount') instead of null checks in the loop.

Co-authored-by: Paulo Castellano <hello@paulocastellano.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-08-03 13:04:42 -03:00
..
Actions fix: skip removed social accounts when duplicating posts (#226) 2026-08-03 13:04:42 -03:00
Ai Merge main + finalize AI brand-colors toggle 2026-07-18 15:12:26 -03:00
Broadcasting feat(automations): implement automation features and UI enhancements 2026-05-24 09:17:19 -03:00
Concerns refactor: settings redesign, Spanish translations, language system, strict_types 2026-03-30 00:20:43 -03:00
Console/Commands Centralize the Meta long-lived token TTL and clarify the extension helper 2026-07-03 11:07:54 -03:00
DataTransferObjects Extract alt-text truncation onto MediaItem and close test gaps 2026-07-11 10:34:57 -03:00
Enums Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Events Defer PostCreated with DB::afterCommit in the observer. 2026-07-24 12:17:43 -03:00
Exceptions fix(x): harden chunked media upload handling and coverage 2026-07-24 10:30:34 -03:00
Helpers fix(security): make SSRF private-network block configurable and guard the last user-URL fetches 2026-07-17 15:40:15 -03:00
Http fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00
Jobs Fire PostCreated on duplicate and drop unused PostHog eager load. 2026-07-24 11:56:44 -03:00
Listeners Capture post.created to PostHog with created_via. 2026-07-24 11:44:47 -03:00
Mail feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
Mcp fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00
Models Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Observers Defer PostCreated with DB::afterCommit in the observer. 2026-07-24 12:17:43 -03:00
Policies Allow account owners to delete workspaces (#208) 2026-08-01 13:00:38 -04:00
Providers Clamp media byte caps to upload limits and surface truncated board lists. 2026-07-24 22:49:04 -03:00
Rules refactor(media): centralize image/video/document detection in Media\Type 2026-06-25 10:57:57 -03:00
Services Enforce carousel min slides in Generate and expose min_media_count on API/MCP. 2026-07-24 23:51:10 -03:00
Socialite feat(channels): add Discord as a social channel 2026-06-16 14:44:00 -03:00
Support fix: keep post drafts unscheduled by default (#209) 2026-08-01 17:39:18 -03:00