SurfCoinsChat Community

Description

SurfCoinsChat Community is an independent extension for the free/community edition of Better Messages.

It keeps Better Messages responsible for conversations and message storage while adding:

  • Group-conversation management: group name/image, participants, moderators, invitations, conversation notification mute, mute/ban controls, system-message preference, and leave-group flow.
  • Online and last-seen presence, avatar indicators, and typing/activity states.
  • One-tap quick replies above the active composer, using the native Better Messages send flow.
  • Administrator-managed quick replies with add, edit, enable/disable, drag-to-reorder, preview, and restore-default controls.
  • Sent, delivered, and read indicators for outgoing messages, with per-participant receipt details in group conversations.
  • Browser-recorded voice messages stored on the same WordPress site.
  • One-to-one WebRTC voice and video calls with call history.
  • Automatic Better Messages full-screen mode on the dedicated /chat/ page.
  • Per-user chat background images for users with the standard WordPress upload_files capability.
  • Installable PWA manifest and Service Worker support.
  • Explicit opt-in browser Web Push notifications.
  • Adaptive/event-driven synchronization that reduces background REST traffic and duplicate work across multiple browser tabs.
  • A compact footer transport indicator shows whether the optional SurfCoins WebSocket connection is active, reconnecting, or inactive.
  • Administrator settings show the optional SurfCoins WebSocket integration state and can simplify selected commercial Better Messages submenu links without modifying Better Messages files.
  • When SurfCoins WebSocket is not installed, administrators can download the plugin for free from SurfCoins while licensing remains separate for the realtime service.

Better Messages is required. The dependency slug is bp-better-messages.

SurfCoinsChat Community is an independent project and is not affiliated with or endorsed by Better Messages or its developer.

PWA and activation behavior

The plugin serves /surfcoins-manifest.webmanifest and /surfcoins-sw.js.

On activation, the plugin may create a local WordPress page named “SurfCoins Offline” for the offline PWA experience. It also creates its own database tables and local settings used for presence, calls/signaling, and opt-in push subscriptions.

If the former SurfCoins PWA plugin is installed, deactivate it before using these integrated PWA features so both plugins do not attempt to own the same Service Worker and manifest URLs.

External services

SurfCoinsChat Community only contacts external network services in specific features described below.

Google STUN for WebRTC

By default, one-to-one WebRTC calls use the public endpoints stun:stun.l.google.com:19302 and stun:stun1.l.google.com:19302.

These STUN requests occur when a user starts or receives a WebRTC call. They help browsers discover network addresses for peer-to-peer connectivity and may disclose network information such as the user’s public IP address to Google. SurfCoinsChat Community does not send chat messages or stored voice-message files to Google.

Service: https://www.google.com/
Privacy: https://policies.google.com/privacy
Terms: https://policies.google.com/terms

Optional administrator-configured TURN

A site administrator may configure a TURN relay. If a direct peer-to-peer connection cannot be established, call media may be relayed through that configured TURN service.

SurfCoinsChat Community does not choose a third-party TURN provider. The site administrator is responsible for the selected TURN service and for documenting its privacy policy and terms to site users.

Browser Web Push endpoints

Web Push is disabled until a signed-in user explicitly enables browser notifications and grants permission.

The browser creates a push subscription whose endpoint is operated by the browser or operating-system vendor. SurfCoinsChat Community stores that subscription on the WordPress site and sends encrypted notification payloads directly to the supplied endpoint when a new Better Messages message is sent. No SurfCoins-operated push gateway is used.

Depending on the browser/device, the endpoint can be operated by services such as Google/Firebase, Mozilla, or Apple.

Google/Firebase:
Service: https://firebase.google.com/docs/cloud-messaging
Privacy: https://policies.google.com/privacy
Terms: https://firebase.google.com/terms

Mozilla:
Service: https://support.mozilla.org/kb/push-notifications-firefox
Privacy: https://www.mozilla.org/privacy/firefox/
Terms: https://www.mozilla.org/about/legal/terms/firefox/

Apple:
Service: https://developer.apple.com/documentation/usernotifications/sending-web-push-notifications-in-web-apps-and-browsers
Privacy: https://www.apple.com/legal/privacy/

