add: channels, messages

This commit is contained in:
trisua 2025-04-27 23:11:37 -04:00
parent 67492cf73f
commit 7774124bd0
40 changed files with 2238 additions and 115 deletions

View file

@ -125,6 +125,14 @@ macros -%}
<script data-turbo-permanent="true" id="update-seen-script">
document.documentElement.addEventListener("turbo:load", () => {
trigger("me::seen");
if (!window.location.pathname.startsWith("/chats/")) {
if (window.socket) {
window.socket.send("Close");
window.socket = undefined;
console.log("socket disconnect");
}
}
});
</script>
{% endif %}