mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
Report a distinct string including version as the client for desktop app users.
(imported from commit 58115e0cdd32f19f3694a1ffbf8664561175cf55)
This commit is contained in:
@@ -5,6 +5,15 @@ var is_composing_message = false;
|
|||||||
var message_snapshot;
|
var message_snapshot;
|
||||||
var empty_subject_placeholder = "(no topic)";
|
var empty_subject_placeholder = "(no topic)";
|
||||||
|
|
||||||
|
function client() {
|
||||||
|
if ((window.bridge !== undefined) &&
|
||||||
|
(window.bridge.desktopAppVersion !== undefined)) {
|
||||||
|
return "desktop app " + window.bridge.desktopAppVersion();
|
||||||
|
} else {
|
||||||
|
return "website";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This function resets an input type="file". Pass in the
|
// This function resets an input type="file". Pass in the
|
||||||
// jquery object.
|
// jquery object.
|
||||||
function clear_out_file_list(jq_file_list) {
|
function clear_out_file_list(jq_file_list) {
|
||||||
@@ -243,7 +252,7 @@ function create_message_object() {
|
|||||||
if (subject === "") {
|
if (subject === "") {
|
||||||
subject = compose.empty_subject_placeholder();
|
subject = compose.empty_subject_placeholder();
|
||||||
}
|
}
|
||||||
var message = {client: 'website',
|
var message = {client: client(),
|
||||||
type: compose.composing(),
|
type: compose.composing(),
|
||||||
subject: subject,
|
subject: subject,
|
||||||
stream: compose.stream_name(),
|
stream: compose.stream_name(),
|
||||||
|
|||||||
Reference in New Issue
Block a user