wingbot 3.44.2 → 3.44.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/BuildRouter.js
CHANGED
|
@@ -102,8 +102,9 @@ const DUMMY_ROUTE = { id: 0, path: null, resolvers: [] };
|
|
|
102
102
|
* @param {string} senderId
|
|
103
103
|
* @param {string} textLabel
|
|
104
104
|
* @param {string} urlText
|
|
105
|
-
* @param {boolean}
|
|
106
|
-
* @param {object}
|
|
105
|
+
* @param {boolean} isExtUrl
|
|
106
|
+
* @param {object} state
|
|
107
|
+
* @param {string} pageId
|
|
107
108
|
* @returns {string}
|
|
108
109
|
*/
|
|
109
110
|
|
|
@@ -72,7 +72,14 @@ function carousel (params, context) {
|
|
|
72
72
|
const hasExtension = type === TYPE_URL_WITH_EXT;
|
|
73
73
|
const textLabel = titleText || subtitleText;
|
|
74
74
|
let urlText = getText(url, state);
|
|
75
|
-
urlText = linksTranslator(
|
|
75
|
+
urlText = linksTranslator(
|
|
76
|
+
senderId,
|
|
77
|
+
textLabel,
|
|
78
|
+
urlText,
|
|
79
|
+
isExtUrl,
|
|
80
|
+
state,
|
|
81
|
+
req.pageId
|
|
82
|
+
);
|
|
76
83
|
elem.setElementAction(urlText, hasExtension, webviewHeight);
|
|
77
84
|
break;
|
|
78
85
|
}
|
package/src/resolvers/utils.js
CHANGED
|
@@ -204,7 +204,7 @@ function getText (text, state) {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
// eslint-disable-next-line no-unused-vars
|
|
207
|
-
const DEFAULT_LINK_TRANSLATOR = (senderId,
|
|
207
|
+
const DEFAULT_LINK_TRANSLATOR = (senderId, text, url, isExtUrl, state, pageId) => url;
|
|
208
208
|
|
|
209
209
|
/** @typedef {import('../BuildRouter').BotContext} BotContext */
|
|
210
210
|
|
|
@@ -257,7 +257,14 @@ function processButtons (
|
|
|
257
257
|
case TYPE_URL_WITH_EXT: {
|
|
258
258
|
const hasExtention = type === TYPE_URL_WITH_EXT;
|
|
259
259
|
let urlText = getText(url, state);
|
|
260
|
-
urlText = translateLinks(
|
|
260
|
+
urlText = translateLinks(
|
|
261
|
+
senderId,
|
|
262
|
+
defaultText,
|
|
263
|
+
urlText,
|
|
264
|
+
isExtUrl,
|
|
265
|
+
state,
|
|
266
|
+
req.pageId
|
|
267
|
+
);
|
|
261
268
|
elem.urlButton(btnTitleText, urlText, hasExtention, webviewHeight);
|
|
262
269
|
break;
|
|
263
270
|
}
|