@meltwater/conversations-api-services 1.1.20 → 1.1.22
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.
|
@@ -308,7 +308,10 @@ async function reply(token, text, attachment, inReplyToId, removeInReplyToId, lo
|
|
|
308
308
|
}
|
|
309
309
|
};
|
|
310
310
|
if (removeInReplyToId.length) {
|
|
311
|
-
|
|
311
|
+
const filteredIds = removeInReplyToId.map(_externalIdHelpers.removePrefix).filter(id => id && id.trim().length > 0);
|
|
312
|
+
if (filteredIds.length > 0) {
|
|
313
|
+
payload.reply.exclude_reply_user_ids = filteredIds;
|
|
314
|
+
}
|
|
312
315
|
}
|
|
313
316
|
let query = 'https://api.twitter.com/2/tweets';
|
|
314
317
|
return publishTweet(token, payload, query, false, logger);
|
|
@@ -285,7 +285,10 @@ export async function reply(token, text, attachment, inReplyToId, removeInReplyT
|
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
if (removeInReplyToId.length) {
|
|
288
|
-
|
|
288
|
+
const filteredIds = removeInReplyToId.map(removePrefix).filter(id => id && id.trim().length > 0);
|
|
289
|
+
if (filteredIds.length > 0) {
|
|
290
|
+
payload.reply.exclude_reply_user_ids = filteredIds;
|
|
291
|
+
}
|
|
289
292
|
}
|
|
290
293
|
let query = 'https://api.twitter.com/2/tweets';
|
|
291
294
|
return publishTweet(token, payload, query, false, logger);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meltwater/conversations-api-services",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.22",
|
|
4
4
|
"description": "Repository to contain all conversations api services shared across our services",
|
|
5
5
|
"main": "dist/cjs/data-access/index.js",
|
|
6
6
|
"module": "dist/esm/data-access/index.js",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"moment": "^2.30.1",
|
|
52
52
|
"prom-client": "^15.1.0",
|
|
53
|
+
"sha.js": ">=2.4.12",
|
|
53
54
|
"superagent": "^8.1.2",
|
|
54
55
|
"winston": "^3.11.0"
|
|
55
56
|
},
|
|
@@ -335,9 +335,12 @@ export async function reply(token, text, attachment, inReplyToId, removeInReplyT
|
|
|
335
335
|
},
|
|
336
336
|
};
|
|
337
337
|
if (removeInReplyToId.length){
|
|
338
|
-
|
|
339
|
-
removePrefix
|
|
340
|
-
|
|
338
|
+
const filteredIds = removeInReplyToId
|
|
339
|
+
.map(removePrefix)
|
|
340
|
+
.filter(id => id && id.trim().length > 0);
|
|
341
|
+
if (filteredIds.length > 0) {
|
|
342
|
+
payload.reply.exclude_reply_user_ids = filteredIds;
|
|
343
|
+
}
|
|
341
344
|
}
|
|
342
345
|
|
|
343
346
|
let query = 'https://api.twitter.com/2/tweets';
|