mirror of https://github.com/zulip/zulip.git
Report a distinct string including version as the client for desktop app users.
(imported from commit 58115e0cdd32f19f3694a1ffbf8664561175cf55)
This commit is contained in:
parent
b4684db9a5
commit
2ba75d2bfa
|
@ -5,6 +5,15 @@ var is_composing_message = false;
|
|||
var message_snapshot;
|
||||
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
|
||||
// jquery object.
|
||||
function clear_out_file_list(jq_file_list) {
|
||||
|
@ -243,7 +252,7 @@ function create_message_object() {
|
|||
if (subject === "") {
|
||||
subject = compose.empty_subject_placeholder();
|
||||
}
|
||||
var message = {client: 'website',
|
||||
var message = {client: client(),
|
||||
type: compose.composing(),
|
||||
subject: subject,
|
||||
stream: compose.stream_name(),
|
||||
|
|
Loading…
Reference in New Issue