Users can disable notifications through the SurfCoinsChat interface or their browser/device settings.

Privacy

SurfCoinsChat Community stores plugin data on the WordPress site, including:

  • Transient presence rows per browser installation/session, including user ID, a random session identifier, conversation ID, temporary activity, activity expiration, and last-seen time. This lets the same account stay active on more than one device without one device overwriting another.
  • Temporary WebRTC call/signaling records.
  • Opt-in browser push subscriptions.
  • A per-user chat-background URL when the user selects a custom background.
  • Voice-message media attachments only when the user explicitly records and sends them.

The plugin registers with the WordPress personal-data Export and Erase tools for its presence data. Presence and push-subscription records are removed when the corresponding WordPress user is deleted. Plugin-owned tables and plugin settings are removed by uninstall.php when the plugin is deleted.

Site owners should review these behaviors and adapt their privacy policy to applicable requirements.

Screenshots

Installation

  1. Install and activate Better Messages.
  2. Install and activate SurfCoinsChat Community.
  3. Open the site’s Better Messages chat while signed in.
  4. Customize quick replies under SurfCoinsChat > Quick replies, if desired.
  5. Review optional realtime transport and administrator-menu preferences under SurfCoinsChat > Settings.
  6. Configure optional PWA settings under Settings > SurfCoinsChat PWA & Push.
  7. For calls across restrictive networks, optionally configure a TURN server.

No external account or API key is required for the default STUN configuration.

FAQ

Does this replace Better Messages?

No. Better Messages remains responsible for conversations, recipients, messages, and its core interface.

Can I customize the quick replies?

Yes. Administrators can add, edit, enable or disable, reorder, and restore the default quick replies under SurfCoinsChat > Quick replies. Custom replies are stored as a single WordPress option and do not add a database table or polling request.

Does it require the paid Better Messages WebSocket edition?

No. The plugin is designed for the Better Messages Community/free workflow. SurfCoinsChat uses Better Messages 3.x runtime events when available and an adaptive WordPress REST fallback. When the optional SurfCoins WebSocket transport is connected, presence, typing, message wake-ups, one-to-one delivery/read receipts, and WebRTC call signaling are event-driven while REST remains a reconciliation fallback.

Are voice messages sent to a third party?

No. When a user explicitly records and sends a voice message, the audio file is uploaded to the same WordPress site and stored as a WordPress media attachment associated with the conversation.

Are voice or video calls recorded?

No. SurfCoinsChat Community stores temporary call/signaling metadata on the WordPress site but does not record call audio or video.

Can a site owner use TURN?

Yes. Define SURFCOINSCHAT_TURN_URL, SURFCOINSCHAT_TURN_USERNAME, and SURFCOINSCHAT_TURN_CREDENTIAL in wp-config.php, or use the surfcoinschat_webrtc_ice_servers filter.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“SurfCoinsChat Community” is open source software. The following people have contributed to this plugin.

Contributors

“SurfCoinsChat Community” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “SurfCoinsChat Community” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

0.7.25

  • Compatibility: adds contenteditable caret normalization before Better Messages 3.1 processes @mentions.
  • Compatibility: adds a caret-aware fallback mention lookup for Chat Rooms while preserving Better Messages native mention markup.
  • Known issue: @mention autocomplete can still fail in some Better Messages 3.1 Chat Rooms and remains under investigation.

0.7.24

  • Fix: restores native Better Messages 3.1 @mention autocomplete in persistent Chat Rooms by overriding only the native suggestion lookup with the authoritative room recipient list.
  • Compatibility: keeps Better Messages in control of the mention UI, insertion markup and notifications; no parallel autocomplete is added.

0.7.23

  • Fixes Better Messages 3.1 Chat Room @mention autocomplete by repairing the native mentionsSuggestions REST response instead of rendering a separate picker.
  • Includes valid Chat Room recipients even when Better Messages marks their recipient row as deleted from the thread list, while preserving native permissions, composer UI, mention markup and notifications.
  • Repairs missing Better Messages user-index records before the native composer hydrates returned suggestion IDs.
  • Removes the unsuccessful 0.7.22 custom mention picker and preserves the proven 0.7.19 mobile keyboard behavior.

0.7.22

  • Adds a dedicated @mention autocomplete fallback for Better Messages 3.1 large/legacy Chat Rooms when the native composer recognizes @ but cannot hydrate any suggestion users.
  • Resolves matching users directly from the current Better Messages recipients plus WordPress user data, without modifying Better Messages files or exposing users outside the conversation.
  • Inserts Better Messages’ own bm-inline-mention markup so message formatting and mention notifications remain native.
  • Removes the ineffective 0.7.20/0.7.21 REST-response mutation and preserves the proven 0.7.19 mobile keyboard behavior.

0.7.21

  • Fixes Better Messages 3.1 @mention suggestions in Chat Rooms whose valid participant recipient rows are marked deleted only from the participant’s thread list.
  • Uses Better Messages’ own Chat Room membership semantics while keeping the native active-recipient rule for regular conversations.
  • Preserves the 0.7.19 mobile keyboard behavior and all existing Better Messages 3.0.x/3.1.x, WebSocket and administrator integrations.

0.7.20

  • Restores @mention suggestions in Better Messages 3.1 groups when the Better Messages user index is incomplete.
  • Keeps Better Messages’ native mention endpoint, permissions, insertion and notification behavior; SurfCoinsChat only merges matching thread participants from the authoritative recipients/WordPress user tables.
  • Preserves the 0.7.19 mobile keyboard fix, Better Messages 3.0.x/3.1.x compatibility, WebSocket integration and administrator features.

0.7.19

  • Restores the mobile send-focus guard for Better Messages 3.1+ so the software keyboard remains open after a manual text send.
  • Does not inject the legacy voice control into Better Messages 3.1+ and does not cancel the native send action.
  • Keeps Better Messages 3.0.x compatibility and the existing SurfCoins WebSocket/admin integrations.

0.7.17

  • Adds explicit Better Messages 3.1.0 compatibility while preserving Better Messages 3.0.x support.
  • Supports both legacy bp-better-messages-* and new better-messages-* administrator slugs for menu cleanup and the WebSocket licensing CTA.
  • Treats the new Better Messages 3.1 “Support” menu as the successor to “Contact Us” for the existing optional menu-hiding preference.
  • Avoids redundant mobile-composer refocusing on Better Messages 3.1+, while retaining the SurfCoinsChat compatibility guard on older Better Messages builds.
  • Keeps complete internationalization and updates the bundled pt-BR catalog.

0.7.16

  • Shows that the SurfCoins WebSocket plugin is available as a free download when it is not installed.
  • Adds a direct free-download button plus a separate WebSocket plans button in the administrator notice and settings screen.
  • Keeps the Better Messages WebSocket licensing CTA directed to the SurfCoins WebSocket plans page.
  • Keeps complete internationalization with updated pt-BR catalogs.

0.7.15

  • Redirects only Better Messages’ WebSocket-specific “Get WebSocket license” pricing link to the SurfCoins WebSocket product page.
  • Keeps the replacement isolated to Better Messages administrator screens, opens the product page in a new tab, and reapplies it after dynamic UI remounts without modifying Better Messages files.

0.7.14

  • Fixes Better Messages promotional-menu hiding by running after Freemius registers Upgrade/Pricing, Add-Ons and Contact Us, with a structural fallback for compatible Freemius menu markup.
  • Forces the complete bundled pt-BR catalog for this plugin after locale resolution, preventing a temporarily stale WordPress.org language pack from leaving new administrator strings in English.
  • Uses the WordPress plugin registry to detect SurfCoins WebSocket installation/activation accurately.
  • Replaces the generic Plugins screen link with a direct activation action when SurfCoins WebSocket is installed but inactive, and sends sites without the plugin directly to the SurfCoins WebSocket product page.

