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.
* 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.
* 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).
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.
* 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.
* 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.
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.
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
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.