Report a distinct string including version as the client for desktop app users.

(imported from commit 58115e0cdd32f19f3694a1ffbf8664561175cf55)
This commit is contained in:
Jessica McKellar 2013-08-23 21:33:55 -04:00
parent b4684db9a5
commit 2ba75d2bfa
1 changed files with 10 additions and 1 deletions

View File

@ -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(),