= 0.6.43 =
* Moves standards-based Web Push delivery out of the synchronous Better Messages send hook into an immediate one-shot WP-Cron job, so slow browser push endpoints no longer hold open ordinary text or voice-message sends.
* Nudges WP-Cron through WordPress' normal non-blocking spawn path after queuing; if scheduling is unavailable, falls back to the previous synchronous Push path rather than dropping notifications.
* Adds upload-progress feedback for SurfCoinsChat voice messages while retaining the same authenticated WordPress REST endpoint, file validation, moderation, attachment storage, and WebSocket reconciliation.
* Designed to pair with SurfCoins WebSocket 0.3.3, which publishes `message:new` before slower post-send notification/add-on hooks.

= 0.6.42 =
* Turbo send path for voice messages: records speech at a lean 32 kbps mono target, cutting typical upload size roughly in half versus the previous 64 kbps target while retaining Opus/browser codec selection.
* Replaces the generic synchronous `media_handle_upload()` metadata pipeline with a validated direct WordPress upload + private attachment creation path; voice duration is already supplied by the browser and no longer waits for unused media-library metadata generation.
* Removes an unused synchronous Better Messages `get_messages()` rebuild from the voice-upload response. The new message is reconciled asynchronously through SurfCoins WebSocket 0.3.2 when available, with the former REST/list refresh retained as fallback.
* Avoids launching a competing SurfCoinsChat presence REST pulse at the exact moment a voice upload starts while WebSocket is connected.
* Preserves Better Messages as the message/attachment source of truth and keeps the previous upload validation, moderation checks, message policy filters, and disconnect fallbacks.

= 0.6.41 =
* Performance hotfix for real-time call signaling: bounded/deduplicated pending WebRTC signal processing to prevent UI stalls during ICE bursts.

= 0.6.40 =
* Fixes instant incoming-call delivery over SurfCoins WebSocket: namespaced lifecycle events now preserve the colon in `call:ringing` and `call:state` instead of being converted to `callringing`/`callstate` by `sanitize_key()`.
* The callee call modal can now be opened directly by the persistent WebSocket lifecycle event, while the existing REST call pulse remains available as an automatic fallback.

= 0.6.39 =
* Moves active WebRTC offer/answer/ICE signaling to SurfCoins WebSocket when version 0.3.0+ is connected, with the existing WordPress REST signal endpoint retained automatically as a fallback.
* REST-fallback signals emit a targeted real-time hook so the recipient still receives that offer/answer/ICE frame immediately without re-enabling fast polling.
* Receives incoming call, acceptance, decline, cancellation, hang-up, and signaling events immediately from the persistent transport instead of waiting for the 750 ms call polling loop.
* Disables the fast call REST poll while WebSocket is healthy and restores it immediately on disconnect, reducing WordPress load during voice/video calls without sacrificing recovery.
* Buffers an early WebRTC signal briefly in memory if it arrives before the matching call lifecycle event, preventing offer loss across the two real-time paths.

= 0.6.38 =
* Adds instant SurfCoins WebSocket delivery/read receipt rendering for one-to-one conversations, including immediate ✓/✓✓ state changes without waiting for the REST safety poll.
* Suppresses redundant full REST synchronizations triggered by Better Messages message/thread hooks while the persistent WebSocket transport is healthy.
* Keeps group-chat receipt aggregation on the existing server-side status calculation for correctness across multiple recipients.
* Stops periodic SurfCoinsChat delivery writes while WebSocket is connected; the previous REST path remains armed automatically as a disconnect fallback.
* Adds bounded local rendering of the initial sent check for messages published through the WebSocket event channel.

= 0.6.37 =
* Instant WebSocket typing-state rendering and REST-write suppression while the persistent transport is connected.

= 0.6.36 =
* Restores real-time online presence and typing activity with Better Messages 3.0.10 by isolating SurfCoinsChat presence aggregation from Better Messages durable last-activity lookups.
* Uses Better Messages' official thread-opened event as a robust 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 server-side typing grace window so brief typing bursts are not missed by adaptive polling.
* Keeps the durable last-seen fallback added in 0.6.35 without coupling it to real-time presence queries.

SurfCoinsChat Community - Changelog
===================================

Current WordPress.org candidate: 0.6.40

0.6.35
------
- Adds compatibility tuning for Better Messages 3.0.10 while keeping backwards-compatible fallbacks for older Better Messages 3.x versions.
- Detects the Better Messages runtime version and disables SurfCoinsChat's pre-3.0.8 Composer draft-race workaround when the upstream fix is available, avoiding redundant hidden-Composer DOM/state mutations.
- Keeps the proven bounded quick-reply emoji safeguard because SurfCoinsChat inserts those replies programmatically, a separate path from Better Messages' newly fixed phone-keyboard/paste emoji handling.
- Fixes one-to-one header presence by reusing Better Messages' visible `.bm-thread-header__online` node instead of rendering a second status line that can be clipped by the compact 3.x header.
- Fixes last-seen status after SurfCoinsChat transient presence rows expire by using Better Messages' durable `last_activity` timestamp as an offline fallback. Live "online now" remains based only on SurfCoinsChat's recent per-device presence session.
- Reads Better Messages last-activity data in the same batched participant/list queries, avoiding per-user lookup loops and adding no new polling cycle.
- No new REST endpoint, database table, external service, or background task is introduced.

0.6.34
------
- Fixes Quick replies drag-and-drop reordering by overriding jQuery UI Sortable's default cancellation of drags that begin on `<button>` elements; the accessible drag handle remains a button and now correctly initiates sorting.
- Keeps text fields, checkboxes, selects, and Remove controls excluded from drag initiation, then reindexes submitted field names after the row order changes.
- Adds clearer visual feedback during sorting and removes a duplicated Quick replies administration heading.
- No front-end chat, REST, database, polling, Push, PWA, presence, voice, or call behavior changes.

0.6.33
------
- Fixes the Quick replies admin-page fatal error caused by an invalid `hidden()` helper call after the replies table.
- Uses the standard HTML `hidden` attribute for the empty-state paragraph, matching the existing JavaScript `.prop('hidden', ...)` implementation.
- Preserves all 0.6.32 functionality and introduces no REST, database, polling, Push, PWA, presence, voice, or call changes.

0.6.32
------
- Adds a WordPress administration screen under SurfCoinsChat > Quick replies for site-wide quick-reply customization.
- Administrators can add, edit, remove, enable/disable, and drag replies to change their display order, with a live chip preview.
- Adds a one-click Restore defaults action that returns to the translated replies bundled with the plugin.
- Stores the customized list in a single sanitized WordPress option; no new table, REST endpoint, polling cycle, or front-end background task is added.
- Keeps the existing `surfcoinschat_quick_replies` PHP filter as the final extensibility layer after administrator settings are applied.
- Loads admin JavaScript/CSS only on the SurfCoinsChat quick-replies page and uses WordPress capability, nonce, Settings API, sanitization, and late escaping patterns suitable for WordPress.org review.
- Preserves all 0.6.31 one-tap mobile behavior, including emoji sending without opening the software keyboard.


0.6.31
------
- Keeps the mobile software keyboard closed when a quick reply is tapped by removing programmatic Composer focus from the quick-reply path.
- Normalizes emoji presentation selectors when matching the chosen reply, fixing the one-tap path for emoji-only replies such as 👍.
- Re-signals Better Messages' native input handler during the short bounded send window when a mobile WebView defers contenteditable bookkeeping.
- Preserves the 0.6.30 quick-reply chip layout and all existing REST, database, polling, Push, PWA, presence, voice, and call behavior.


0.6.30
------
- Fixes one-tap quick replies with Better Messages 3.x custom icon buttons by reading `aria-disabled` and `data-disabled` in addition to the native `disabled` property.
- Targets the Composer paired with the visible quick-reply strip, avoiding hidden/background Composer instances kept mounted by fullscreen mode.
- Makes quick-reply choices true non-shrinking pill buttons with horizontal overflow even when the fullscreen wrapper is not nested under `.bp-messages-wrap`.
- No REST, database, polling, Push, PWA, presence, voice, or call behavior changes.



0.6.29
------
- Makes quick replies truly one-tap across Better Messages layouts by supporting both the 3.x accented composer action and the legacy dedicated `.bm-send-message` control.
- Keeps microphone safety on Better Messages 3.x by waiting for React to switch the shared accented action from idle/voice state to send state before clicking it.
- Extends the short one-shot send wait for slower mobile React updates without adding any persistent timer or polling.
- Strengthens quick-reply chip/button presentation against Better Messages/theme resets with explicit rounded borders, background, spacing, and touch-friendly sizing.
- No REST, database, Push, PWA, presence, voice, or call behavior changes.


0.6.28
------
- Adds one-tap quick replies above the active Better Messages composer with mobile horizontal scrolling.
- Default replies are 👍, OK, Sounds good, Thank you!, One moment, I'll check, Perfect, and Agreed; strings remain fully translatable.
- Routes each quick reply through Better Messages' native Composer/send control, preserving its hooks, drafts, moderation, notifications, delivery/read states, and storage.
- Adds no REST endpoint, polling cycle, database table, or background timer for the feature.
- Hides quick replies while the user is typing, editing a message, attaching files, or recording audio.
- Adds the `surfcoinschat_quick_replies` PHP filter for safe site-specific customization.

0.6.27
------
- Addresses WordPress.org review feedback for REST API authorization.
- Requires the standard WordPress `upload_files` capability in the `/wallpaper` POST route permission callback before any file upload is processed.
- Keeps wallpaper removal limited to the signed-in user's own metadata and hides the upload control from users without upload permission.
- Replaces generic login-only callbacks on SurfCoinsChat's own user-scoped REST routes with explicit `read` capability checks while preserving Better Messages' conversation-level authorization for voice messages.
- Adds a defense-in-depth upload capability check plus uploaded-file and sanitized-filename validation in the wallpaper handler.
- Preserves the 0.6.26 Better Messages composer/draft race fix and all prior chat, Push, PWA, presence, voice, and call behavior.

0.6.26
------
- Fixes an intermittent Better Messages 3.x composer/draft race on the dedicated `/chat/` fullscreen view where successfully sent text could reappear in the send form.
- Keeps Better Messages drafts enabled and clears only matching stale copies from the covered background messenger Composer immediately before a real send.
- Dispatches native input/change events to synchronize the hidden React Composer state and cancel its pending draft-save timer without modifying Better Messages core files.
- Excludes mini chats and limits the guard to SurfCoinsChat automatic fullscreen mode.
- No intended changes to message storage, recipients, Push, calls, presence, PWA, or the public REST API.

