1793 Commits

Author SHA1 Message Date
postiz-contribution[bot]
a87826d44a
Merge main into staging 2026-10-15 20:08:33 +00:00
Nevo David
08b1e6b46f Merge remote-tracking branch 'origin/main' 2026-10-15 22:23:33 +03:00
Nevo David
20609d33a0 feat: hubspot integration 2026-10-15 22:23:09 +03:00
postiz-contribution[bot]
4ff903d899
Merge main into staging 2026-10-15 14:08:26 +00:00
Nevo David
ef8c7b8c44 feat(hubspot): explain the HubSpot install on the calendar
The HubSpot app's redirect URL (/oauth/hubspot/callback) dropped people on
the bare calendar, so nothing said the install worked or what to do next.
It now lands on /launches?hubspot=installed, where HubspotInstalled opens a
modal with the next steps in HubSpot (Agent Builder > MCP Servers > Postiz
MCP) and then clears the param. returnUrl brings someone who has to sign in
first back to it. Two new strings in en and the 14 Lingo locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:40:07 +03:00
Nevo David
0956d49ab7 feat: hubspot 2026-10-15 12:53:26 +03:00
claude[bot]
4e999f931d Merge remote-tracking branch 'origin/main' into staging
Resolved-by: claude-code-action

# Conflicts:
#	.env.example
2026-10-15 09:26:27 +00:00
Nevo David
d758146320 Merge remote-tracking branch 'origin/main' 2026-10-15 12:14:46 +03:00
Gilad Resisi
b64b2c0048 fix(facebook): stop requesting total_video_impressions in video post analytics
Since early October the Graph API rejects total_video_impressions on the
video_insights edge with "(#100) The value must be a valid insights
metric", on reels and feed videos alike and on every API version. The
metric is requested together with the others in one call, so the whole
request fails and videoPostAnalytics returns [] for every Facebook video
and reel post. Production logs show 100+ such rejections per hour.

Drop the metric and its Impressions case; the remaining metrics
(total_video_views, total_video_reactions_by_type_total and the reels
ones) are still accepted individually and together.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-15 15:58:43 +07:00
claude[bot]
94830e692b Merge remote-tracking branch 'origin/main' into staging
Resolved-by: claude-code-action

# Conflicts:
#	libraries/nestjs-libraries/src/integrations/social/pinterest.provider.ts
2026-10-15 08:52:52 +00:00
Gilad Resisi
ba8cb48143
Merge pull request #2263 from gitroomhq/fix/pinterest-transient-error-main
fix(pinterest): retry transient 'Something went wrong on our end' errors
2026-10-15 08:44:07 +00:00
Gilad Resisi
5a5da1aed4 fix(vk): call VK ID and VK API on the vk.ru domains
VK asked integrations to move from the vk.com hosts to vk.ru
(api.vk.ru, id.vk.ru) by 2025-09-30. Switch the authorize, token,
user_info and API method URLs; the post releaseURL links stay on vk.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:29:29 +07:00
postiz-contribution[bot]
cc7b79d45f
Merge main into staging 2026-10-15 08:08:17 +00:00
Gilad Resisi
a7666b5e2b
Merge pull request #2258 from gitroomhq/fix/youtube-thumbnail-keep-release-url-main
fix(youtube): keep the video id and URL on a post that fails only at the thumbnail step
2026-10-15 07:37:52 +00:00
Gilad Resisi
304538bbac
Merge pull request #2235 from gitroomhq/mastra-protocol-update
fix(mcp): serve the streamable endpoints in Mastra's dual-era mode
2026-10-15 07:31:00 +00:00
Gilad Resisi
18a312b6ba fix(pinterest): retry transient 'Something went wrong on our end' errors
Pinterest's pin creation endpoint intermittently answers with
{"code":2787,"message":"Sorry! Something went wrong on our end."}.
It was unmapped in handleErrors, so the post failed immediately as a
non-retryable BadBody with the 'Unknown Error' placeholder, even though
identical requests succeed minutes later.

Map it to a retry (3 attempts, 5s apart) with a curated message so a
short Pinterest hiccup no longer fails the post, and if it persists the
user sees what actually happened instead of 'Unknown Error'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-15 12:33:46 +07:00
Nevo David
7ca9c39ce6 Merge branch 'main' into feat/hubspot-mcp-oauth 2026-10-15 08:09:24 +03:00
Gilad Resisi
b95e1e2cb4 fix(instagram): make media fetch failed (2207052) retryable
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-15 12:05:19 +07:00
Gilad Resisi
c1fd5cffbe fix(instagram): report untaggable collaborators instead of "Unknown Error"
Instagram rejects a media container when a collaborator handle cannot be
tagged, with error_subcode 2207018 ("Invalid user id"). handleErrors had no
branch for it, so it fell through to the generic BadBody fallback and the
customer's failure email read "An error occurred while posting to Instagram:
Unknown Error", with nothing pointing at the collaborator tag.

Map 2207018 to a bad-body message naming the three real causes: wrong handle,
private account, or collaborator invites disabled. instagram.standalone
delegates to this handleErrors, so both channel types are covered.

Meta's own error_user_msg is not surfaced instead: it comes back localized to
the connected account's language (Hebrew, in the reproduction), so it is not
usable as user-facing text.

Verified against a live Instagram channel by creating a media container with
the customer's exact handle: pre-fix "Unknown Error", post-fix the new message.
2026-10-15 10:19:44 +07:00
claude[bot]
ee191ec210 Merge remote-tracking branch 'origin/main' into staging
Resolved-by: claude-code-action

# Conflicts:
#	libraries/nestjs-libraries/src/integrations/social/youtube.provider.ts
2026-10-15 02:58:07 +00:00
Gilad Resisi
0c93578825
Merge pull request #2257 from gitroomhq/fix/youtube-thumbnail-verify-message-main
fix(youtube): clarify unverified-channel thumbnail error message
2026-10-15 02:50:26 +00:00
Gilad Resisi
23beddcd09 fix(youtube): keep the video id and URL on a post that fails only at the thumbnail step
The video is already live when thumbnails.set is rejected, but the post
ended in ERROR with no release URL, so users re-uploaded duplicates. The
provider now throws PublishedWithError with the video id and URL; the post
activity persists them through PostsService.updateResolvedRelease (the
existing org-scoped repository write, state untouched) and rethrows
BadBody, so every workflow version still marks the post ERROR while the
calendar can link to the live video.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:40:09 +07:00
Gilad Resisi
b2897ff7d9 fix(youtube): clarify unverified-channel thumbnail error message
The youtube.thumbnail error mapping said 'Your account is not verified',
which customers read as their Postiz account/channel connection - one
customer disconnected and re-added their YouTube channel trying to fix
it. The video is actually live on YouTube in this scenario; only the
thumbnails.set call is rejected because custom thumbnails require a
phone-verified YouTube channel.

