-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Context
PTI tracks which images from a WordPress post have been shared to Instagram, preventing duplicate posts and showing history. DMS has a basic _dms_shared_posts meta key but the implementations differ.
What PTI Has
- Post meta key:
_pti_instagram_shared_images— array of records per post:[ 'image_id' => (int), // WP attachment ID 'instagram_media_id' => (str), // Instagram media ID 'timestamp' => (int), // Unix timestamp 'permalink' => (str|null), // Instagram post URL ]
- Used to show "Posted" badges in image selection UI
- Used to filter out already-shared images
What DMS Has
- Post meta key:
_dms_shared_posts— array of sharing records:timestamp,platforms[],image_count
- REST endpoint:
GET /status/{post_id}returns this meta
Gap
DMS tracking is platform-generic but less granular than PTI:
- No per-image tracking (only total image count)
- No platform-specific media IDs (Instagram media ID, tweet ID, etc.)
- No permalinks to the published social post
- Can't tell which specific images were shared vs just the count
Tasks
- Design unified tracking schema that supports per-image + per-platform granularity
- Migrate
_dms_shared_postsschema to include: platform, media_id, permalink, individual image IDs - Port "already shared" filtering logic from PTI
- Update REST endpoint to return richer history data
- Consider migration path for existing
_dms_shared_postsdata
Related
- PTI source:
inc/Core/Actions/Post.php(meta update logic) - DMS source:
inc/RestApi.php(/status/{post_id}endpoint)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels