mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-24 17:30:39 +01:00
Compare commits
8 Commits
renovate/s
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f9f2dff2f | ||
|
|
59dd1ca607 | ||
|
|
d03137128c | ||
|
|
da79582148 | ||
|
|
550411fb58 | ||
|
|
1305faa838 | ||
|
|
d505301fa0 | ||
|
|
9f8d50706e |
@@ -12,6 +12,7 @@ set_defaults() {
|
||||
export SETUP="${SETUP:-}"
|
||||
export PACKAGE_MANAGER="${PACKAGE_MANAGER:-npm}"
|
||||
export OVERRIDE_UPDATE_LOCK="${OVERRIDE_UPDATE_LOCK:-false}"
|
||||
export NODEBB_ADDITIONAL_PLUGINS="${NODEBB_ADDITIONAL_PLUGINS:-}"
|
||||
}
|
||||
|
||||
# Function to check if a directory exists and is writable
|
||||
@@ -172,6 +173,33 @@ debug_log() {
|
||||
echo "DEBUG: $message"
|
||||
}
|
||||
|
||||
install_additional_plugins() {
|
||||
if [[ ! -z ${NODEBB_ADDITIONAL_PLUGINS} ]]; then
|
||||
export START_BUILD="true"
|
||||
for plugin in "${NODEBB_ADDITIONAL_PLUGINS[@]}"; do
|
||||
echo "Installing additional plugin ${plugin}..."
|
||||
case "$PACKAGE_MANAGER" in
|
||||
yarn) yarn install || {
|
||||
echo "Failed to install plugin ${plugin} with yarn"
|
||||
exit 1
|
||||
} ;;
|
||||
npm) npm install || {
|
||||
echo "Failed to install plugin ${plugin} with npm"
|
||||
exit 1
|
||||
} ;;
|
||||
pnpm) pnpm install || {
|
||||
echo "Failed to install plugin ${plugin} with pnpm"
|
||||
exit 1
|
||||
} ;;
|
||||
*)
|
||||
echo "Unknown package manager: $PACKAGE_MANAGER"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
set_defaults
|
||||
@@ -182,12 +210,14 @@ main() {
|
||||
debug_log "PACKAGE_MANAGER: $PACKAGE_MANAGER"
|
||||
debug_log "CONFIG location: $CONFIG"
|
||||
debug_log "START_BUILD: $START_BUILD"
|
||||
debug_log "NODEBB_ADDITIONAL_PLUGINS: ${NODEBB_ADDITIONAL_PLUGINS}"
|
||||
|
||||
if [ -n "$SETUP" ]; then
|
||||
start_setup_session "$CONFIG"
|
||||
fi
|
||||
|
||||
if [ -f "$CONFIG" ]; then
|
||||
install_additional_plugins
|
||||
start_forum "$CONFIG" "$START_BUILD"
|
||||
else
|
||||
start_installation_session "$NODEBB_INIT_VERB" "$CONFIG"
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"autoprefixer": "10.4.22",
|
||||
"bcryptjs": "3.0.3",
|
||||
"benchpressjs": "2.5.5",
|
||||
"body-parser": "2.2.0",
|
||||
"body-parser": "2.2.1",
|
||||
"bootbox": "6.0.4",
|
||||
"bootstrap": "5.3.8",
|
||||
"bootswatch": "5.3.8",
|
||||
@@ -96,14 +96,14 @@
|
||||
"mousetrap": "1.6.5",
|
||||
"multer": "2.0.2",
|
||||
"nconf": "0.13.0",
|
||||
"nodebb-plugin-2factor": "7.6.0",
|
||||
"nodebb-plugin-2factor": "7.6.1",
|
||||
"nodebb-plugin-composer-default": "10.3.1",
|
||||
"nodebb-plugin-dbsearch": "6.3.4",
|
||||
"nodebb-plugin-emoji": "6.0.5",
|
||||
"nodebb-plugin-emoji-android": "4.1.1",
|
||||
"nodebb-plugin-link-preview": "2.1.5",
|
||||
"nodebb-plugin-markdown": "13.2.2",
|
||||
"nodebb-plugin-mentions": "4.8.3",
|
||||
"nodebb-plugin-mentions": "4.8.4",
|
||||
"nodebb-plugin-spam-be-gone": "2.3.2",
|
||||
"nodebb-plugin-web-push": "0.7.6",
|
||||
"nodebb-rewards-essentials": "1.0.2",
|
||||
@@ -203,4 +203,4 @@
|
||||
"url": "https://github.com/barisusakli"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ define('forum/groups/details', [
|
||||
case 'toggleOwnership':
|
||||
api[isOwner ? 'del' : 'put'](`/groups/${ajaxify.data.group.slug}/ownership/${uid}`, {}).then(() => {
|
||||
ownerFlagEl.toggleClass('invisible');
|
||||
userRow.attr('data-isowner', isOwner ? '0' : '1');
|
||||
}).catch(alerts.error);
|
||||
break;
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
|
||||
if (!hasTid && options.cid) {
|
||||
// New topic, have category announce it
|
||||
activitypub.out.announce.topic(tid);
|
||||
await activitypub.out.announce.topic(tid);
|
||||
}
|
||||
|
||||
return { tid, count };
|
||||
|
||||
@@ -58,13 +58,12 @@ connection.connect = async function (options) {
|
||||
winston.error(err.stack);
|
||||
reject(err);
|
||||
});
|
||||
cxn.on('ready', () => {
|
||||
|
||||
cxn.connect().then(() => {
|
||||
// back-compat with node_redis
|
||||
cxn.batch = cxn.multi;
|
||||
resolve(cxn);
|
||||
});
|
||||
cxn.connect().then(() => {
|
||||
winston.info('Connected to Redis successfully');
|
||||
resolve(cxn);
|
||||
}).catch((err) => {
|
||||
winston.error('Error connecting to Redis:', err);
|
||||
});
|
||||
|
||||
@@ -164,8 +164,9 @@ describe('FEPs', () => {
|
||||
});
|
||||
pid = id;
|
||||
({ activity } = await helpers.mocks.create(note));
|
||||
console.log('before inbox create', activitypub._sent);
|
||||
await activitypub.inbox.create({ body: activity });
|
||||
|
||||
console.log('after inbox create', activitypub._sent);
|
||||
const activities = Array.from(activitypub._sent);
|
||||
|
||||
const test1 = activities.some((activity) => {
|
||||
@@ -174,14 +175,13 @@ describe('FEPs', () => {
|
||||
activity.object && activity.object.type === 'Create' &&
|
||||
activity.object.object && activity.object.object.type === 'Note';
|
||||
});
|
||||
|
||||
assert(test1);
|
||||
const test2 = activities.some((activity) => {
|
||||
[, activity] = activity;
|
||||
return activity.type === 'Announce' &&
|
||||
activity.object && activity.object.type === 'Note';
|
||||
});
|
||||
|
||||
assert(test1 && test2);
|
||||
assert(test2);
|
||||
});
|
||||
|
||||
it('should federate out an Announce(Create(Note)) on reply', async () => {
|
||||
|
||||
Reference in New Issue
Block a user