0.6.25
------
- Removed the manual `load_plugin_textdomain()` registration reported by WordPress Plugin Check.
- Relies on WordPress 4.6+ just-in-time translation loading / WordPress.org language packs for the `surfcoinschat-community` text domain.
- No intended changes to chat, presence, voice messages, calls, Push, PWA, or Better Messages integration.


0.6.24
------
- WordPress.org review compliance pass based on the Plugins Team feedback received for the earlier submission.
- Removed inline JavaScript from the offline fallback and offline shortcode output; retry now uses ordinary links instead of inline event handlers.
- Removed inline CSS from the self-contained Service Worker fallback document so the plugin no longer emits style/script blocks from PHP-generated offline markup.
- Switched manifest and Service Worker configuration JSON to the default `wp_json_encode()` escaping behavior, avoiding `JSON_UNESCAPED_SLASHES` in output contexts.
- Consolidated Service Worker app name/icon values into the encoded configuration object, reducing dynamic PHP output inside generated JavaScript.
- Added explicit escaping to remaining generated status output touched by this review.
- Preserves the 0.6.23 chat behavior and all 0.6.22 performance/presence optimizations.


0.6.23
------
- Anchors the Better Messages 3.x conversation-list online indicator to the actual avatar wrapper instead of the row-height avatar column.
- Moves the green online dot into a tighter lower-right overlap with the avatar, eliminating the visible vertical gap on rows with subject/preview text.
- Keeps presence logic unchanged and limits the adjustment to presentation, preserving the 0.6.22 adaptive synchronization and multi-device presence architecture.

0.6.22
------
- Replaced SurfCoinsChat's fixed one-second REST heartbeat with adaptive/event-driven synchronization: 3.5 s foreground baseline, 12 s hidden-page baseline, lightweight 1.6 s activity updates, and 750 ms signaling only while a call is active.
- Added Better Messages 3.x runtime hooks for thread opening, received/stored messages, and unread-state changes so SurfCoinsChat state refreshes immediately after meaningful chat events.
- Added BroadcastChannel/localStorage tab coordination so one browser leader performs SurfCoinsChat REST synchronization and shares responses with follower tabs when the browser supports it.
- Added per-browser-session presence, preventing the same account on phone/desktop/separate browsers from overwriting one shared presence row.
- Split the pulse endpoint into full, presence-only, and call-only modes so typing and WebRTC signaling avoid unnecessary conversation-list/status queries.
- Stopped rewriting Better Messages delivery timestamps on every heartbeat; delivery writes now occur only when the browser has a reason to refresh them.
- Consolidated SurfCoinsChat's repeated document-wide DOM observation into one filtered, requestAnimationFrame-batched observer and pause it while the page is hidden.
- Added exponential REST retry backoff, request timeout handling, and Safari/iOS bfcache restoration without closing the shared browser channel.
- Preserves 0.6.21 Push settings, PWA cache fixes, internationalization, voice messages, WebRTC calls, and Better Messages 3.0.6 compatibility.

0.6.21
------
- Explicitly loads the `surfcoinschat-community` text domain from the bundled `/languages` directory on WordPress `init`.
- Keeps translation loading late enough to avoid early gettext-loading warnings on newer WordPress versions.
- Preserves all 0.6.20 Better Messages 3.0.6 settings integration, iOS/PWA handling, Web Push, calls, voice, presence, and cache behavior.

0.6.20
------
- Integrates SurfCoinsChat Web Push directly into Better Messages 3.0.6 Settings > Notifications.
- Uses a device-specific checkbox whose state reflects the real PushManager subscription instead of a global WordPress preference.
- Requests notification permission only from the user interaction that enables the setting and supports disabling/unsubscribing from the same control.
- Adds iPhone/iPad guidance when Web Push is opened outside an installed Home Screen web app and reports blocked/unsupported states in place.
- Declares SurfCoinsChat as the third-party push provider so Better Messages does not expose a competing browser-push control.
- Removes the old floating push opt-in button while preserving the existing VAPID, REST subscription, Service Worker and message-delivery infrastructure.

0.6.19
------
- Hardens the iOS/WebKit conversation-opening path against DOM-observer bursts during Better Messages 3.0.6 React transitions.
- Defers voice-preview cleanup from MutationObserver callbacks and batches it with the existing animation-frame synchronization.
- Coalesces voice-button and wallpaper DOM synchronization so repeated React mutations schedule at most one update per frame.
- Updates the text-send guard for the Better Messages 3.0.6 composer while retaining the legacy Better Messages selector fallback.
- Changes PWA JavaScript/CSS handling to network-first revalidation with cached offline fallback.
- Precaches PWA CSS/JavaScript using the same versioned URLs emitted by WordPress.
- Preserves the 0.6.18 New conversation/iOS fix and existing Android, desktop, fullscreen, deep-link, voice, calls, presence and Web Push behavior.

0.6.18
------
- Fixes an iOS/WebKit conversation-list freeze introduced by the 0.6.17 inbox enhancement.
- Prevents the New conversation label from rewriting its own DOM on every MutationObserver pass.
- Batches Better Messages DOM synchronization to one animation frame during thread transitions.
- Avoids :scope selectors in the New conversation inbox insertion path for broader WebKit compatibility.
- Keeps Android, desktop, fullscreen, OS deep-link, voice, calls, presence, PWA, and Web Push behavior unchanged.

0.6.17
------
- Added a visible New conversation button to Better Messages inboxes on desktop and mobile.
- Uses only the native #/new-conversation route.
- Preserves the validated 0.6.16 OS deep-link behavior.

0.6.16
------
- Rebuilt OS/work-order compose deep-link support from the clean 0.6.13 base.
- Captures compose parameters before Better Messages clears them and restores them only for the native fullscreen mount.
- Desktop/mobile fullscreen behavior otherwise remains on the validated stable path.

0.6.13
------
- Fixed two Plugin Check MissingTranslatorsComment errors.
- Sanitized REQUEST_URI before parsing to resolve InputNotSanitized warning.
- No intended runtime behavior changes.

0.6.12
------
- WordPress.org packaging/compliance pass based on stable 0.6.11.4.
- Plugin folder and gettext text domain aligned with the assigned slug: surfcoinschat-community.
- WordPress.org readme reduced below 10 KB; historical changes moved to this file.
- External-service disclosure clarified for Google STUN, optional TURN, and browser push endpoints.
- Runtime chat behavior from 0.6.11.4 is preserved.

Previous releases
-----------------

= 0.6.11.4 =
* Fixes a grey, click-blocking layer that can appear above Better Messages 3.x automatic fullscreen on some themes/domains.
* Extends the existing legacy fullscreen stacking workaround to Better Messages 3.x native fullscreen roots, including `#bm-full-screen-wrap`.
* Keeps Better Messages menus, modals, emoji popovers, lightbox, tooltips and toasts above the raised fullscreen messenger.
* Preserves the 0.6.11.3 automatic fullscreen behavior and the stable 0.6.11 feature set.


= 0.6.11.3 =
* Restores automatic full-screen opening on the dedicated /chat/ page with Better Messages 3.x.
* Uses Better Messages' own native `window.__BM_FULLSCREEN.openMessenger()` API instead of creating a separate full-screen implementation.
* Keeps the previous Better Messages maximize-button fallback for older versions.
* Adds a short initialization retry so full screen opens even when Better Messages finishes loading after SurfCoinsChat.
* Preserves the stable 0.6.11.2 base, including the mobile "Tap to access your conversations" text fix.


= 0.6.11.2 =
* Changes Better Messages' embedded mobile label to "Tap to access your conversations".
* Loads only a tiny text helper outside the dedicated /chat/ page; the stable 0.6.11 chat integration remains unchanged.
* Targets the confirmed Better Messages element `.bm-mobile-tap.bm-tap-to-open > span`.
* Adds a MutationObserver so the label is reapplied if Better Messages mounts or rerenders the embedded chat.


= 0.6.11 =
* Fixes SurfCoinsChat read-receipt crowding using Better Messages 3.0's native spacer/overlay metadata model.
* Mirrors the read-receipt width into BM3's hidden metadata spacer so checks and timestamps no longer overlap message text.
* Places SurfCoinsChat ✓/✓✓ immediately before the native timestamp.
* Keeps the readable 16px chat typography and all validated 0.6.8 functionality.


= 0.6.9 =
* Improves Better Messages 3.0 read/delivery status alignment beside message metadata.
* Increases chat message and composer text to a comfortable 16px baseline.
* Preserves all validated 0.6.8 behavior.


= 0.6.8 =
* Uses the exact Better Messages 3.0 .bm-context-panel__presence element to show SurfCoinsChat presence below the conversation subject in the right information panel.
* Restores “Digitando...” in the active Better Messages 3.0 conversation-list preview using .bm-thread-row-preview and .bm-thread-row-preview__typing.
* Does not destructively replace Better Messages React preview markup; normal preview is restored when typing ends.
* Built from the validated 0.6.5 base, preserving microphone, wallpaper, header/bottom typing and online-avatar behavior.


= 0.6.5 =
* Restores the animated lower “Digitando...” indicator above the Better Messages 3.0 composer.
* Fixes duplicate chat wallpaper rendering by applying it to one BM3 message surface only.
* Centers the wallpaper with cover/no-repeat behavior.
* Preserves the validated microphone and online/avatar presence fixes.


= 0.6.4 =
* Restores online avatar dots with the exact Better Messages 3.0 avatar wrappers.
* Reads Better Messages 3.0 native data-thread-id values for conversation-list presence and online counts.
* Preserves the validated 0.6.3 mobile microphone/composer fix.


= 0.6.3 =
* Fixes the Better Messages 3.0 mobile composer disappearing after tapping audio.
* Removes unsafe CSS that hid Better Messages composer wrapper elements.
* Preserves the 0.6.2 presence integration.


= 0.6.2 =
* Uses the exact Better Messages 3.0 header body/subtitle/online DOM for SurfCoinsChat presence.
* Restores Online/Offline/last-seen display beside the profile identity area.
* Makes the SurfCoinsChat voice recorder own the full Better Messages 3.0 mobile composer while recording/previewing, preventing squeezed controls.


