Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik Analytics #3392

Merged
merged 11 commits into from
May 30, 2016
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ rocketchat:migrations
rocketchat:oauth2-server-config
rocketchat:oembed
rocketchat:otr
rocketchat:piwik
rocketchat:push-notifications
rocketchat:reactions
rocketchat:slashcommands-invite
Expand Down
1 change: 1 addition & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,38 +83,41 @@ Template.channelSettings.onCreated ->
return true

@saveSetting = =>
room = ChatRoom.findOne @data?.rid
switch @editing.get()
when 'roomName'
room = ChatRoom.findOne @data?.rid
if $('input[name=roomName]').val() is room.name
toastr.success TAPi18n.__ 'Room_name_changed_successfully'
RocketChat.callbacks.run 'roomNameChanged', ChatRoom.findOne(room._id)
else
if @validateRoomName()
Meteor.call 'saveRoomSettings', @data?.rid, 'roomName', @$('input[name=roomName]').val(), (err, result) ->
if err
return handleError(err)
RocketChat.callbacks.run 'roomNameChanged', { _id: room._id, name: @$('input[name=roomName]').val() }
Meteor.call 'saveRoomSettings', room._id, 'roomName', @$('input[name=roomName]').val(), (err, result) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_name_changed_successfully'
when 'roomTopic'
if @validateRoomTopic()
Meteor.call 'saveRoomSettings', @data?.rid, 'roomTopic', @$('input[name=roomTopic]').val(), (err, result) ->
if err
return handleError(err)
Meteor.call 'saveRoomSettings', room._id, 'roomTopic', @$('input[name=roomTopic]').val(), (err, result) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_topic_changed_successfully'
RocketChat.callbacks.run 'roomTopicChanged', ChatRoom.findOne(result.rid)
when 'roomType'
if @validateRoomType()
Meteor.call 'saveRoomSettings', @data?.rid, 'roomType', @$('input[name=roomType]:checked').val(), (err, result) ->
if err
return handleError(err)
RocketChat.callbacks.run 'roomTypeChanged', room
Meteor.call 'saveRoomSettings', room._id, 'roomType', @$('input[name=roomType]:checked').val(), (err, result) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_type_changed_successfully'
when 'archivationState'
if @$('input[name=archivationState]:checked').val() is 'true'
if ChatRoom.findOne(@data.rid)?.archived isnt true
Meteor.call 'archiveRoom', @data?.rid, (err, results) ->
if room.archived isnt true
Meteor.call 'archiveRoom', room._id, (err, results) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_archived'
RocketChat.callbacks.run 'archiveRoom', ChatRoom.findOne(room._id)
else
if ChatRoom.findOne(@data.rid)?.archived is true
Meteor.call 'unarchiveRoom', @data?.rid, (err, results) ->
if room.archived is true
Meteor.call 'unarchiveRoom', room._id, (err, results) ->
return handleError err if err
toastr.success TAPi18n.__ 'Room_unarchived'
RocketChat.callbacks.run 'unarchiveRoom', ChatRoom.findOne(room._id)
@editing.set()
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Meteor.methods
when 'default'
RocketChat.models.Rooms.saveDefaultById rid, value

return true
return { result: true, rid: room._id }
3 changes: 1 addition & 2 deletions packages/rocketchat-lib/client/methods/sendMessage.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Meteor.methods
return false

if _.trim(message.msg) isnt ''

if isNaN(TimeSync.serverOffset())
message.ts = new Date()
else
Expand All @@ -19,5 +18,5 @@ Meteor.methods
message = RocketChat.callbacks.run 'beforeSaveMessage', message

RocketChat.promises.run('onClientMessageReceived', message).then (message) ->

