From 804b4714cf3454899d1d8a5ffbd5bc553a1b448f Mon Sep 17 00:00:00 2001 From: acetone Date: Thu, 30 Dec 2021 12:00:20 -0500 Subject: [PATCH] real time mode url edited --- httpserver.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/httpserver.cpp b/httpserver.cpp index f0cbf6f..2bade0d 100644 --- a/httpserver.cpp +++ b/httpserver.cpp @@ -257,7 +257,7 @@ void HttpServer::reader() else if (urlPath.startsWith("/ajax/")) { writeAjaxAnswer(socket, urlPath, isHeadRequest); } - else if (urlPath.startsWith("/realtime/")) { + else if (urlPath.startsWith("/realtimereadingchat/")) { writeRealTimeChatPage(socket, urlPath, isHeadRequest); } // plaint dynamic page @@ -627,7 +627,7 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead replaceTag(page, "CHANNEL_TOPIC", m_channelsTopic[originalServerName][originalChannelName].replace('\"', """)); replaceTag(page, "MAIN_HEADER", originalChannelName); - replaceTag(page, "REALTIME_LINK", "/realtime/"+server+"/"+channel); + replaceTag(page, "REALTIME_LINK", "/realtimereadingchat/"+server+"/"+channel); replaceTag(page, "AIRPLAIN_TITLE", "Real time reading"); QString middlePath = "" + "/" + ""; @@ -1128,7 +1128,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo auto renderStart = QDateTime::currentMSecsSinceEpoch(); - urlPath.remove(QRegularExpression("^/realtime/")); + urlPath.remove(QRegularExpression("^/realtimereadingchat/")); QString server = getWordFromPath(urlPath); if (server.isEmpty()) { writeErrorPage(socket, "SERVER VALUE IS MISSING"); @@ -1207,7 +1207,7 @@ void HttpServer::writeRealTimeChatPage(QTcpSocket *socket, QString &urlPath, boo QString channelNameForUrl {c.first}; channelNameForUrl.remove('#'); - QString channelLink = "/realtime/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl; + QString channelLink = "/realtimereadingchat/" + global::toLowerAndNoSpaces(s.first) + "/" + channelNameForUrl; replaceTag(htmlChannelLine, "CHANNEL_LINK", channelLink); htmlChannelLineS += htmlChannelLine;