= 0.6.1 =
* Restores SurfCoinsChat Online/Offline and last-seen presence below the conversation title in the redesigned Better Messages 3.0 header.
* Keeps group participant text and typing/recording/uploading activity states.
* Retains all Better Messages 3.0 compatibility work introduced in 0.6.0.


= 0.6.0 =
* Compatibility review for Better Messages 3.0.0, whose messenger DOM was redesigned from bpbm-/bp-messages- classes to bm-* components.
* Updates active-thread detection, conversation-list detection and message-id collection for the Better Messages 3.0 DOM while retaining 2.x fallbacks.
* Adapts voice-message controls to the new composer without removing SurfCoinsChat's Community voice workflow.
* Adapts delivery/read status placement to the new bm-msg-meta timestamp area and preserves the green Read state.
* Adapts per-user chat backgrounds to the new message scrolling surfaces.
* Adapts fullscreen close handling, context-menu/emoji/lightbox layering and SurfCoinsChat call UI to Better Messages 3.0 fullscreen classes.
* Preserves voice calls, video calls, presence, typing/activity, link-preview images, PWA/Web Push, Android status-bar isolation and iOS close behavior.
* Keeps WordPress internationalization files and WordPress.org dependency metadata intact.


= 0.5.34 =
* Adds one-to-one WebRTC video calls alongside the existing voice calls.
* Adds a video-call action to the conversation header with camera and microphone permission requested only when a call is started or answered.
* Adds remote video, local picture-in-picture preview, microphone mute, camera on/off, camera switching, and end-call controls.
* Video calls reuse the existing SurfCoinsChat signaling, STUN/TURN configuration, call lifecycle, and Better Messages history integration.
* Adds internationalized video-call interface and history strings.

= 0.5.33 =
* Fixes the dedicated chat close action on iOS/Safari and WebKit-based views.
* Consumes the complete touch/click gesture before Better Messages can unmount the conversation.
* Uses a direct top-level navigation to the configured SurfCoinsChat close URL.
* Preserves the existing Android and desktop close destination and all 0.5.32 features.

= 0.5.32 =
* Adds a per-user custom chat background image.
* Adds a translated Chat background action to the Better Messages conversation header.
* Supports JPG, PNG, GIF, and WebP backgrounds up to 5 MB.
* The selected background is private to the signed-in user's interface and does not change the other participant's chat.
* Adds WordPress internationalization strings and updated POT, pt_BR PO/MO, and pt_BR PHP translation catalog.


= 0.5.31 =
* Added a reliable, branded offline experience that is precached by the Service Worker and includes a self-contained fallback when CacheStorage is unavailable.
* The offline screen now refreshes automatically when the connection returns.

= 0.5.30 =
* Displays Better Messages' already-cached link preview image (`og:image`, `twitter:image`, or thumbnail) in the native nice-link card.
* Reuses Better Messages metadata and does not perform additional remote requests.
* Keeps the native link, title and site information intact and avoids duplicate images if Better Messages adds one itself.
* Preserves all 0.5.29 chat, group, voice, PWA and internationalization behavior.


= 0.5.29 =
* Uses WordPress plural internationalization for group participant counts.
* Adds `%d participant` / `%d participants` through `_n()` so translation tools and WordPress.org GlotPress can translate the string correctly.
* The REST response now supplies the localized participant label according to the site's language and plural rules.
* Updates the POT and bundled pt_BR PO/MO files.
* Preserves the 0.5.28 group detection behavior.


= 0.5.28 =
* Group detection now uses Better Messages' real thread type and total participant count.
* Group headers show total participants instead of Online/Offline.
* One-to-one conversations keep the existing presence behavior.


= 0.5.27 =
* Group conversations now show the participant count in the header instead of an Online/Offline presence label.
* One-to-one conversations keep the existing presence behavior.
* No other chat behavior was changed.


= 0.5.26 =
* Makes the voice/microphone button visibility independent from theme/domain-specific Better Messages rendering.
* The microphone is hidden whenever the real Better Messages composer contains text.
* Adds robust input/keyup/change/paste/cut and DOM-refresh synchronization.
* Preserves the 0.5.25 accidental-audio protection after sending text.


= 0.5.25 =
* Prevents accidental voice recording immediately after sending a text message on touch devices.
* Adds a short post-send guard so the residual mobile click cannot hit the microphone after the Send button disappears.
* Deliberate microphone taps continue to work normally after the guard interval.
* No voice recording, message sending, attachment, PWA or Web Push behavior was otherwise changed.


= 0.5.24 =
* Fixes the Better Messages image lightbox remaining visible/interfering after sending a new message.
* Removes forced visibility and forced fullscreen geometry from the FsLightbox container.
* Keeps only the required z-index elevation while SurfCoinsChat automatic fullscreen is active.
* Preserves the attachment picker fix and all previous chat behavior.


= 0.5.23 =
* Fixes Better Messages image preview in SurfCoinsChat fullscreen using the exact FsLightbox container `.bm-lightbox-container`.
* The native image viewer is appended directly to `document.body` and is now placed above the fullscreen chat.
* Preserves the attachment picker fix and all previous chat behavior.


= 0.5.22 =
* Fixes sent-image preview/lightbox being hidden behind SurfCoinsChat fullscreen.
* Lifts Better Messages / PhotoSwipe image-viewer layers above the fullscreen chat.
* Preserves the 0.5.21 attachment-file-picker fix and all previous chat behavior.


