nodebb-plugin-facebook-post 1.0.41 → 1.0.43

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nodebb-plugin-facebook-post",
3
- "version": "1.0.41",
4
- "description": "Auto-post new NodeBB topics to a fixed Facebook Page (text + NodeBB uploads + place id).",
3
+ "version": "1.0.43",
4
+ "description": "Auto-post new NodeBB topics to a fixed Facebook Page (text + NodeBB uploads).",
5
5
  "main": "library.js",
6
6
  "dependencies": {
7
7
  "axios": "^1.6.0"
@@ -20,7 +20,7 @@
20
20
 
21
21
  const $li = $(`
22
22
  <li aria-label="Publier sur Facebook" data-bs-original-title="Publier sur Facebook" data-fbpost-btn>
23
- <button type="button" class="btn btn-sm btn-link text-reset"
23
+ <button type="button" class="btn btn-sm btn-link"
24
24
  aria-label="Publier sur Facebook" style="color:#c0392b;">
25
25
  <i class="fab fa-facebook-f"></i>
26
26
  </button>
@@ -51,6 +51,7 @@
51
51
 
52
52
  $(window).on('action:composer.loaded', async function (ev, data) {
53
53
  try {
54
+ if (data && data.tid) return; // reply to existing topic, not the first post
54
55
  const $composer = data && data.composer ? $(data.composer) : $('.composer');
55
56
  if (!$composer || !$composer.length) return;
56
57
  const perm = await canPost();