Commit Graph

21 Commits

Author SHA1 Message Date
885adda156 Echo Public Channel Messages
Add a feature where recent public channel messages can be echoed back to
newly joining users when they enter the chat room.

* Configure in settings.toml with EchoMessagesOnJoin. 0 = disable storage.
* Messages are stored in RAM and lost on a server reboot.
* A buffer of recent public messages per channel can be kept, e.g. for the
  10 most recent messages.
* The settings can be reloaded with /reconfigure and the message buffers
  will rebalance on the next message sent.
* When a new user logs in, a new "echo" message is sent that contains all
  of the echoed messages on a "messages" list, in one WebSocket packet.
* Echoed messages are put above the ChatServer welcome messages.
* If a message is taken back, it's removed from the echo message buffer.

Other Changes

* Don't broadcast Presence messages within 30 seconds of the server boot, to
  lessen a flood of messages when a lot of users were connected at reboot.
* Change the default "Join messages" setting on front-end to hide them in
  public channels.
* For the admin buttons in ProfileModal, use the AlertModal instead of native
  browser prompts.
2025-02-17 22:08:25 -08:00
e954799fc4 Bugfix on iPad display + Working Out status
* Fix a bug on iPads in landscape mode where the screen width is 1024px.
  Previously, they would fall into a weird mode in between mobile and
  desktop, where the chat panels are mobile-style (one panel instead of
  three) but the navigation buttons normally shown on mobile were not
  appearing, making the app impossible to navigate.
* Add a Working Out status option.
2025-02-06 04:43:48 +00:00
f802de88ce Watermark QR code over webcam feeds to deter screen recording 2024-10-02 20:33:57 -07:00
3a7204178c Various fixes regarding red cameras
* When an admin has marked your camera 'red' for you, the Explicit button at the
  top of the page now will require *two* clicks if the user wants to set their
  camera back to blue:

  On first click, they will get a red ChatClient message explaining that their
  cam was most-recently marked red due to a server action (such as a moderator
  flagging their cam for them). If they really mean to mark their camera blue,
  they are instructed to click it a second time to confirm.
