mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 13:18:09 +01:00
[MIRROR] Implementing tgchat to replace old VChat (#7371)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
co-authored by
Heroman3003
Selis
parent
a5c370fb85
commit
c2bc0f78c8
@@ -0,0 +1,16 @@
|
||||
/// Stores information about a chat payload
|
||||
/datum/chat_payload
|
||||
/// Sequence number of this payload
|
||||
var/sequence = 0
|
||||
/// Message we are sending
|
||||
var/list/content
|
||||
/// Resend count
|
||||
var/resends = 0
|
||||
|
||||
/// Converts the chat payload into a JSON string
|
||||
/datum/chat_payload/proc/into_message()
|
||||
return "{\"sequence\":[sequence],\"content\":[json_encode(content)]}"
|
||||
|
||||
/// Returns an HTML-encoded message from our contents.
|
||||
/datum/chat_payload/proc/get_content_as_html()
|
||||
return message_to_html(content)
|
||||
Reference in New Issue
Block a user