Mercurial Hosting > chat
diff src/delete_chat.js.luan @ 16:82b55186a4a0
fix delete_chat
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 03 Nov 2024 21:22:06 -0700 |
parents | 9f45d32670ae |
children | 7230c821c368 |
line wrap: on
line diff
--- a/src/delete_chat.js.luan Sun Nov 03 17:36:49 2024 -0700 +++ b/src/delete_chat.js.luan Sun Nov 03 21:22:06 2024 -0700 @@ -5,6 +5,8 @@ local current_user = User.current or error() local Chat = require "site:/lib/Chat.luan" local get_chat_by_id = Chat.get_by_id or error() +local Shared = require "site:/lib/Shared.luan" +local http_push_to_users = Shared.http_push_to_users or error() return function() @@ -12,5 +14,6 @@ chat = get_chat_by_id(chat) or error() local user = current_user() or error() chat.delete() - chat.http_push("location = '/chat.html'") + local js = "getChats(null)" + http_push_to_users( chat.user_ids, js ) end