The new text states the video was published, names the real requirement
(phone-verified channel, youtube.com/verify) and tells the user how to
set this video's thumbnail manually in YouTube Studio.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-15 09:26:00 +07:00
Gilad Resisi
454553c4ff fix(instagram): map the rejected comment error 1772107 to a readable message
Meta returns subcode 1772107 ("Instagram Comment Not Added") from the
first comment call after the post itself was published. It fell back to
"Unknown Error", which hid it from the calendar tooltip and suggested
the whole post failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 09:21:33 +07:00
postiz-contribution[bot]
18a5ea493e
Merge main into staging 2026-10-14 20:06:44 +00:00
Nevo David
59a50e8bdf Merge remote-tracking branch 'origin/main' 2026-10-14 23:06:27 +03:00
Nevo David
668c971171 feat: delete tool 2026-10-14 23:03:45 +03:00
postiz-contribution[bot]
860ba04f70
Merge main into staging 2026-10-14 11:07:06 +00:00
Gilad Resisi
8cfe73a5f6
Merge branch 'main' into feat/billing-ai-credits 2026-10-14 16:44:27 +07:00
Gilad Resisi
7e6b155147 feat(billing): trial-aware renewal sentence, refresh the card after a plan change
getRenewalDate now returns { renewsAt, trialing }: while the Stripe
subscription is trialing, renewsAt is its trial_end and the card says
the free trial ends and the first payment is charged on that date.
After an in-place plan change the renewal date and the credits are
revalidated together with the invoices, so the counters don't mix the
new plan's totals with the old plan's remaining credits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:34:18 +07:00
Gilad Resisi
f824cc0c9a
Merge branch 'main' into feat/public-api-mentions 2026-10-14 15:11:47 +07:00
Gilad Resisi
0b22d994bb fix(linkedin): refresh expired tokens in the mention lookup
mention() used the global fetch and read elements without checking the
status, so a 401 surfaced as a TypeError instead of RefreshToken. The
public integration-trigger endpoint and the MCP triggerTool refresh and
retry on RefreshToken, so use SocialAbstract.fetch like the provider's
other calls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:11:10 +07:00
Gilad Resisi
51795629ec feat(billing): show the renewal date and remaining AI credits on the billing page
Adds a Billing cycle card between the plans and the payment method card:
the next renewal date from the payment provider (new getRenewalDate on the
provider interface, null by default, Stripe reads current_period_end of the
live subscription) via GET /billing/renewal, and the remaining AI images,
AI videos and clipping minutes of the current month from the existing
/copilot/credits endpoint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:57:16 +07:00
Gilad Resisi
6e8ef482d5
Merge pull request #2247 from gitroomhq/fix/public-delete-post-response
fix(posts): return the deleted post id from public API deletes
2026-10-14 07:02:41 +00:00
Gilad Resisi
8c75711800
Merge pull request #2242 from gitroomhq/fix/vk-upload-api-errors
fix(vk): surface VK API errors from the media upload calls
2026-10-14 07:02:18 +00:00
Gilad Resisi
1004ca9232
Merge pull request #2240 from gitroomhq/fix/tiktok-business-image-size
fix(tiktok): pre-check image sizes on TikTok Business channels
2026-10-14 06:48:06 +00:00
Gilad Resisi
8b84937c19
Merge pull request #2239 from gitroomhq/fix/instagram-generic-container-error
fix(instagram): show the fallback message when the container status carries no detail
2026-10-14 06:46:02 +00:00
Nevo David
b1a28b17eb feat: hubspot 2026-10-14 08:04:22 +03:00
Gilad Resisi
c0fee9eaa0 feat(linkedin): expose company mention lookup to the public API and MCP
Mark LinkedinProvider.mention() as a @Tool so the existing company page
lookup (exact vanity name) is listed in integration settings and callable
through the public integration-trigger endpoint, the CLI and the MCP
triggerTool. The returned id and label are used in a data-mention span,
which the existing publish path already converts to a LinkedIn
organization mention.

Tell agents about it: integrationSchema says its tools can include a
mention lookup, and the post content description allows the mention span.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 19:10:36 +07:00
Gilad Resisi
b1d72df532 fix(posts): return the deleted post id from deletePost
PostsService.deletePost always returned { error: true }, even after
soft-deleting the post group, so both public API delete routes reported
an error on success. The success return was dropped when the method was
rewritten for Temporal workflow termination. Restore { id } on success;
{ error: true } stays for a group that matches no post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 18:54:30 +07:00
Gilad Resisi
b757cdf007 fix(vk): surface VK API errors from the media upload calls
VK answers HTTP 200 with { error } instead of { response } on failures.
#2131 classified those bodies for wall.post and wall.createComment, but
uploadMedia still read all.response.upload_url and saved.response[0]
unchecked, so any VK error on photos.getWallUploadServer, video.save or
photos.saveWallPhoto became "Cannot read properties of undefined". That
unknown error exhausted the retries and ended in markUnconfirmed, telling
the user to check VK for a post that was never sent, with VK's actual
reason lost.