ChatMessage.insert message
RocketChat.callbacks.run 'afterSaveMessage', message
10 changes: 9 additions & 1 deletion packages/rocketchat-lib/i18n/ar.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"Accounts_OAuth_Custom_Secret" : "سر",
"Accounts_OAuth_Custom_Token_Path" : "مسار رمزي",
"Accounts_OAuth_Custom_Token_Sent_Via" : "رمزي المرسلة عن طريق",
"Accounts_OAuth_Custom_URL" : "الرابط",
"Accounts_OAuth_Facebook" : "تسجيل الدخول الى الفيسبوك",
"Accounts_OAuth_Facebook_callback_url" : "URL الفيسبوك الاستدعاء",
"Accounts_OAuth_Facebook_id" : "الفيسبوك معرف التطبيق",
Expand Down Expand Up @@ -127,6 +126,10 @@
"All_messages" : "كل الرسائل",
"Allow_Invalid_SelfSigned_Certs" : "السماح بالشهادات غير الصالحة الموقعة ذاتيا",
"Allow_Invalid_SelfSigned_Certs_Description" : "السماح لشهادة SSL غير صحيحة وموقعة ذاتيا للتأكد من صحة الرابط ومعاينات.",
"Analytics_features_enabled" : "الميزات الممكنة",
"Analytics_features_messages_Description" : "يتابع أحداث مخصصة ذات الصلة إلى إجراءات المستخدم لا على الرسائل.",
"Analytics_features_rooms_Description" : "يتابع أحداث مخصصة تتعلق الإجراءات على قناة أو مجموعة (خلق، وترك، وحذف).",
"Analytics_features_users_Description" : "يتابع أحداث مخصصة تتعلق الإجراءات ذات الصلة للمستخدمين (مرات إعادة تعيين كلمة المرور، الشخصية تغيير الصورة، الخ).",
"and" : "و",
"And_more" : "وأكثر من ذلك __length __",
"Animals_and_Nature" : "حيوانات و طبيعة",
Expand Down Expand Up @@ -279,6 +282,7 @@
"Direct_Messages" : "الرسائل المباشرة",
"Displays_action_text" : "نص العمل يعرض",
"Do_you_want_to_change_to_s_question" : "هل تريد التغيير إلى <strong>%s</strong>؟",
"Domains" : "المجالات",
"Drop_to_upload_file" : "إسقاط لتحميل الملف",
"Dry_run" : "تنفيذ تجريبي",
"Dry_run_description" : "سيتم إرسال رسالة بريدية واحدة إلى نفس العنوان الموجود في خانة \"من\". تأكد من كون ذلك العنوان البريدي فعال",
Expand Down Expand Up @@ -388,6 +392,7 @@
"False" : "لا",
"Favorite_Rooms" : "تمكين تفضيل الغرف",
"Favorites" : "المفضلة",
"Features_Enabled" : "الميزات الممكنة",
"Field" : "حقل",
"Field_removed" : "إزالة الميدان",
"File_exceeds_allowed_size_of_bytes" : "يتجاوز حجم الملف المسموح به بايت __size__",
Expand Down Expand Up @@ -772,6 +777,8 @@
"Pin_Message" : "تثبيث الرسالة",
"Pinned_a_message" : "دبس رسالة:",
"Pinned_Messages" : "رسائل مثبتة",
"PiwikAnalytics_siteId_Description" : "هوية الموقع لاستخدامها لتحديد هذا الموقع. على سبيل المثال: 17",
"PiwikAnalytics_url_Description" : "عنوان الموقع حيث يتواجد Piwik، ومن المؤكد أن تشمل مائلة للتجريب. على سبيل المثال: //piwik.rocket.chat/",
"Placeholder_for_email_or_username_login_field" : "نائب عن البريد الإلكتروني أو تسجيل الدخول باسم المستخدم المجال",
"Placeholder_for_password_login_field" : "نائب عن مجال تسجيل الدخول كلمة المرور",
"Please_add_a_comment" : "الرجاء إضافة تعليق",
Expand Down Expand Up @@ -1066,6 +1073,7 @@
"Upload_file_question" : "تحميل الملف؟",
"Uploading_file" : "تحميل الملف ...",
"Uptime" : "الجهوزية",
"URL" : "URL",
"Use_account_preference" : "استخدم تفضيلات الحساب",
"Use_Emojis" : "استخدم الرموز التعبيرية (ايموجي)",
"Use_initials_avatar" : "استخدم الأحرف الأولى من اسم المستخدم",
Expand Down
10 changes: 9 additions & 1 deletion packages/rocketchat-lib/i18n/ca.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Ruta del token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token enviat via",
"Accounts_OAuth_Custom_URL" : "URL",
"Accounts_OAuth_Facebook" : "Inici de sessió amb Facebook",
"Accounts_OAuth_Facebook_callback_url" : "URL de retorn (<em>callback</em>) de Facebook",
"Accounts_OAuth_Facebook_id" : "App ID de Facebook",
Expand Down Expand Up @@ -127,6 +126,10 @@
"All_messages" : "Tots els missatges",
"Allow_Invalid_SelfSigned_Certs" : "Permetre certificats auto-signats invàlids",
"Allow_Invalid_SelfSigned_Certs_Description" : "Permetre certificats SSL auto-signats i invàlids per a enllaços de validació i vistes prèvies.",
"Analytics_features_enabled" : "característiques habilitades",
"Analytics_features_messages_Description" : "Pistes d'esdeveniments personalitzats relacionats amb accions que un usuari fa en els missatges.",
"Analytics_features_rooms_Description" : "Pistes d'esdeveniments personalitzats relacionats amb accions en un canal o grup (crear, sortir, eliminar).",
"Analytics_features_users_Description" : "Pistes d'esdeveniments personalitzats relacionats amb les accions relacionades amb els usuaris (temps de restabliment de contrasenya, el perfil de canvi d'imatge, etc.).",
"and" : "i",
"And_more" : "I més __length __",
"Animals_and_Nature" : "Animals i natura",
Expand Down Expand Up @@ -279,6 +282,7 @@
"Direct_Messages" : "Missatges directes",
"Displays_action_text" : "Mostra text de l'acció",
"Do_you_want_to_change_to_s_question" : "Canvia a <strong>%s</strong>?",
"Domains" : "dominis",
"Drop_to_upload_file" : "Arrossega un arxiu aquí per pujar-lo",
"Dry_run" : "Funcionament de prova",
"Dry_run_description" : "Només s'enviarà un correu-e, a l'adreça del camp \"De\". El correu electrònic ha de pertànyer a un usuari vàlid.",
Expand Down Expand Up @@ -388,6 +392,7 @@
"False" : "Fals",
"Favorite_Rooms" : "Habilita sales favorites",
"Favorites" : "Favorits",
"Features_Enabled" : "característiques habilitades",
"Field" : "Camp",
"Field_removed" : "Camp eliminat",
"File_exceeds_allowed_size_of_bytes" : "L'arxiu supera la mida màxima de __size__ bytes",
Expand Down Expand Up @@ -772,6 +777,8 @@
"Pin_Message" : "Fixa missatge",
"Pinned_a_message" : "S'ha fixat un missatge:",
"Pinned_Messages" : "Missatges fixats",
"PiwikAnalytics_siteId_Description" : "La Identificació del lloc a utilitzar per a la identificació d'aquest lloc. Exemple: 17",
"PiwikAnalytics_url_Description" : "La URL on resideix el Piwik, assegureu-vos d'incloure la barra provant. Exemple: //piwik.rocket.chat/",
"Placeholder_for_email_or_username_login_field" : "Indicatiu (<em>placeholder</em>) per al camp d'inici de sessió (correu electrònic o nom d'usuari)",
"Placeholder_for_password_login_field" : "Indicatiu (<em>placeholder</em>) per al camp de contrasenya (inici de sessió)",
"Please_add_a_comment" : "Si us plau, afegeix un comentari",
Expand Down Expand Up @@ -1066,6 +1073,7 @@
"Upload_file_question" : "Pujar l'arxiu?",
"Uploading_file" : "Pujant l'arxiu...",
"Uptime" : "Temps en funcionament",
"URL" : "URL",
"Use_account_preference" : "Utilitza la preferència del compte",
"Use_Emojis" : "Utilitza emojis",
"Use_initials_avatar" : "Utilitza les inicials del nom d'usuari",
Expand Down
10 changes: 9 additions & 1 deletion packages/rocketchat-lib/i18n/cs.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Cesta k tokenu",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token odesílány skrze",
"Accounts_OAuth_Custom_URL" : "URL",
"Accounts_OAuth_Facebook" : "Facebook Přihlášení",
"Accounts_OAuth_Facebook_callback_url" : "Facebook Callback URL",
"Accounts_OAuth_Facebook_id" : "Facebook App Id",
Expand Down Expand Up @@ -127,6 +126,10 @@
"All_messages" : "Všechny zprávy",
"Allow_Invalid_SelfSigned_Certs" : "Umožnit nevalidní či self-signed certifikáty",
"Allow_Invalid_SelfSigned_Certs_Description" : "Umožňují použít neplatné/vlastní podepsané SSL certifikáty pro ověření spojení a náhledy.",
"Analytics_features_enabled" : "funkce Povoleno",
"Analytics_features_messages_Description" : "Sleduje vlastní události spojené s akcemi uživatel dělá na zprávy.",
"Analytics_features_rooms_Description" : "Sleduje vlastní události spojené s činností na kanálu nebo skupině (vytvořit, odejít, mazat).",
"Analytics_features_users_Description" : "Sleduje vlastní události spojené s činností souvisejících s uživateli (reset hesla časy, profil Změnit obrázek, atd).",
"and" : "a",
"And_more" : "A další __length __",
"Animals_and_Nature" : "Zvířata & Příroda",
Expand Down Expand Up @@ -279,6 +282,7 @@
"Direct_Messages" : "Přímé zprávy",
"Displays_action_text" : "Zobrazuje text akce",
"Do_you_want_to_change_to_s_question" : "Chcete <strong>změnit na %s?</strong>",
"Domains" : "domény",
"Drop_to_upload_file" : "Pusťe soubor do okna pro jeho nahrání",
"Dry_run" : "Zkouška",
"Dry_run_description" : "Odešle pouze jeden e-mail, na stejnou adresu jako ve formuláři. K e-mailu musí patřit platný uživatel.",
Expand Down Expand Up @@ -388,6 +392,7 @@
"False" : "Ne",
"Favorite_Rooms" : "Aktivovat oblíbené místnosti",
"Favorites" : "Oblíbené",
"Features_Enabled" : "funkce Povoleno",
"Field" : "Pole",
"Field_removed" : "Pole odebráno",
"File_exceeds_allowed_size_of_bytes" : "Soubor překračuje povolenou velikost __size__ bajtů",
Expand Down Expand Up @@ -772,6 +777,8 @@
"Pin_Message" : "Připnout zprávu",
"Pinned_a_message" : "Připnul zprávu:",
"Pinned_Messages" : "Připnuté zprávy",
"PiwikAnalytics_siteId_Description" : "Id webu používat k identifikaci těchto stránek. Příklad: 17",
"PiwikAnalytics_url_Description" : "Url kde Piwik bydliště, nezapomeňte zahrnout trialing lomítko. Příklad: //piwik.rocket.chat/",
"Placeholder_for_email_or_username_login_field" : "Zástupný symbol pro pole e-mailu nebo uživatelského jména v přihlášení",
"Placeholder_for_password_login_field" : "Zástupný symbol pro pole hesla v přihlášení",
"Please_add_a_comment" : "Prosím, přidejte komentář",
Expand Down Expand Up @@ -1066,6 +1073,7 @@
"Upload_file_question" : "Nahrát soubor?",
"Uploading_file" : "Nahrávání souboru ...",
"Uptime" : "uptime",
"URL" : "URL",
"Use_account_preference" : "Použít nastavení účtu",
"Use_Emojis" : "Použít emotikony",
"Use_initials_avatar" : "Použít iniciály",
Expand Down
10 changes: 9 additions & 1 deletion packages/rocketchat-lib/i18n/de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"Accounts_OAuth_Custom_Secret" : "Secret",
"Accounts_OAuth_Custom_Token_Path" : "Pfad des Token",
"Accounts_OAuth_Custom_Token_Sent_Via" : "Token gesendet über",
"Accounts_OAuth_Custom_URL" : "URL",
"Accounts_OAuth_Facebook" : "Anmeldung über Facebook erlauben",
"Accounts_OAuth_Facebook_callback_url" : "Facebook-Callback-URL",
"Accounts_OAuth_Facebook_id" : "Facebook-App-ID",
Expand Down Expand Up @@ -127,6 +126,10 @@
"All_messages" : "Alle Nachrichten",
"Allow_Invalid_SelfSigned_Certs" : "Ungültige und selbstsignierte SSL-Zertifikate erlauben",
"Allow_Invalid_SelfSigned_Certs_Description" : "Ungültige und selbstsignierte SSL-Zertifikate für die Link-Validierung und die Vorschau zulassen",
"Analytics_features_enabled" : "Funktionen aktiviert",
"Analytics_features_messages_Description" : "Tracks benutzerdefinierte Ereignisse im Zusammenhang mit Aktionen ein Nutzer auf Nachrichten.",
"Analytics_features_rooms_Description" : "Tracks benutzerdefinierte Ereignisse im Zusammenhang mit Aktionen auf einem Kanal oder einer Gruppe (erstellen, verlassen, löschen).",
"Analytics_features_users_Description" : "Tracks benutzerdefinierte Ereignisse im Zusammenhang mit Maßnahmen im Zusammenhang mit Benutzer (Passwort-Reset-Zeiten, Profilbild ändern, etc).",
"and" : "und",
"And_more" : "Und mehr __length__",
"Animals_and_Nature" : "Tiere & Natur",
Expand Down Expand Up @@ -279,6 +282,7 @@
"Direct_Messages" : "Private Nachrichten",
"Displays_action_text" : "Zeigt Aktionstext",
"Do_you_want_to_change_to_s_question" : "Möchten Sie dies zu <strong>%s</strong> ändern?",
"Domains" : "Domains",
"Drop_to_upload_file" : "Ablegen, um Datei hochzuladen",
"Dry_run" : "Probelauf",
"Dry_run_description" : "Es wird nur eine E-Mail an die selbe Adresse wie im Feld Absender geschickt. Die E-Mailadresse muss einem gültigen Benutzer gehören.",
Expand Down Expand Up @@ -388,6 +392,7 @@
"False" : "Nein",
"Favorite_Rooms" : "Favorisierte Räume aktivieren",
"Favorites" : "Favoriten",
"Features_Enabled" : "Funktionen aktiviert",
"Field" : "Feld",
"Field_removed" : "Feld entfernt",
"File_exceeds_allowed_size_of_bytes" : "Die Datei ist größer als das erlaubte Maximum von __size__ Bytes",
Expand Down Expand Up @@ -772,6 +777,8 @@
"Pin_Message" : "Nachricht fixieren",
"Pinned_a_message" : "hat eine Nachricht angeheftet:",
"Pinned_Messages" : "Fixierte Nachrichten",
"PiwikAnalytics_siteId_Description" : "Die Website-ID zur Identifizierung zur Nutzung dieser Website. Beispiel: 17",
"PiwikAnalytics_url_Description" : "Die URL, wo die Piwik befindet, sollten Sie die trialing slash aufzunehmen. Beispiel: //piwik.rocket.chat/",
"Placeholder_for_email_or_username_login_field" : "Platzhalter für das Feld der E-Mail-Adresse und des Benutzernamen",
"Placeholder_for_password_login_field" : "Platzhalter für das Feld des Anmeldepassworts",
"Please_add_a_comment" : "Bitte fügen Sie einen Kommentar hinzu",
Expand Down Expand Up @@ -1066,6 +1073,7 @@
"Upload_file_question" : "Möchten Sie eine Datei hochladen?",
"Uploading_file" : "Datei wird hochgeladen...",
"Uptime" : "Laufzeit",
"URL" : "URL",
"Use_account_preference" : "Kontoeinstellungen verwenden",
"Use_Emojis" : "Emojis verwenden",
"Use_initials_avatar" : "Anfangsbuchstaben deines Nutzernamens verwenden",
Expand Down
Loading