nodebb-plugin-facebook-post 1.0.17 → 1.0.18
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/CLAUDE.md +2 -3
- package/library.js +0 -2
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -22,7 +22,6 @@ There is no build step for this plugin. NodeBB handles asset bundling.
|
|
|
22
22
|
- `NODEBB_FB_PAGE_ID` – Facebook Page ID
|
|
23
23
|
- `NODEBB_FB_PAGE_ACCESS_TOKEN` – Page access token
|
|
24
24
|
- `NODEBB_FB_GRAPH_VERSION` – optional, defaults to `v25.0`
|
|
25
|
-
- `NODEBB_FB_ALLOWED_GROUPS` – comma-separated NodeBB group names allowed to use the feature (e.g. `Staff,Communication`); empty = nobody
|
|
26
25
|
|
|
27
26
|
## Architecture
|
|
28
27
|
|
|
@@ -52,8 +51,8 @@ There is no build step for this plugin. NodeBB handles asset bundling.
|
|
|
52
51
|
|
|
53
52
|
### Settings Split
|
|
54
53
|
|
|
55
|
-
- **Sensitive** (env vars, never stored in DB): `fbPageId`, `fbPageAccessToken`, `fbGraphVersion
|
|
56
|
-
- **Non-sensitive** (stored in NodeBB DB via `meta.settings` with key `facebook-post`): `enabled`, `includeExcerpt`, `excerptMaxLen`, `categoriesWhitelist`, `minimumReputation`, `maxImages`, `enablePlaceTagging`
|
|
54
|
+
- **Sensitive** (env vars, never stored in DB): `fbPageId`, `fbPageAccessToken`, `fbGraphVersion`
|
|
55
|
+
- **Non-sensitive** (stored in NodeBB DB via `meta.settings` with key `facebook-post`): `enabled`, `includeExcerpt`, `excerptMaxLen`, `categoriesWhitelist`, `minimumReputation`, `maxImages`, `enablePlaceTagging`, `allowedGroups`
|
|
57
56
|
|
|
58
57
|
Both are merged in `loadSettings()`, which is called on each relevant request to pick up live DB changes without restart.
|
|
59
58
|
|
package/library.js
CHANGED
|
@@ -39,7 +39,6 @@ function readEnv() {
|
|
|
39
39
|
fbGraphVersion: trimStr(env.NODEBB_FB_GRAPH_VERSION) || 'v25.0',
|
|
40
40
|
fbPageId: trimStr(env.NODEBB_FB_PAGE_ID),
|
|
41
41
|
fbPageAccessToken: trimStr(env.NODEBB_FB_PAGE_ACCESS_TOKEN),
|
|
42
|
-
allowedGroups: trimStr(env.NODEBB_FB_ALLOWED_GROUPS || ''),
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
|
|
@@ -59,7 +58,6 @@ async function loadSettings() {
|
|
|
59
58
|
settings.fbGraphVersion = env.fbGraphVersion;
|
|
60
59
|
settings.fbPageId = env.fbPageId;
|
|
61
60
|
settings.fbPageAccessToken = env.fbPageAccessToken;
|
|
62
|
-
settings.allowedGroups = env.allowedGroups;
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
function getForumBaseUrl() {
|
package/package.json
CHANGED