Run the existing checkApiError on both upload responses, so code 5 goes
through the token refresh, 6/9/29 retry, and anything else is a BadBody
carrying VK's error_msg. The success path is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 09:46:09 +07:00
Gilad Resisi
a15f6ea302 fix(tiktok): pre-check image sizes on TikTok Business channels
A customer sent the same carousel of 2172x2896 images (Inbox UPLOAD) to
four TikTok channels on 2026-10-12. The three regular TikTok channels
rejected it at creation with the 1080px shorter-side check added in
96e46cfe, while the TikTok Business channel accepted it and then failed
at publish with picture_size_check_failed. The same images resized to
1080x1440 published on all four.

The limit is TikTok's and applies to both providers; only the regular
provider checked it up front. TiktokBusinessProvider.checkValidity now
runs the same measurement, and its picture_size_check_failed mapping uses
the corrected message from 96e46cfe instead of "Picture must not exceed
1080x1920".

Posts already scheduled on Business channels are not re-validated, since
checkValidity only runs on create/update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:21:00 +07:00
Gilad Resisi
38918c2f98 fix(instagram): show the fallback message when the container status carries no detail
When a media container ends in status_code ERROR, Meta can return the same
literal ("ERROR") in the status field and no error code. The provider used
status as the message ahead of the fallback, so the post showed only "ERROR".

Treat a status identical to status_code as empty so the existing fallback,
"Instagram could not process the media", is used. Real status details still
go through handleErrors and are used as before.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-13 07:55:10 +07:00
Gilad Resisi
100a105d1a
Merge branch 'main' into mastra-protocol-update 2026-10-12 20:04:22 +07:00
Gilad Resisi
41f23e9d52 fix(account): cancel the subscription and remove team members on account deletion
Deleting an account was blocked with "Please remove your team members
before deleting your account" whenever the org had any other member. When a
plan loses team members the subscription flow only disables them, it does not
remove them, so an owner of a cancelled org who could not reach the team
settings (billing paywall) was stuck and could never delete the account.

The owner's explicit confirmation now covers both effects instead:
- GET /user/delete-account-info returns hasSubscription / hasAdditionalMembers
  across the orgs the user owns, and the confirmation dialog states that the
  subscription will be cancelled and/or the additional team members removed
  from the organization (four text variants).
- deleteAccount removes every other member of each deleted org, whether the
  subscription is still active or already cancelled (members disabled).
- An org with another SUPERADMIN is not treated as owned: deleting the
  account only removes the user from it and the org is left untouched.

Subscription cancellation itself is unchanged (cancelAllSubscriptions in the
controller, before deleteAccount).

Verified end to end in Stripe test mode with stripe listen: an org with an
active subscription and an enabled member, and an org whose subscription was
already cancelled with a disabled member, were both deleted; the Stripe
subscription ended up canceled, the Subscription row was removed and the
members kept their own orgs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-12 19:56:44 +07:00
Gilad Resisi
5ead635170 fix(mcp): serve the streamable endpoints in Mastra's dual-era mode
Set protocolVersion '2026-07-28' on the five streamable-HTTP MCPServer
instances (the legacy /sse/:id server keeps its config) and drop the
enableJsonResponse option the mode does not accept. Mastra then serves
2026-07-28 clients natively and 2025-era clients through the SDK's
stateless fallback, which answers GET/DELETE with 405 and runs on the
SDK's Node adapter instead of the @hono/node-server pump that held dead
SSE streams forever.

2026-07-28 clients open a subscriptions/listen stream for the whole
session; the tool lists never change, so endListenStream ends those
responses after 10 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:25:44 +07:00
postiz-contribution[bot]
4920af67b9
Merge main into staging 2026-10-12 06:15:32 +00:00
Gilad Resisi
93b1a2a642 fix(instagram): point error 2207053 at Instagram's video limits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 08:32:09 +07:00
claude[bot]
74184a1885 Merge remote-tracking branch 'origin/main' into staging
Resolved-by: claude-code-action

# Conflicts:
#	libraries/nestjs-libraries/src/integrations/refresh.integration.service.ts
2026-10-09 08:36:36 +00:00
Gilad Resisi
7db798f0a1
Merge branch 'main' into fix/google-workspace-session-observability 2026-10-09 14:53:05 +07:00