add: channels, messages
This commit is contained in:
parent
67492cf73f
commit
7774124bd0
40 changed files with 2238 additions and 115 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue