Skip to content

Releases

Release v3.1.2: ignore unknown response fields, pubsub reconnect fixes

Choose a tag to compare

@winrid winrid released this 16 Nov 06:11
7b9f89e

FastComments Java SDK v3.1.2

Fix: responses with fields the client doesn't know threw IllegalArgumentException

The models rejected any response field missing from their schema. When the server added allowSimpleSSOAdmins to the widget config, PublicApi.getCommentsPublic threw The field allowSimpleSSOAdmins in the JSON string is not defined in the CustomConfigParameters properties for every tenant using Simple SSO, so the Android SDK couldn't load comments there.

The spec no longer marks models additionalProperties: false, so every model now keeps unknown fields (getAdditionalProperties(), getAdditionalProperty(name)) instead of throwing. A new server field no longer breaks older clients. core has a regression test (UnknownResponseFieldsTest).

Fix: pubsub LiveEventSubscriber stopped receiving live events after one failure

  • onFailure now reconnects. A failed connect and a dropped open socket both land there, not in onClosed, so before this nothing retried. The reconnect's onOpen fetches events missed in between.
  • Reconnects reuse urlIdWS, so they rejoin the same room instead of the raw urlId.
  • Backoff: full jitter over a 4s window that doubles to a 60s cap (0-4s, 0-8s, 0-16s, 0-32s, 0-60s), reset on open. A 4xx upgrade response is retried every 5 minutes.
  • Reconnects run on one idle-timeout daemon thread per subscriber instead of a new Timer thread per attempt.
  • close() closes the current socket after reconnects. onClosing and onClosed run on different OkHttp threads and now schedule a single reconnect between them, so no stray socket stays open delivering duplicate events.
  • The last event time is an AtomicLong, so concurrent events can't move it backwards and make a reconnect refetch events already delivered.

New LiveEventSubscriberReconnectTest (JUnit + MockWebServer, 7 tests).

New model fields

  • CustomConfigParameters: allowSimpleSSOAdmins, autoVerifySimpleSSOComments
  • TenantPackage: pricingCurrency, monthlyCostLocal, yearlyCostLocal
  • WebhookComment: badges (List<CommentUserBadgeInfo>)

No breaking changes.

Install

<dependency>
  <groupId>com.fastcomments</groupId>
  <artifactId>pubsub</artifactId>
  <version>3.1.2</version>
</dependency>

Full changelog: v3.1.1...v3.1.2

v3.1.1

Choose a tag to compare

@winrid winrid released this 28 Oct 19:04
0f912ce

FastComments Java SDK v3.1.1

New endpoints

PublicApi:

  • votePoll(tenantId, commentId, votePollBody) (PUT /polls/{tenantId}/{commentId}/vote): casts the viewer's vote for VotePollBody.optionId. Optional urlId, broadcastId, sso. Returns VotePollResponse with the updated poll, myPollVotes and voterId.
  • getPollVoters(tenantId, commentId) (GET /polls/{tenantId}/{commentId}/voters): lists who voted for which option. Optional urlId, page, search, sso. Returns GetPollVoterNamesSuccessResponse with voters (PollVoterEntry: name, optionLabel), page, pageSize, total, hasMore.

New model fields

  • PublicCommentBase and PublicComment: poll (CommentPoll)

No breaking changes.

Install

<dependency>
  <groupId>com.fastcomments</groupId>
  <artifactId>client</artifactId>
  <version>3.1.1</version>
</dependency>

Full changelog: v3.1.0...v3.1.1

v3.1.0

Choose a tag to compare

@winrid winrid released this 28 Oct 16:33
d0aa48f

FastComments Java SDK v3.1.0

New endpoints

