Skip to content

Commit c47d63e

Browse files
authored
Merge pull request #6129 from Countly/merge-conflict-resolve
Release.24.05
2 parents 80976c9 + 2dc2294 commit c47d63e

File tree

4 files changed

+53
-33
lines changed

4 files changed

+53
-33
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
## Version 24.10.X
1+
## Version 24.10.9
22
Fixes:
3+
- [core] Allow downloading data also from other databases in dbviewer
4+
- [crash_symbolication] Symbolication server api end point test fix
35
- [crashes] Remove memory addresses from stack trace grouping
6+
- [push] Fixed push notifications title and content text and variables combination
7+
- [reports] Correctly match event for email report if event key contains '.'
48
- [script] Refined delete_custom_events.js to clean up faulty/dead events completely.
59
- [user-management] Prevent global admin from self-revoke and self-delete
610

@@ -4518,4 +4522,3 @@ This version provides several features and bugfixes to both server and SDKs. The
45184522
A user of an application can only view analytics for that application
45194523
and cannot edit its settings.
45204524
* Added csfr protection to all methods provided through app.js.
4521-

plugins/push/api/send/data/pers.js

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,46 @@ const { dot } = require('../../../../../api/utils/common');
44
* Personalize function. A factory to create a function which would apply personalization to a given string.
55
*
66
* @param {String} string string to personalize
7-
* @param {Object} personaliztion object of {5: {f: 'fallback', c: false, k: 'key'}, 10: {...}} kind
7+
* @param {Object} personalizations object of {5: {f: 'fallback', c: false, k: 'key'}, 10: {...}} kind
88
*
99
* @returns {function} function with single obejct parameter which returns final string for a given data
1010
*/
11-
module.exports = function personalize(string, personaliztion) {
12-
let parts = [],
13-
indicies = personaliztion ? Object.keys(personaliztion).map(n => parseInt(n, 10)) : [],
14-
i = 0,
15-
def;
11+
module.exports = function personalize(string, personalizations) {
12+
let parts = [];
13+
let def;
14+
let i = 0;
15+
let indexes = Object.keys(personalizations || {}).map(n => parseInt(n, 10));
1616

17-
indicies.forEach(idx => {
17+
indexes.forEach(idx => {
1818
if (i < idx) {
19-
parts.push(string.substr(i, idx));
19+
const subStringLength = idx - i;
20+
// push all the string that appears before the personalization index
21+
parts.push(string.substr(i, subStringLength));
2022
}
23+
24+
// push the personalization function
2125
parts.push(function(data) {
22-
let pers = personaliztion[idx];
23-
data = dot(data, pers.k);
24-
if (pers.c && data) {
26+
let personalization = personalizations[idx];
27+
28+
data = dot(data, personalization.k);
29+
30+
if (personalization.c && data) {
2531
if (typeof data !== 'string') {
2632
data = data + '';
2733
}
34+
2835
return data.substr(0, 1).toUpperCase() + data.substr(1);
2936
}
30-
return data === null || data === undefined ? pers.f : (data + '');
37+
38+
// if data does not exist return fallback value
39+
return data === null || data === undefined ? personalization.f : (data + '');
3140
});
32-
i = idx + 1;
41+
42+
i = idx;
3343
});
3444

3545
if (i < string.length) {
36-
parts.push(string.substr(i, string.length));
46+
parts.push(string.substr(i));
3747
}
3848

3949
/**
@@ -48,11 +58,12 @@ module.exports = function personalize(string, personaliztion) {
4858
return parts.map(p => typeof p === 'string' ? p : p(data)).join('');
4959
}
5060
}
61+
5162
return def;
5263
};
5364

5465
// a message with all slots filled with default values
5566
def = compile({___dummy: true});
5667

5768
return compile;
58-
};
69+
};

plugins/push/frontend/public/stylesheets/main.scss

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -673,30 +673,32 @@
673673

674674
.cly-vue-push-notification-message-editor-with-emoji-picker {
675675

676-
677-
&__user-property {
678-
padding: 1px 5px 2px;
679-
background: #ECECEC;
680-
border-radius: 2px;
681-
margin-right: 2px;
682-
683-
&:hover {
684-
cursor: pointer;
685-
}
676+
// .cly-vue-push-notification-message-editor-with-emoji-picker__content
677+
&__content {
678+
word-break: break-all;
679+
overflow-x:auto;
680+
height: 100px;
681+
padding-right:32px;
686682
}
687683

684+
// .cly-vue-push-notification-message-editor-with-emoji-picker__title
688685
&__title {
689686
word-break: break-all;
690687
overflow-x: auto;
691688
height:35px;
692689
padding-right:32px;
693690
}
694691

695-
&__content {
696-
word-break: break-all;
697-
overflow-x:auto;
698-
height: 100px;
699-
padding-right:32px;
692+
// .cly-vue-push-notification-message-editor-with-emoji-picker__user-property
693+
&__user-property {
694+
padding: 1px 5px 2px;
695+
background: #ECECEC;
696+
border-radius: 2px;
697+
698+
// .cly-vue-push-notification-message-editor-with-emoji-picker__user-property:hover
699+
&:hover {
700+
cursor: pointer;
701+
}
700702
}
701703
}
702704

@@ -830,4 +832,4 @@
830832
.cly-vue-push-notification-details-chart-bars__item-legend-percentage + .text-medium span i{
831833
margin-left: 6px;
832834
cursor: pointer;
833-
}
835+
}

plugins/reports/api/reports.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ var metricProps = {
204204
}
205205
else {
206206
event = parts[1];
207+
for (var z = 2; z < parts.length; z++) {
208+
event += "." + parts[z];
209+
}
210+
parts[1] = event;//To use it as name also afterwards
207211
}
208212
if (event) {
209213
if (Array.isArray(event)) {

0 commit comments

Comments
 (0)