[MIRROR] Chat history prototype (#10278)

Co-authored-by: Selis <12716288+ItsSelis@users.noreply.github.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-02 09:22:34 -07:00
committed by GitHub
parent 36231619db
commit 09bb0e61b3
33 changed files with 746 additions and 235 deletions

View File

@@ -73,11 +73,18 @@
/datum/tgui_panel/proc/on_message(type, payload)
if(type == "ready")
broken = FALSE
window.send_message("connected", list("round_id" = GLOB.round_id)) // Sends the round ID to the chat, requires round IDs
var/list/stored_rounds = CONFIG_GET(flag/chatlog_database_backend) ? vchatlog_get_recent_roundids(client.ckey) : null
window.send_message("connected", list(
"round_id" = GLOB.round_id, // Sends the round ID to the chat, requires round IDs
"chatlog_db_backend" = CONFIG_GET(flag/chatlog_database_backend),
"chatlog_api_endpoint" = CONFIG_GET(string/chatlog_database_api_endpoint),
"chatlog_stored_rounds" = islist(stored_rounds) ? list("0") + stored_rounds : list("0"),
))
window.send_message("update", list(
"config" = list(
"client" = list(
"ckey" = client.ckey,
"chatlog_token" = client.chatlog_token,
"address" = client.address,
"computer_id" = client.computer_id,
),