DefaultApi:

  • Polls: getPoll, putPoll, patchPoll, deletePoll (/api/v1/polls/{commentId})
  • Poll votes: getPollVotes, getPollVote, createPollVote, deletePollVote
  • Webhooks: getWebhooks, createWebhook, deleteWebhook, getWebhookSamplePayloads
  • Batch jobs: getBatchJobs, getBatchJob
  • Page migrations: migratePages, undoPageMigrations
  • Page likes and reacts: getPageLikes, getPageReacts
  • getMe (returns the authenticated caller, GetMeResponse / MeAuthType)
  • createAgentTenant

PublicApi:

  • translateComments (POST /comments/{tenantId}/translations, returns CommentTranslationsResponse)

New optional parameters

  • getAuditLogs: username, ip, crudType, resourceName, targetId, target, includeManagedTenants
  • createCommentPublic: locale
  • getCommentsPublic: questionId, questionValue
  • createV1PageReact, createV2PageReact, deleteV1PageReact, deleteV2PageReact, getV2PageReactUsers: sso
  • getV1PageLikes, getV2PageReacts: sso, includeUserInfo (responses gain users)

New model fields

  • FComment: poll, translations, detectedLanguage
  • PublicComment: myPollVotes
  • CommentData, CreateCommentParams, LiveEvent, PubSubCommentBase: poll
  • CustomConfigParameters: commentTranslation, pollCreation, pollVoting, commentsRequireApproval, autoGenerateUsername
  • QuestionConfig, CreateQuestionConfigBody, UpdateQuestionConfigBody: commentBoxCondition, commentBoxPrompt, subQuestionConditions
  • QuestionResult, CreateQuestionResultBody, UpdateQuestionResultBody: values (multi-choice answers)
  • APIAuditLog: targetId, targetLabel, ua, sIdHashed
  • CommentLogData: emailQueued, skipReason, notifySkipReason, recipientUserId
  • GetTranslationsResponse: locale
  • APITenant.hasDebranding, BillingInfo.vatId, EventLogEntry.domain, TenantPackage.flexFreeModerators
  • New enum values on CommentLogType, LiveEventType, NotificationType and ImportedSiteType

Type changes (source-incompatible)

  • getAuditLogs request builder: limit and skip change from Double to Integer, after and before change from Double to Long.
  • CommentData.questionValues and CreateCommentParams.questionValues: Map<String, GifSearchResponseImagesInnerInner> -> Map<String, RecordStringStringOrNumberOrNumberArrayValue> (values can now be a number array for multi-choice questions).
  • CreateQuestionResultBody.value is no longer required (send values instead for multi-choice questions).
  • CreateTenantBody.createdBy and UpdateTenantBody.createdBy are removed.

Install

<dependency>
  <groupId>com.fastcomments</groupId>
  <artifactId>client</artifactId>
  <version>3.1.0</version>
</dependency>

Full changelog: v3.0.1...v3.1.0

v3.0.1

Choose a tag to compare

@winrid winrid released this 10 Jul 23:51

FastComments Java SDK v3.0.1

Fix: EU live-event replay queried the wrong host

LiveEventSubscriber.subscribeToChanges correctly routed the live WebSocket to wss://ws-eu.fastcomments.com for EU tenants, but the "fetch missed events" REST fallback (fetchEventLog) always built its PublicApi against the default host https://fastcomments.com. For EU tenants this silently queried US infrastructure and returned nothing, so events missed while disconnected were never replayed.

fetchEventLog now points the ApiClient at https://eu.fastcomments.com when config.region == "eu".

Published to Repsy: com.fastcomments:client, com.fastcomments:core, and com.fastcomments:pubsub at 3.0.1 (client/core are unchanged from 3.0.0; the fix is in pubsub).

<dependency>
  <groupId>com.fastcomments</groupId>
  <artifactId>pubsub</artifactId>
  <version>3.0.1</version>
</dependency>

Full changelog: v3.0.0...v3.0.1

v3.0.0

Choose a tag to compare

@winrid winrid released this 30 Jun 19:26

Regenerates the Java client from the latest OpenAPI spec.

