Base: Fix missing arguments for tray notifications

This commit is contained in:
tt2468 2021-06-13 04:16:22 -07:00
parent 33ba2d2415
commit fb699b0414
2 changed files with 3 additions and 3 deletions

View File

@ -193,7 +193,7 @@ WebSocketProtocol::ProcessResult WebSocketProtocol::ProcessMessage(SessionPtr se
if (conf && conf->AlertsEnabled) {
obs_frontend_push_ui_translation(obs_module_get_string);
QString title = QObject::tr("OBSWebSocket.TrayNotification.AuthenticationFailed.Title");
QString body = QObject::tr("OBSWebSocket.TrayNotification.AuthenticationFailed.Body");
QString body = QObject::tr("OBSWebSocket.TrayNotification.AuthenticationFailed.Body").arg(QString::fromStdString(session->RemoteAddress()));
obs_frontend_pop_ui_translation();
Utils::Platform::SendTrayNotification(QSystemTrayIcon::Warning, title, body);
}
@ -227,7 +227,7 @@ WebSocketProtocol::ProcessResult WebSocketProtocol::ProcessMessage(SessionPtr se
if (conf && conf->AlertsEnabled) {
obs_frontend_push_ui_translation(obs_module_get_string);
QString title = QObject::tr("OBSWebSocket.TrayNotification.Identified.Title");
QString body = QObject::tr("OBSWebSocket.TrayNotification.Identified.Body");
QString body = QObject::tr("OBSWebSocket.TrayNotification.Identified.Body").arg(QString::fromStdString(session->RemoteAddress()));
obs_frontend_pop_ui_translation();
Utils::Platform::SendTrayNotification(QSystemTrayIcon::Information, title, body);
}

View File

@ -349,7 +349,7 @@ void WebSocketServer::onClose(websocketpp::connection_hdl hdl)
if (isIdentified && (conn->get_local_close_code() != websocketpp::close::status::going_away) && conf->AlertsEnabled) {
obs_frontend_push_ui_translation(obs_module_get_string);
QString title = QObject::tr("OBSWebSocket.TrayNotification.Disconnected.Title");
QString body = QObject::tr("OBSWebSocket.TrayNotification.Disconnected.Body");
QString body = QObject::tr("OBSWebSocket.TrayNotification.Disconnected.Body").arg(QString::fromStdString(remoteAddress));
obs_frontend_pop_ui_translation();
Utils::Platform::SendTrayNotification(QSystemTrayIcon::Information, title, body);
}