= 0.5.21 =
* Fixes Better Messages' attachment/file picker being hidden behind SurfCoinsChat fullscreen.
* Lifts the native Uppy attachment dashboard, overlay and inner window above the fullscreen chat.
* Keeps the native clip button and Better Messages upload flow unchanged.
* Preserves all existing quote, read-status, voice, PWA and Web Push behavior.


= 0.5.20 =
* Changes the seen/read message status (`is-seen`) to green beside the timestamp.
* Preserves the 0.5.19 status positioning next to Better Messages' native message time.
* Preserves the quoted-author profile-link protection from 0.5.18.
* No other chat behavior was changed.


= 0.5.19 =
* Moves SurfCoinsChat delivery/read status beside Better Messages' native message timestamp.
* Removes the status marker from Better Messages' message-controls area.
* Preserves the 0.5.18 quoted-author profile-link protection.
* Does not change Reply/More controls, message geometry, voice, PWA or Web Push.


= 0.5.18 =
* Prevents the quoted/replied message author name from opening the user profile.
* Keeps the author name visible and preserves Better Messages' native quoted-message behavior.
* Regular links inside messages remain clickable.
* No other chat behavior was changed.


= 0.5.17 =
* Fixed the final WordPress internationalization error reported by Plugin Check.
* Added the missing `translators:` comment for the remaining PWA string with a placeholder.
* No runtime behavior was changed.


= 0.5.16 =
* Fixed the six WordPress internationalization errors reported by Plugin Check.
* Added required `translators:` comments for all PWA strings containing placeholders.
* Ordered the two icon-size placeholders as `%1$d` and `%2$d`.
* No chat, voice, PWA runtime, Web Push or interface behavior was changed.


= 0.5.15 =
* Fixes voice-message previews in the conversation list using the actual latest message stored by Better Messages.
* The pulse response now identifies threads whose latest message is the SurfCoinsChat voice marker.
* Only those confirmed threads have the generic “1 Anexo” / “1 attachment” label replaced by “Mensagem de voz” / “Voice message”.


= 0.5.14 =
* Fixed the conversation-list preview for SurfCoinsChat voice messages.
* Preserves Better Messages' exact native `<!-- BPBM-VOICE-MESSAGE -->` marker outside the message stack so its React list renderer displays “Voice message” / “Mensagem de voz” instead of the generic attachment counter.
* Voice playback, recording and the 0.5.12 microphone toggle remain unchanged.


= 0.5.13 =
* Voice recordings now use Better Messages' native voice-message marker, so conversation previews show “Voice message” instead of “1 attachment”.
* Existing SurfCoinsChat voice metadata and native attachment playback are preserved.
* Backward compatibility with older SurfCoinsChat voice markers is retained.


= 0.5.12 =
* The SurfCoinsChat voice-record button now follows Better Messages composer behavior.
* When the user types a message, the idle SurfCoinsChat microphone is hidden so the normal send button remains the primary action.
* When the editor becomes empty again, the SurfCoinsChat microphone returns automatically.
* Active recording, preview and upload states remain unchanged.


= 0.5.11 =
* Hardened PWA/Service Worker Cache Storage handling for Android/PWA lifecycle changes.
* Cache open, match, put, list and delete operations are now best-effort and cannot reject install, activate or fetch events when browser storage is closed.
* Network delivery remains authoritative; cache failures are isolated and no longer propagate through `respondWith()`.
* Chat UI, emoji picker, X/close behavior, calls and messaging logic are unchanged.


= 0.5.10 =
* Built directly from the user-provided 0.5.9 plugin.
* Fixed the Better Messages emoji picker being hidden behind SurfCoinsChat fullscreen.
* Existing JavaScript behavior, including the X/close redirect, remains unchanged.


= 0.5.9 =
* Built directly from version 0.5.8.
* Fixed the Better Messages mobile header X (`.mobileClose`) on the dedicated Chat page.
* The mobile close action now redirects to the configured SurfCoinsChat close URL instead of leaving the page blank.
* No other 0.5.8 behavior was changed.


= 0.5.8 =
* Fixed the fullscreen close interception to target Better Messages' actual `.bm-close` control regardless of its React DOM position.
* Close is captured before Better Messages on pointer, touch, and click events, preventing the React root from being removed and leaving a blank page.
* The dedicated Chat fullscreen close now redirects to the configured SurfCoinsChat close URL.


= 0.5.7 =
* Fixed the fullscreen close (X) button leaving a blank page on the dedicated Chat page.
* The close button now returns to the site home URL instead of allowing Better Messages to unmount and remove its React root.
* Added the `surfcoinschat_close_url` filter so site owners can customize the close destination.


= 0.5.6 =
* Moved the SurfCoinsChat voice-call action immediately before the Better Messages three-dot menu.
* Replaced the filled phone glyph with a cleaner outline phone icon.
* Improved the Better Messages conversation options dropdown on mobile with a compact viewport-safe width, smaller typography, aligned icons, rounded corners, shadow, and internal scrolling.


= 0.5.5 =
* Push notification opt-in is now available across the entire front end for signed-in users, not only on the Chat page.
* The opt-in control is compact and non-intrusive, with an icon-only presentation on small screens.
* The control still disappears automatically when a valid browser push subscription already exists.