Moderation API: adds the moderator-dashboard endpoints (listing, searching, counting and exporting comments and logs; moderation actions such as remove/restore/flag and review/spam/approval status; vote adjustments; bans; badges and trust), authenticated with an SSO moderator token. Methods use the generator's standard fluent request builder (api.operation(...) then chained setters then .execute()).

Model rename: PostRemoveCommentResponse is renamed to PostRemoveCommentApiResponse.

v2.0.0

Choose a tag to compare

@winrid winrid released this 19 Jun 18:44

Adds the Moderation API (moderator dashboard) and renames response types to stable names. Breaking change (renamed return types) - major version bump. Published to Repsy: com.fastcomments:client/core/pubsub 2.0.0.

v1.3.5

Choose a tag to compare

@winrid winrid released this 03 Apr 05:25

Bug Fixes

  • Fixed OffsetDateTime parsing in WebSocket live events. Gson's default handling didn't support OffsetDateTime, so a custom deserializer is now registered.

Improvements

  • WebSocket client refactoring - the OkHttpClient used for WebSocket connections is now built via a dedicated factory method with configurable ping intervals, and a shared static httpClient is used for HTTP polling (event log
    fetches) to avoid connection pool conflicts.
  • Configurable ping intervals - default ping interval is 25s; a createTesting() factory method provides a 5s ping interval for Android emulator / aggressive NAT environments.
  • Forced HTTP/1.1 protocol negotiation to reduce latency (server is HTTP/1.1).

Full Changelog: v1.3.4...v1.3.5

v1.3.4

Choose a tag to compare

@winrid winrid released this 02 Apr 05:42
  • Fixing optional field validation in sanitizer (openapi generator bug)
  • Improved error logging in websocket client
  • Changed pinging methodology in websocket client, tuned for annoying NATs (60s -> 25s ping interval, etc)
  • Renamed some LLM-related credit fields in billing objects
  • Java 25 support for build

Full Changelog: v1.3.2...v1.3.4

v1.3.2

Choose a tag to compare

@winrid winrid released this 01 Apr 04:06

Bump version to 1.3.2, add sc field to LiveEvent

1.3.1

Choose a tag to compare

@winrid winrid released this 25 Mar 05:35

What's Changed

Ticketing System

  • Added full Tickets API support: create, retrieve, list, and change ticket state
  • New models: APITicket, APITicketDetail, APITicketFile with file attachment support
  • New config options: ticketBaseUrl, ticketKBSearchEndpoint, ticketFileUploadsEnabled, ticketMaxFileSize, ticketAutoAssignUserIds

Terms of Service Support

  • Added TOSConfig model for configurable Terms of Service
  • Added tosAcceptedAt field on FComment and CommentData to track TOS acceptance per comment

User Model Enhancements

  • Added backupEmail, pendingBackupEmail, isSiteAdmin, isEmailSuppressed
  • Added notification frequency controls: notificationFrequency, adminNotificationFrequency
  • Added notification tracking: lastTenantNotificationSentDate, lastReplyNotificationSentDate

Mention & Search Improvements

  • New MentionAutoCompleteMode enum for configuring mention autocomplete behavior
  • Added sectioned user search via SearchUsersSectionedResponse, UserSearchSection, UserSearchSectionResult
  • searchUsers endpoint now accepts optional searchSection parameter

Account Notifications

  • New HeaderAccountNotification model
  • HeaderState now includes accountNotifications

Configuration Additions

  • disableProfileComments, disableProfileDirectMessages, widgetQuestionShowBreakdown options

User Subscriptions

  • New UpdateAPIUserSubscriptionData model and UpdateSubscriptionAPIResponse

Enum Type Fix

  • All integer-based enums (CommentLogType, NotificationType, CommentHTMLRenderingMode, DigestEmailFrequency, VoteStyle, SSOSecurityLevel, and others) now use native Integer instead of BigDecimal