diff options
author | Henry Castro <hcastro@collabora.com> | 2022-05-05 16:08:31 -0400 |
---|---|---|
committer | Gökay ŞATIR <gokaysatir@gmail.com> | 2022-05-24 11:59:38 +0300 |
commit | 6b424835cfec77c5beba4877bc0cb9f822a210eb (patch) | |
tree | 526db9926ea21f0c34781a745c3953e75112ab38 | |
parent | wsd: infobar: fetch and save the latest version data (diff) | |
download | online-6b424835cfec77c5beba4877bc0cb9f822a210eb.tar.gz online-6b424835cfec77c5beba4877bc0cb9f822a210eb.zip |
wsd: infobar: send latest version to the client side
Change-Id: I565d9d30c86ec12e7ee96df55ac8adc2e718626a
Signed-off-by: Henry Castro <hcastro@collabora.com>
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
-rw-r--r-- | wsd/ClientSession.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp index 2580406b12..a1a32c9df4 100644 --- a/wsd/ClientSession.cpp +++ b/wsd/ClientSession.cpp @@ -521,7 +521,20 @@ bool ClientSession::_handleInput(const char *buffer, int length) return true; } - if (tokens.equals(0, "jserror") || tokens.equals(0, "jsexception")) + if (tokens.equals(0, "infobar")) + { +#if !MOBILEAPP + std::string infobar; + { + std::lock_guard<std::mutex> lock(COOLWSD::FetchUpdateMutex); + infobar = COOLWSD::LatestVersion; + } + + if (!infobar.empty()) + sendTextFrame("infobar: " + infobar); +#endif + } + else if (tokens.equals(0, "jserror") || tokens.equals(0, "jsexception")) { LOG_ERR(std::string(buffer, length)); return true; |