Skip to content

Commit

Permalink
fix: threads now send correctly to discord. (brainboxdotcc#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 authored Oct 9, 2023
1 parent d0f4e3b commit 1bca602
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/dpp/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,14 @@ channel& channel::fill_from_json(json* j) {
std::string thread::build_json(bool with_id) const {
json j = json::parse(channel::build_json(with_id));
j["type"] = (flags & CHANNEL_TYPE_MASK);
j["thread_metadata"] = this->metadata;
j["archived"] = this->metadata.archived;
j["auto_archive_duration"] = this->metadata.auto_archive_duration;
j["locked"] = this->metadata.locked;

if(this->get_type() == dpp::channel_type::CHANNEL_PRIVATE_THREAD) {
j["invitable"] = this->metadata.invitable;
}

if (!this->applied_tags.empty()) {
j["applied_tags"] = json::array();
for (auto &tag_id: this->applied_tags) {
Expand Down

0 comments on commit 1bca602

Please sign in to comment.