Skip to content

Commit

Permalink
fix: changed user_obj back to user_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Oct 20, 2023
1 parent 78ac8b5 commit fd9ec51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/dpp/emoji.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class DPP_EXPORT emoji : public managed, public json_interface<emoji> {
public:
std::string name{}; //<! emoji name
std::vector<dpp::snowflake> roles; //!< roles allowed to use this emoji
user user_obj; //!< user that created this emoji
snowflake user_id; //!< user id that created this emoji
std::string image_data{}; //!< Image data for the emoji if uploading
uint8_t flags{0}; //!< Flags for the emoji from dpp::emoji_flags

Expand Down
3 changes: 2 additions & 1 deletion src/dpp/emoji.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ emoji& emoji::fill_from_json_impl(nlohmann::json* j) {
id = snowflake_not_null(j, "id");
name = string_not_null(j, "name");
if (j->contains("user")) {
user_obj = user().fill_from_json(&((*j)["user"]));
json & user = (*j)["user"];
user_id = snowflake_not_null(&user, "id");
}

if(j->contains("roles")) {
Expand Down

0 comments on commit fd9ec51

Please sign in to comment.