mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-18 12:50:29 +01:00
355c8ca5f0
* DMAPI Update * Fix * More changes * InitTgs * . * css * urg * fix that * some linux fixes * . * . * . * update * . * pref fixing * . * those are already sent * . * . * . * fully off * fix that * New classes & Format * make this nicer * CSS Edits * . * eh use switch * . * Update client procs.dm * Hard restart counter * Improved Staffwho style --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
/datum/tgs_message_content/proc/_interop_serialize()
|
|
return list("text" = text, "embed" = embed ? embed._interop_serialize() : null)
|
|
|
|
/datum/tgs_chat_embed/proc/_interop_serialize()
|
|
CRASH("Base /proc/interop_serialize called on [type]!")
|
|
|
|
/datum/tgs_chat_embed/structure/_interop_serialize()
|
|
var/list/serialized_fields
|
|
if(istype(fields, /list))
|
|
serialized_fields = list()
|
|
for(var/datum/tgs_chat_embed/field/field as anything in fields)
|
|
serialized_fields += list(field._interop_serialize())
|
|
return list(
|
|
"title" = title,
|
|
"description" = description,
|
|
"url" = url,
|
|
"timestamp" = timestamp,
|
|
"colour" = colour,
|
|
"image" = src.image ? src.image._interop_serialize() : null,
|
|
"thumbnail" = thumbnail ? thumbnail._interop_serialize() : null,
|
|
"video" = video ? video._interop_serialize() : null,
|
|
"footer" = footer ? footer._interop_serialize() : null,
|
|
"provider" = provider ? provider._interop_serialize() : null,
|
|
"author" = author ? author._interop_serialize() : null,
|
|
"fields" = serialized_fields
|
|
)
|
|
|
|
/datum/tgs_chat_embed/media/_interop_serialize()
|
|
return list(
|
|
"url" = url,
|
|
"width" = width,
|
|
"height" = height,
|
|
"proxyUrl" = proxy_url
|
|
)
|
|
|
|
/datum/tgs_chat_embed/provider/_interop_serialize()
|
|
return list(
|
|
"url" = url,
|
|
"name" = name
|
|
)
|
|
|
|
/datum/tgs_chat_embed/provider/author/_interop_serialize()
|
|
. = ..()
|
|
.["iconUrl"] = icon_url
|
|
.["proxyIconUrl"] = proxy_icon_url
|
|
|
|
/datum/tgs_chat_embed/footer/_interop_serialize()
|
|
return list(
|
|
"text" = text,
|
|
"iconUrl" = icon_url,
|
|
"proxyIconUrl" = proxy_icon_url
|
|
)
|
|
|
|
/datum/tgs_chat_embed/field/_interop_serialize()
|
|
return list(
|
|
"name" = name,
|
|
"value" = value,
|
|
"isInline" = is_inline
|
|
)
|