0.7.13

  • Adds an administrator introduction and permanent settings card for the optional SurfCoins WebSocket transport, including a direct product/plans link.
  • Detects whether SurfCoins WebSocket is installed, active, licensed and locally configured without adding a remote status request.
  • Adds administrator-selectable Better Messages menu simplification; Upgrade, Add-Ons and Contact Us are hidden by default, while Mobile App remains visible unless selected.
  • Changes the gray transport tooltip from “Fallback mode (REST)” to the clearer “WebSocket inactive”.
  • Adds and compiles pt-BR translations for all new administrator and transport-status strings.

0.7.12

  • Fixes the realtime WebSocket status dot not appearing in the Better Messages mobile account footer.
  • Broadens current-user label detection for mobile layouts without injecting child nodes into React-managed markup.
  • Keeps the CSS-only stable indicator introduced in 0.7.11, avoiding avatar/name flicker.
  • Keeps bundled internationalization and pt-BR labels unchanged.

0.7.11

  • Fixes the mobile/desktop account row flashing together with the WebSocket indicator.
  • Stops injecting a status child inside Better Messages React-managed username markup; the indicator is now rendered with a stable CSS pseudo-element.
  • Removes the reconnect pulse animation so the avatar and account label remain visually stable while connection state changes.
  • Keeps the green/amber/gray transport states and localized pt-BR status tooltip.

0.7.10

  • Loads the bundled translation catalog before SurfCoinsChat localizes runtime JavaScript labels.
  • Fixes the WebSocket transport status tooltip showing in English on pt-BR installations.
  • Keeps the WebSocket indicator behavior unchanged.

0.7.9

  • Fixes the WebSocket status indicator on Better Messages 3.x.
  • Anchors the indicator to SurfCoinsChat’s stable current-user element and keeps legacy Better Messages compatibility.

0.7.8

  • Adds a compact realtime transport indicator beside the signed-in user name.
  • Green indicates an active SurfCoins WebSocket connection, amber indicates reconnecting, and gray indicates REST fallback.
  • The status follows the SurfCoins WebSocket runtime without adding polling or extra network requests.

0.7.7

  • WordPress.org compatibility cleanup: document the external Better Messages thread-created hook at the exact PHPCS token.
  • No functional chat behavior changed.

0.7.6

  • WordPress.org review cleanup: documents intentional realtime database access and Better Messages compatibility hooks for Plugin Check.
  • Shortens the readme short description to the WordPress.org limit.
  • No functional chat behavior changes.

0.7.5

  • Removes the empty Better Messages subject/subtitle row in one-to-one conversations after switching from a group, eliminating the blank line between the contact name and presence status.
  • Preserves genuine non-empty conversation subjects and the group member-count subtitle.

0.7.4

  • Fixed stale group/member and last-seen header information when switching between conversations in Better Messages 3.x.
  • The official thread-opened event now remains authoritative during React navigation transitions, preventing the previous thread id from being reused.
  • Clears SurfCoinsChat-owned header state during thread changes and immediately restores a cached snapshot when available.

0.7.3

  • Fixes formatted group-member spacing, progressive group delivery/read indicators, and named typing indicators in large Chat Rooms.

0.7.2

  • Adds clickable detailed delivery/read status for outgoing group messages, including participant names and receipt timestamps.

0.7.1

  • Uses the Better Messages native participant count as the authoritative total for large group headers.

0.7.0

  • Adds a dedicated group-management panel integrated with Better Messages group conversations.
  • Adds group name/image, participants, moderators, invitations, member search, removal, mute/ban, banned-user recovery, conversation notification mute, system-message preference, and leave-group controls.
  • Preserves the existing SurfCoins WebSocket presence, typing, receipts, mobile keyboard/header behavior, native voice/video messages, and one-to-one calls.

0.6.70

  • Adds native Better Messages 3.x voice recording with waveform, pause/resume, microphone selection, preview and audio trimming.
  • Adds native video messages with camera and microphone selection, live recording, preview/replay and native upload finalization.
  • Provides built-in voice and video integration without requiring the optional Better Messages Voice and Video Messages add-on.
  • Uses the Better Messages native attachment upload pipeline for faster voice and video message delivery.
  • Preserves SurfCoins WebSocket realtime delivery and existing Community chat features.

0.6.67

  • Improves Web Share Target request validation and WordPress coding standards compatibility.
  • Documents operating-system initiated share requests that cannot provide a WordPress nonce.
  • Improves shared-file validation without changing the sharing workflow.

