File tree Expand file tree Collapse file tree
plugins/push/api/send/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -382,19 +382,22 @@ class Message extends Mongoable {
382382
383383 /**
384384 * Filter contents for given lang-platform combination
385- *
385+ *
386386 * @param {Content[]|object[] } contents array of contents to filter
387387 * @param {string } p platform key
388388 * @param {string } la language key
389389 * @returns {Content[] } array of contents which are applicable for this p/l case
390390 */
391391 static filterContents ( contents , p , la ) {
392- return ( contents || [ ] ) . filter ( c => ( ! p || ( ! c . p || c . p === p ) ) && ( ! la || ( ! c . la || c . la === la ) ) ) ;
392+ return ( contents || [ ] ) . filter (
393+ c => ( ! p || ( ! c . p || c . p === p || ( c . p === "a" && p === "h" ) ) )
394+ && ( ! la || ( ! c . la || c . la === la ) )
395+ ) ;
393396 }
394397
395398 /**
396399 * Get Content instance by p & l given. `content()` returns default content.
397- *
400+ *
398401 * @param {string } p platform key
399402 * @param {string } la language key
400403 * @returns {Content|undefined } Content instance if one with given p & l exists or undefined
You can’t perform that action at this time.
0 commit comments