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:
- 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.
- 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_filescapability. - 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.
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
- Install and activate Better Messages.
- Install and activate SurfCoinsChat Community.
- Open the site’s Better Messages chat while signed in.
- Customize quick replies under SurfCoinsChat > Quick replies, if desired.
- Configure optional PWA settings under Settings > SurfCoinsChat PWA & Push.
- 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, andSURFCOINSCHAT_TURN_CREDENTIALinwp-config.php, or use thesurfcoinschat_webrtc_ice_serversfilter.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“SurfCoinsChat Community” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “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.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_activityvalue 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
hiddenattribute 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-disabledbutton state instead of relying only on the nativedisabledproperty. - 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-messagecontrol 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.