* This behavior only occurs when the most recent NSFW setting was dictated by
  the server (e.g. a 'me' event disagreed with the page's local NSFW setting).
  The flag is cleared any time the user themself toggles the flag, or when the
  first ChatClient warning after a server event is shown.
* The explicit camera settings in the broadcast modal have been rearranged and
  reworded.
* Add an 'advanced' webcam feature to automatically broadcast in the future on
  page load. The option is only available in the Chat Settings 'Camera' tab
  after you are already broadcasting (or rather: when a list of video devices
  have become available to the page, indicating the user has possibly granted
  permission already).
2024-09-21 15:48:47 -07:00
4c9d207b62 Sound effect for public channel @mentions 2024-06-19 13:20:19 -07:00
9c77bdb62e New Op commands and fixes with blocking admin users
Add moderation rules:

* You can apply rules in the settings.toml to enforce moderator restrictions on
  certain users, e.g. to force their camera to always be NSFW or bar them from
  sharing their webcam at all anymore.

Chat UI improvements around users blocking admin accounts:

* When a main website block is in place, the DMs button in the Who List shows
  as greyed out with a cross through, as if that user had closed their DMs.
* Admin users are always able to watch the camera of people who have blocked
  them. The broadcaster is not notified about the watch.

New operator commands:

* /cut username: to tell a user to turn off their webcam.
* /unmute-all: to lift all mutes on your side, e.g. so your moderator chatbot
  can still see public messages from users who have blocked it.
* /help-advanced: moved the more dangerous admin command documentation here.

Miscellaneous fixes:

* The admin commands now tolerate an @ prefix in front of usernames.
* The /nsfw command won't fire unless the user's camera is actually active and
  not marked as explicit.
2024-05-17 17:15:48 -07:00
f36c83dbcc Add receive-only transceivers to remove Apple compat mode
* WebRTC functionality is now 100% working as intended for Safari and
  iPad browsers!
* The legacy WebRTC API had properties like offerToReceiveVideo
  available on createOffer(), to set up a receive-only channel, but the
  modern WebRTC API had removed these and Safari only supports the
  modern API.
* The modern solution for the same feature is to add a recvonly
  transceiver to the connection in place of offering a local video/audio
  stream to share.
2024-05-08 12:44:15 -07:00
f094213a34 Improve WebRTC connection for Safari browsers 2024-05-07 20:54:13 -07:00
92a376786d Update to Bulma CSS 1.0
* Update the CSS and add a theme selector to the Chat Settings to force a
  light or dark mode theme (default is automatic).
2024-04-06 14:35:52 -07:00
8e87c377e8 Apple compatibility mode for WebRTC
* Try a new strategy to get Apple (iPad/iPhone) webcams to connect.
* "Apple compatibility mode" setting: on by default if iPad/iPhone is
  detected or can be opted into in the chat settings Misc tab.
* In Apple compat mode: when you open someone else's webcam, you always
  attach your local video on the WebRTC offer. This would normally make
  your video auto-open on the remote side, but the previous commit
  updates the chat page to ignore offered video if you did not opt-in to
  auto-open your viewer's camera.
* This should satisfy the two-way video call limitation in Safari: the
  iPad always shares its video and gets video from the person they are
  watching.
* If the person they are watching did not auto-open your video: they
  ignore the attached video on your offer and don't display it.
2024-01-11 20:33:57 -08:00
bf59a7b6c9 Auto-mute other users' webcam sound channels 2024-01-11 19:45:32 -08:00
27380ec558 Status Message overhaul 2023-12-30 14:50:52 -08:00
0e0aac991d Polling API for the chat room 2023-12-10 18:43:18 -08:00
d57d41ea3a Abstract WebSocket client into library 2023-12-10 16:09:00 -08:00
fea1d1c7b9 Prefers non-explicit and option to expressly remember closed videos 2023-10-14 12:24:30 -07:00
b5d0885c23 Compact-style message display options 2023-09-30 14:53:43 -07:00
dbfd45794a More safely parse JSON from localStorage 2023-09-07 21:03:15 -07:00
8853f9882b Store sort order and explicit setting to localStorage 2023-09-07 20:05:52 -07:00
d8cb1c7c11 Refactor more Vue components
Spin out components for:
* MessageBox: draw a chat message in the chat history panel as well as reused
  in the Report Modal.
* WhoListRow: provides a consistent UX for the Who List and Watching tab. On
  the Watching tab, the video button is replaced with the boot from video.

Other changes:
* Move VideoFlag into its own separate ES module.
* Emoji available reactions are moved into MessageBox.
* On WhoListRow: usernames are clickable to also open their profile page.
* On WhoListRow: the Watching tab is now sortable and follows the user's
  sort selection like the Online tab does.
2023-09-07 19:24:26 -07:00
8906e89a51 Refactor some modals and features into components
Move some chat modals into external components:
* LoginModal
* ExplicitOpenModal
* ReportModal
* The Photo Modal was hoisted into the main index.html page, because it is not
  a Vue component and relied on global onclick handlers and the DOM.

Spin off some external JS modules:
* isAppleWebkit moved to lib/browsers.js
* Local Storage management centralized and moved to lib/LocalStorage.js
2023-09-06 23:03:12 -07:00
e728644a77 Port front-end over to Vue CLI (create-vue)
This commit makes an initial port of the front-end over to a proper Vue
CLI application. It seems to work from surface level testing.

Changes made:

* Rename web/static to public/static to place it into the Vue build path
  * Notes: web/static/js/BareRTC.js and web/templates/chat.html are now
    deprecated
* Rename web/static/js/sounds.js into src/lib/sounds.js making it a
  proper JavaScript module with exports.
* Fill out initial src/App.vue by copying and updating
  web/templates/chat.html and web/static/js/BareRTC.js into this module.
2023-09-06 17:15:02 -07:00