mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[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:
committed by
GitHub
parent
36231619db
commit
09bb0e61b3
@@ -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,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user