Skip to content

Commit

Permalink
Fix no aliases being set as null
Browse files Browse the repository at this point in the history
  • Loading branch information
deepbluev7 committed Jul 3, 2024
1 parent e87c6f4 commit 018e208
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/structs/events/canonical_alias.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ from_json(const json &obj, CanonicalAlias &canonical_alias)
void
to_json(json &obj, const CanonicalAlias &canonical_alias)
{
obj = nlohmann::json::object();

if (!canonical_alias.alias.empty())
obj["alias"] = canonical_alias.alias;
if (!canonical_alias.alt_aliases.empty())
Expand Down

0 comments on commit 018e208

Please sign in to comment.