@bufferapp/publish-utils
Advanced tools
Comparing version 1.2.7 to 1.2.8
{ | ||
"name": "@bufferapp/publish-utils", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"description": "Misc. utils for dates, parsing, etc.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
const { getDateString } = require('./date'); | ||
const { getDateString, isInThePast } = require('./date'); | ||
const { | ||
@@ -94,8 +94,15 @@ parseTwitterLinks, | ||
const isPastDue = isInThePast(post.scheduled_at); | ||
return { | ||
day: post.day, | ||
id: post.id, | ||
createdAt: post.created_at, | ||
entities: post.entities, | ||
profileId: post.profile_id, | ||
isConfirmingDelete: post.isDeleting && !post.requestingDraftAction, | ||
isDeleting: post.isDeleting && post.requestingDraftAction, | ||
isWorking: !post.isDeleting && post.requestingDraftAction, | ||
isMoving: post.isMoving, | ||
isPastDue, | ||
imageSrc: isVideo ? media.thumbnail : media.picture, | ||
@@ -111,3 +118,6 @@ imageUrls: getImageUrls(post), | ||
}, | ||
needsApproval: post.needs_approval, | ||
postDetails: getPostDetails({ post }), | ||
profile_service: post.profile_service, | ||
retweet: post.retweet, | ||
retweetComment, | ||
@@ -117,2 +127,3 @@ retweetCommentLinks: canHaveLinks ? links : [], | ||
sent: post.status === 'sent', | ||
source_url: post.source_url, | ||
text, | ||
@@ -125,2 +136,4 @@ type: getPostType({ post }), | ||
scheduled_at: post.scheduled_at, | ||
scheduledAt: post.scheduled_at, | ||
sharedNext: post.shared_next, | ||
pinned: post.pinned, | ||
@@ -127,0 +140,0 @@ isFixed, |
@@ -7,2 +7,3 @@ module.exports = profile => ({ | ||
handle: profile.service_username, | ||
isManager: profile.organization_role === 1, | ||
pendingCount: profile.counts.pending, | ||
@@ -25,2 +26,3 @@ sentCount: profile.counts.sent, | ||
open: false, | ||
organizationRole: profile.organization_role, | ||
}); |
@@ -12,2 +12,4 @@ module.exports = userData => ({ | ||
is_free_user: userData.plan === 'free', | ||
messages: userData.messages || [], | ||
new_contributions_emails_subscribe_link: userData.new_contributions_emails_subscribe_link, | ||
skip_empty_text_alert: userData.messages.includes('remember_confirm_saving_modal'), | ||
@@ -14,0 +16,0 @@ profile_groups: userData.profile_groups || [], |
75913
1469