Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: threads now send correctly to discord. #931

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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));
Jaskowicz1 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading