From ed47ca67b064254ab4965ab5534e949120175376 Mon Sep 17 00:00:00 2001 From: Cihad Tekin Date: Thu, 12 Mar 2026 19:24:59 +0300 Subject: [PATCH] [push] Use Android specific content for Huawei messages --- plugins/push/api/send/data/message.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/push/api/send/data/message.js b/plugins/push/api/send/data/message.js index b3f7e81afe2..38528942528 100644 --- a/plugins/push/api/send/data/message.js +++ b/plugins/push/api/send/data/message.js @@ -382,19 +382,22 @@ class Message extends Mongoable { /** * Filter contents for given lang-platform combination - * + * * @param {Content[]|object[]} contents array of contents to filter * @param {string} p platform key * @param {string} la language key * @returns {Content[]} array of contents which are applicable for this p/l case */ static filterContents(contents, p, la) { - return (contents || []).filter(c => (!p || (!c.p || c.p === p)) && (!la || (!c.la || c.la === la))); + return (contents || []).filter( + c => (!p || (!c.p || c.p === p || (c.p === "a" && p === "h"))) + && (!la || (!c.la || c.la === la)) + ); } /** * Get Content instance by p & l given. `content()` returns default content. - * + * * @param {string} p platform key * @param {string} la language key * @returns {Content|undefined} Content instance if one with given p & l exists or undefined