This commit is contained in:
parent
9ff89fa18b
commit
7bcbc6b73b
5 changed files with 131 additions and 26 deletions
|
|
@ -767,6 +767,7 @@ void RealmController::getRealmByName(const HttpRequestPtr &,
|
|||
"r.chat_enabled, r.chat_guests_allowed, "
|
||||
"r.chat_slow_mode_seconds, r.chat_retention_hours, "
|
||||
"r.offline_image_url, r.description, r.user_id, r.playlist_control_mode, r.playlist_whitelist, r.title_color, "
|
||||
"r.live_started_at, "
|
||||
"u.username, u.avatar_url, u.user_color FROM realms r "
|
||||
"JOIN users u ON r.user_id = u.id "
|
||||
"WHERE r.name = $1 AND r.is_active = true"
|
||||
|
|
@ -808,6 +809,10 @@ void RealmController::getRealmByName(const HttpRequestPtr &,
|
|||
realm["avatarUrl"] = r[0]["avatar_url"].isNull() ? "" : r[0]["avatar_url"].as<std::string>();
|
||||
realm["colorCode"] = r[0]["user_color"].isNull() ? "" : r[0]["user_color"].as<std::string>();
|
||||
realm["titleColor"] = r[0]["title_color"].isNull() ? "#ffffff" : r[0]["title_color"].as<std::string>();
|
||||
// Include live_started_at for stream duration display
|
||||
if (!r[0]["live_started_at"].isNull()) {
|
||||
realm["liveStartedAt"] = r[0]["live_started_at"].as<std::string>();
|
||||
}
|
||||
|
||||
callback(jsonResp(resp));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue