Repository navigation
Releases
Release v3.1.2: ignore unknown response fields, pubsub reconnect fixes
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
onFailurenow reconnects. A failed connect and a dropped open socket both land there, not inonClosed, so before this nothing retried. The reconnect'sonOpenfetches events missed in between.- Reconnects reuse
urlIdWS, so they rejoin the same room instead of the rawurlId. - 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
Timerthread per attempt. close()closes the current socket after reconnects.onClosingandonClosedrun 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,autoVerifySimpleSSOCommentsTenantPackage:pricingCurrency,monthlyCostLocal,yearlyCostLocalWebhookComment: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
FastComments Java SDK v3.1.1
New endpoints
PublicApi:
votePoll(tenantId, commentId, votePollBody)(PUT /polls/{tenantId}/{commentId}/vote): casts the viewer's vote forVotePollBody.optionId. OptionalurlId,broadcastId,sso. ReturnsVotePollResponsewith the updatedpoll,myPollVotesandvoterId.getPollVoters(tenantId, commentId)(GET /polls/{tenantId}/{commentId}/voters): lists who voted for which option. OptionalurlId,page,search,sso. ReturnsGetPollVoterNamesSuccessResponsewithvoters(PollVoterEntry:name,optionLabel),page,pageSize,total,hasMore.
New model fields
PublicCommentBaseandPublicComment: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
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, returnsCommentTranslationsResponse)
New optional parameters
getAuditLogs:username,ip,crudType,resourceName,targetId,target,includeManagedTenantscreateCommentPublic:localegetCommentsPublic:questionId,questionValuecreateV1PageReact,createV2PageReact,deleteV1PageReact,deleteV2PageReact,getV2PageReactUsers:ssogetV1PageLikes,getV2PageReacts:sso,includeUserInfo(responses gainusers)
New model fields
FComment:poll,translations,detectedLanguagePublicComment:myPollVotesCommentData,CreateCommentParams,LiveEvent,PubSubCommentBase:pollCustomConfigParameters:commentTranslation,pollCreation,pollVoting,commentsRequireApproval,autoGenerateUsernameQuestionConfig,CreateQuestionConfigBody,UpdateQuestionConfigBody:commentBoxCondition,commentBoxPrompt,subQuestionConditionsQuestionResult,CreateQuestionResultBody,UpdateQuestionResultBody:values(multi-choice answers)APIAuditLog:targetId,targetLabel,ua,sIdHashedCommentLogData:emailQueued,skipReason,notifySkipReason,recipientUserIdGetTranslationsResponse:localeAPITenant.hasDebranding,BillingInfo.vatId,EventLogEntry.domain,TenantPackage.flexFreeModerators- New enum values on
CommentLogType,LiveEventType,NotificationTypeandImportedSiteType
Type changes (source-incompatible)
getAuditLogsrequest builder:limitandskipchange fromDoubletoInteger,afterandbeforechange fromDoubletoLong.CommentData.questionValuesandCreateCommentParams.questionValues:Map<String, GifSearchResponseImagesInnerInner>->Map<String, RecordStringStringOrNumberOrNumberArrayValue>(values can now be a number array for multi-choice questions).CreateQuestionResultBody.valueis no longer required (sendvaluesinstead for multi-choice questions).CreateTenantBody.createdByandUpdateTenantBody.createdByare 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
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
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
v1.3.5
Bug Fixes
- Fixed
OffsetDateTimeparsing in WebSocket live events. Gson's default handling didn't supportOffsetDateTime, so a custom deserializer is now registered.
Improvements
- WebSocket client refactoring - the
OkHttpClientused for WebSocket connections is now built via a dedicated factory method with configurable ping intervals, and a shared statichttpClientis 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
- 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
1.3.1
What's Changed
Ticketing System
- Added full Tickets API support: create, retrieve, list, and change ticket state
- New models:
APITicket,APITicketDetail,APITicketFilewith file attachment support - New config options:
ticketBaseUrl,ticketKBSearchEndpoint,ticketFileUploadsEnabled,ticketMaxFileSize,ticketAutoAssignUserIds
Terms of Service Support
- Added
TOSConfigmodel for configurable Terms of Service - Added
tosAcceptedAtfield onFCommentandCommentDatato 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
MentionAutoCompleteModeenum for configuring mention autocomplete behavior - Added sectioned user search via
SearchUsersSectionedResponse,UserSearchSection,UserSearchSectionResult searchUsersendpoint now accepts optionalsearchSectionparameter
Account Notifications
- New
HeaderAccountNotificationmodel HeaderStatenow includesaccountNotifications
Configuration Additions
disableProfileComments,disableProfileDirectMessages,widgetQuestionShowBreakdownoptions
User Subscriptions
- New
UpdateAPIUserSubscriptionDatamodel andUpdateSubscriptionAPIResponse
Enum Type Fix
- All integer-based enums (
CommentLogType,NotificationType,CommentHTMLRenderingMode,DigestEmailFrequency,VoteStyle,SSOSecurityLevel, and others) now use nativeIntegerinstead ofBigDecimal