From 9d2d13a3898f05f9e8189f99087198726d476e1b Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 27 Jul 2021 22:54:17 -0400 Subject: very rudimentary thread support --- discord/channel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'discord/channel.cpp') diff --git a/discord/channel.cpp b/discord/channel.cpp index 9d90eb5..e5dfb06 100644 --- a/discord/channel.cpp +++ b/discord/channel.cpp @@ -1,6 +1,13 @@ #include "../abaddon.hpp" #include "channel.hpp" +void from_json(const nlohmann::json &j, ThreadMetadata &m) { + JS_D("archived", m.IsArchived); + JS_D("auto_archive_duration", m.AutoArchiveDuration); + JS_D("archive_timestamp", m.ArchiveTimestamp); + JS_O("locked", m.IsLocked); +} + void from_json(const nlohmann::json &j, ChannelData &m) { JS_D("id", m.ID); JS_D("type", m.Type); @@ -21,6 +28,7 @@ void from_json(const nlohmann::json &j, ChannelData &m) { JS_O("application_id", m.ApplicationID); JS_ON("parent_id", m.ParentID); JS_ON("last_pin_timestamp", m.LastPinTimestamp); + JS_O("thread_metadata", m.ThreadMetadata); } void ChannelData::update_from_json(const nlohmann::json &j) { -- cgit v1.2.3