= 0.5.4 =
* Fixed Service Worker fetch handling that could reject a request without returning a valid Response.
* The manifest and Service Worker URLs now bypass the Service Worker cache and always reach WordPress directly.
* Added guaranteed offline navigation responses so fetch handlers never resolve to undefined.
* Static asset failures no longer abort Service Worker installation.
* Added explicit no-store/no-cache headers for the dynamic manifest and Service Worker responses.


= 0.5.3 =
* Added full per-site PWA manifest customization in WordPress settings.
* New installations use the current WordPress site name, tagline, and home URL instead of SurfCoins-specific defaults.
* Added Media Library selectors for standard 192/512 icons and maskable 192/512 icons.
* Added display mode, orientation, install-button position, and icon previews to the PWA settings screen.
* PWA install and offline messages now use the configured application name.
* Existing SurfCoins PWA settings remain preserved during upgrades.


= 0.5.2 =
* Fixed Better Messages recipient extraction for Web Push delivery.
* Removed the presence-based suppression that could prevent mobile background notifications.
* Removed the persistent "Notifications enabled" overlay.
* Notification opt-in is now shown only on the Chat page and disappears after subscription.
* Improved mobile positioning so notification controls do not cover the message composer.


= 0.5.1 =
* Fixed a fatal error during automatic upgrade by deferring PWA rewrite registration and rewrite flushing until WordPress `init`.
* Preserved the `/surfcoins-sw.js` and manifest migration strategy from version 0.5.0.


= 0.5.0 =
* Integrated PWA manifest, install UI and existing Service Worker path into SurfCoinsChat.
* Added opt-in standards-based Web Push notifications for new messages.
* Added automatic VAPID key generation and local push subscription management.
* Added PWA & Push settings and diagnostics screen.
* Added migration compatibility with settings from the former SurfCoins PWA plugin.
= 0.4.3 =
* Removes the discouraged manual text-domain loading call; WordPress.org-hosted translations are loaded automatically by WordPress.
* Keeps the bundled Brazilian Portuguese translation files for distribution and development.
* Adds a dedicated External services disclosure for the default Google STUN endpoints and optional administrator-configured TURN relay.
* Updates the WordPress.org release metadata for the 0.4.3 publication candidate.

= 0.4.2 =
* Uses the native browser dialog top layer for the voice-call window so it stays visible above Better Messages desktop full-screen mode.
* Adds localized voice-call lifecycle entries to Better Messages conversation history.
* Records accepted, declined, missed, cancelled, and ended calls, including duration for completed calls.



= 0.4.1 =
* Completes internationalization for SurfCoinsChat Community, including one-to-one voice-call UI and error messages.
* Adds and refreshes the bundled Brazilian Portuguese (pt_BR) translation catalog.
* Adds bundled Brazilian Portuguese translation files for manual/non-WordPress.org installations.
* Removes locale-specific hardcoded UI text in favor of WordPress gettext translations.

= 0.4.0 =
* Adds one-to-one browser voice calls using WebRTC.
* Adds a phone action to individual conversation headers.
* Adds incoming-call, answer, decline, mute/unmute, timer, and hang-up controls.
* Reuses the existing one-second SurfCoinsChat pulse for WebRTC signaling; call audio itself does not pass through WordPress.
* Uses Google STUN by default and supports an optional TURN relay through wp-config.php constants or the `surfcoinschat_webrtc_ice_servers` filter.
* Stores only temporary call/signaling metadata and does not record call audio.

= 0.3.14 =
* Fix: voice-recording signature validation now reads uploaded files through the WordPress Filesystem API.
* Removes direct `fopen()`, `fread()`, and `fclose()` calls reported by Plugin Check without weakening the existing audio-container validation.
* No changes to voice-message behavior, presence, typing, full-screen mode, or message-status features.

= 0.3.13 =
* Fix: the Better Messages modal container now sits above SurfCoinsChat automatic full-screen mode.
* Fixes the Message Reactions information window being hidden behind the expanded chat while preserving the reaction click itself and the existing theme-overlay compatibility fix.

= 0.3.11 =
* Fix: Better Messages reaction/details modal and related native popovers now render above SurfCoinsChat automatic full-screen mode.
* Keeps the 0.3.9 fullscreen overlay compatibility fix without changing unrelated theme modals.

= 0.3.10 =
* Fixes the conversations-list typing label on Portuguese sites so it consistently displays `Digitando...`.
* Reuses the existing typing activity state and does not add polling or database queries.
* No changes to voice messages, presence, full-screen mode, or delivery/read states.

= 0.3.9 =
* Fixed automatic full-screen stacking on `/chat/` for themes that place a translucent overlay above Better Messages.
* Keeps the maximized Better Messages interface above theme backdrops without removing or disabling unrelated modal elements.
* No changes to chat polling, presence, voice messages, or message delivery states.

= 0.3.8 =
* Fixed automatic desktop expansion on `/chat/` by invoking Better Messages' own maximize control after its React interface is mounted.
* The maximize action runs only once per page load and does not add another polling loop.