0.6.66

  • Adds Android/PWA Web Share Target support for sharing text, links and images with SurfCoinsChat.
  • Adds a conversation picker for selecting an existing Better Messages conversation or Chat Room.
  • Uses Better Messages native attachment handling for shared images.
  • Supports image previews before choosing a conversation.
  • Improves single-image and multi-image preview layouts on mobile.
  • Prevents shared content from being sent without explicit user confirmation.
  • Improves Better Messages 3.x mobile/full-screen compatibility.
  • Adds internationalization strings for the complete sharing workflow.

0.6.65

  • Adds Android/PWA Web Share Target support for sharing text and links into SurfCoinsChat.
  • Lets the user choose an existing Better Messages conversation or Chat Room before inserting shared content.
  • Shared content is placed in the native composer for review and is never sent automatically.

0.6.64

  • Added real-time online-user avatars to Better Messages Chat Room information panels.
  • Improved Better Messages 3.x active conversation detection and context-panel rendering.
  • Chat Room online presence now uses SurfCoins WebSocket presence without hardcoded room IDs or domains.
  • Improved asset cache invalidation for updated SurfCoinsChat releases.

0.6.52

  • Fixes duplicate online dots on the conversation header and conversation-list avatars.
  • Keeps the real image-anchored overlay only for message-stack avatars where Better Messages uses tall wrappers.

0.6.51

  • Fix: moves the real online dot slightly inward so it overlaps the avatar’s lower-right corner instead of appearing below it.
  • Fix: suppresses the legacy pseudo-element dot whenever the real 0.6.49+ overlay is active, preventing a second/misaligned marker on Better Messages message avatars.

0.6.49

  • Fix: uses a real green online overlay anchored to the actual avatar image, covering Better Messages 3.0.11 desktop/mobile wrappers, message avatars and conversation-list avatars.
  • Fix: reapplies avatar presence after Better Messages React DOM rerenders without waiting for another presence pulse.

0.6.48

  • Shows the SurfCoinsChat online dot consistently on every visible avatar of the online participant, including message-stack avatars rendered on either side by Better Messages.
  • Preserves the existing header, conversation-list and conversation-information presence markers.

0.6.43

  • Defers Web Push network delivery to an immediate one-shot WordPress cron task so remote Push latency does not block chat sends.
  • Shows live percentage progress while a recorded voice message uploads.
  • Preserves synchronous fallback if cron scheduling fails and keeps all Better Messages storage/moderation behavior intact.

0.6.42

  • Turbo voice-message send path with a lean 32 kbps mono recording target to reduce upload size and mobile transfer time.
  • Stores validated voice uploads directly as private WordPress attachments without waiting for unused synchronous media-library metadata generation.
  • Removes the unused synchronous formatted-message rebuild from the voice upload response and lets SurfCoins WebSocket 0.3.2 reconcile the stored message asynchronously.
  • Avoids a competing presence REST request at the exact start of a voice upload while realtime transport is healthy; the previous fallback remains active when WebSocket is unavailable.

0.6.37

  • Renders SurfCoinsWebSocket typing:start/typing:stop events immediately in the active conversation and thread list instead of waiting for the REST safety poll.
  • Keeps a short-lived in-memory WebSocket activity overlay on top of the latest REST presence snapshot so slower reconciliation responses cannot erase a just-received typing state.
  • Restores the previous online/last-seen state immediately after typing stops and falls back to a one-shot REST reconciliation only when no baseline snapshot exists yet.
  • Suppresses redundant REST typing activity writes while the persistent WebSocket transport is connected; REST automatically resumes if the socket disconnects.
  • Adds no new endpoint, database table, background task, or persistent timer beyond a bounded cleanup timeout for lost typing:stop frames.

0.6.36

  • Restores real-time online presence and typing activity with Better Messages 3.0.10 by keeping SurfCoinsChat’s live presence query independent from Better Messages’ durable last-activity lookup.
  • Uses the official Better Messages thread-opened event as an active-thread fallback during React/fullscreen remounts.
  • Restores the green online marker on the current conversation header avatar and improves Better Messages 3.x avatar targeting.
  • Adds a short typing grace window so brief typing bursts are not missed by adaptive polling while keeping the existing low-load synchronization model.
  • Preserves the durable last-seen fallback from 0.6.35 without adding REST routes, database tables, external services, or background tasks.

0.6.35

  • Adds compatibility tuning for Better Messages 3.0.10 while retaining fallbacks for older Better Messages 3.x releases.
  • Stops installing SurfCoinsChat’s legacy Composer draft-race workaround when Better Messages 3.0.8 or newer is active, because Better Messages now fixes that race natively.
  • Keeps the proven bounded one-tap quick-reply emoji safeguard because that programmatic Composer path is separate from Better Messages’ newly fixed phone-keyboard/paste emoji handling.
  • Fixes the one-to-one header status by reusing Better Messages’ visible native online-status line instead of inserting a second line that could be clipped by the compact header.
  • Fixes offline last-seen information by combining SurfCoinsChat’s real-time presence timestamp with Better Messages’ durable last_activity value in batched queries. Real-time “online now” still requires a recent SurfCoinsChat session, so general site activity is not misreported as live chat presence.
  • Adds no new REST endpoint, table, polling loop, external service, or background task.

0.6.34

  • Fixes drag-and-drop reordering in the Quick replies admin screen. jQuery UI Sortable ignores drags that start on button elements by default; the accessible drag handle is now explicitly allowed to start sorting while form controls remain protected.
  • Improves the visual feedback while a row is being reordered and keeps the saved field indexes synchronized with the new order.
  • Removes a duplicated Quick replies page heading. No front-end chat, REST, database, Push, PWA, presence, voice, or call behavior changes.

0.6.33

  • Fixes a fatal error on the Quick replies administration page caused by calling a non-existent hidden() helper after the reply rows were rendered.
  • Uses the native HTML hidden attribute for the empty-state message, preserving the existing admin JavaScript behavior without adding inline scripts or styles.
  • No changes to front-end quick-reply sending, REST routes, database tables, Push, PWA, presence, voice, or calls.

0.6.32

  • Adds SurfCoinsChat > Quick replies so administrators can add, edit, enable/disable, remove, and reorder the one-tap replies.
  • Adds a live admin preview and Restore defaults action while keeping custom replies in one sanitized WordPress option.
  • Adds no new REST endpoint, database table, polling cycle, or front-end background task.

0.6.31

  • Keeps the mobile software keyboard closed when a quick reply is tapped by no longer focusing the Better Messages contenteditable Composer during programmatic insertion.
  • Normalizes emoji presentation selectors when confirming the selected quick reply, fixing the one-tap path for emoji-only suggestions such as 👍 on mobile browsers.
  • Re-signals the native Better Messages input handler during the short bounded send window when a mobile WebView delays contenteditable bookkeeping.
  • Keeps the existing horizontally scrollable quick-reply chips and introduces no REST endpoint, polling cycle, database table, or server-side message path.

0.6.30

  • Fixes one-tap quick-reply sending with Better Messages 3.x by honoring its aria-disabled / data-disabled button state instead of relying only on the native disabled property.
  • Binds quick replies to the Composer immediately adjacent to the visible suggestion strip so a covered fullscreen/background Composer cannot receive the text instead.
  • Makes quick-reply chips non-shrinking, horizontally scrollable pill buttons even when the active Better Messages fullscreen wrapper is outside .bp-messages-wrap.
  • No REST endpoint, database, polling, Push, PWA, presence, voice, or call behavior changes.

0.6.29

  • Fixes quick replies on layouts that expose the legacy Better Messages .bm-send-message control so tapping a suggestion sends it immediately instead of only filling the composer.
  • Keeps the Better Messages 3.x accented composer action path and waits for React to switch safely from microphone/idle state before activating it.
  • Strengthens quick-reply chip styling against theme/button resets, with visible borders, pill-shaped border radius, spacing, and mobile-friendly touch targets.
  • Adds no REST endpoint, polling cycle, database table, or server-side message path.

For releases before 0.6.29, see changelog.txt.