diff --git a/Toast/bot/js/V8Instance.cpp b/Toast/bot/js/V8Instance.cpp index 6769c31..d75227f 100644 --- a/Toast/bot/js/V8Instance.cpp +++ b/Toast/bot/js/V8Instance.cpp @@ -368,6 +368,10 @@ void V8Instance::js_get_user(Local property, const PropertyCallbackInfonick == "null" ? member->user->username : member->nick; info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), name.c_str(), NewStringType::kNormal).ToLocalChecked()); } + else if (property_s == "TrueName") { // ignores nick + std::string name = member->user->username; + info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), name.c_str(), NewStringType::kNormal).ToLocalChecked()); + } else if (property_s == "Mention") { std::string mention = "<@" + member->user->id + ">"; info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), mention.c_str(), NewStringType::kNormal).ToLocalChecked());