= 0.3.7 =
* Opens the main Better Messages inbox automatically in its native full-screen mode when the site `/chat/` page is loaded.
* Uses Better Messages’ own `data-full-screen` initialization instead of simulated clicks or browser Fullscreen API calls.
* Keeps the built-in maximize/minimize control available so the user can leave the expanded view.

= 0.3.6 =
* Fixes false rejection of valid browser voice recordings when PHP/fileinfo reports a generic or unexpected MIME type.
* Adds container-signature validation for WebM, OGG, M4A/MP4, and MP3 MediaRecorder uploads without weakening extension restrictions.

= 0.3.5 =
* Adds the typing indicator to the conversations list while the other participant is actively typing.

= 0.3.4 =
* Keeps the voice recording and preview controls inside the desktop composer.
* Replaces browser audio fallback text in conversation previews with a concise Voice message label.

= 0.3.3 =
* Fixed duplicate rendering of voice messages by relying on the native Better Messages attachment player inside conversation bubbles.

= 0.3.2 =
* Improved the mobile voice recorder with a dedicated composer row to prevent overlapping controls while recording and previewing audio.

= 0.3.1 =
* Fixed mobile composer layout so the voice-record button remains fully inside the viewport.
* Voice recording and preview controls now expand above the composer on narrow screens.


= 0.3.0 =
* Added browser voice-message recording through the official Better Messages send-button UI filter.
* Added microphone permission handling, recording timer, stop/cancel controls, audio preview, and explicit send action.
* Added a protected REST endpoint that validates conversation reply permission before accepting a recording.
* Stores sent recordings as Better Messages-associated WordPress media attachments.
* Added native in-conversation audio playback for sent and received SurfCoinsChat voice messages.
* Uses the existing SurfCoinsChat recording/uploading presence states while audio is being recorded or sent.

= 0.2.7 =
* Adds the online presence dot to avatars in the conversations list for one-to-one chats.
* Reuses the existing list-status queries and polling cycle.

= 0.2.6 =
* Fix the online presence dot on avatars inside the conversation by targeting Better Messages message stacks (`.bm-messages-stack .bm-pic`) instead of individual message nodes.

= 0.2.5 =
* Added the online presence dot to participant avatars shown beside incoming messages in one-to-one conversations.
* Reuses the existing presence pulse without additional database queries or polling.

= 0.2.4 =
* Added a small online-presence dot to the user avatar in one-to-one conversations and Conversation Information.
* Reuses the existing presence response and adds no extra polling or database queries.

= 0.2.3 =
* Documents the intentional removal of the plugin-owned presence table during uninstall for Plugin Check/PHPCS.
* No functional chat behavior changes.

= 0.2.2 =
* Requires WordPress 6.2 or later so prepared SQL identifier placeholders are officially supported.
* Keeps prepared SQL directly at the database call sites so Plugin Check can verify preparation.
* Documents the few dynamic placeholder lists used for safe integer IN clauses.
* No functional chat behavior changes.

= 0.2.1 =
* WordPress.org Plugin Check compatibility improvements.
* Added translator comments for placeholder strings.
* Uses prepared identifier placeholders for custom and Better Messages table names.
* Added narrowly scoped PHPCS explanations for intentional real-time database access.
* Removed the obsolete manual translation loader for WordPress.org-hosted translations.

= 0.2.0 =
* Renamed the public edition to SurfCoinsChat Community.
* Prepared plugin metadata and readme for a WordPress.org submission candidate.
* Declared Better Messages (`bp-better-messages`) as a plugin dependency.
* Added an administrator dependency notice as a compatibility fallback.
* Added WordPress privacy-policy suggested text.
* Added WordPress personal-data exporter and eraser integration for presence data.
* Removes a user's presence record when that WordPress user is deleted.
* Added clean uninstall of the SurfCoinsChat presence table.
* Preserves the functionality and safe Better Messages integration validated in SurfCoinsChat 0.1.8-beta.

= 0.1.8-beta =
* Kept conversation-information presence on its own line below the username on mobile layouts.
* Preserved the pseudo-element implementation without rewriting Better Messages React-managed DOM.

= 0.1.7-beta =
* Added relative presence in the conversation header and Conversation Information.
* Added animated typing, recording, and uploading activity indicators.
* Added reduced-motion accessibility handling.

= 0.1.4-beta =
* Stable base for presence, chat activity, and outgoing message delivery/read states.
* Added outgoing status to the conversations list.

== Upgrade Notice ==

= 0.3.0 =
Adds browser voice-message recording and playback. Microphone permission is requested only after the user presses the record button.

= 0.2.6 =
* Fix the online presence dot on avatars inside the conversation by targeting Better Messages message stacks (`.bm-messages-stack .bm-pic`) instead of individual message nodes.

= 0.2.5 =
* Added the online presence dot to participant avatars shown beside incoming messages in one-to-one conversations.
* Reuses the existing presence pulse without additional database queries or polling.

= 0.2.4 =
* Added a small online-presence dot to the user avatar in one-to-one conversations and Conversation Information.
* Reuses the existing presence response and adds no extra polling or database queries.

= 0.2.3 =
Plugin Check cleanup only; no chat behavior changes.

= 0.2.2 =
Compatibility release for WordPress.org Plugin Check; no chat behavior changes.

= 0.2.0 =
Community release candidate based on the validated 0.1.8-beta functionality, with WordPress.org-oriented metadata and privacy handling.
