refactor: rename app from ncdiscordhook to nc_bot_webhooks

- Update namespace from OCA\NCdiscordhook to OCA\Ncbotwebhooks
- Update app ID, name, and namespace in appinfo/info.xml
- Update composer.json and autoload files
- Update CLI command names from ncdiscordhook:* to nc_bot_webhooks:*
- Update image directory name to nc_bot_webhooks-images
- Update documentation in README.md and INSTALL.md
- Update JavaScript APP_ID and navigation provider paths
- Update admin settings and controller app references
This commit is contained in:
kyle
2026-06-12 18:30:12 -07:00
parent 98e044ede7
commit 19241c842d
14 changed files with 138 additions and 138 deletions
+21 -21
View File
@@ -1,4 +1,4 @@
# NCdiscordhook — Installation Guide
# NCbotwebhooks — Installation Guide
## Prerequisites
@@ -33,24 +33,24 @@ The bot must have admin privileges to list all Talk rooms. Grant admin access:
1. Log in to Nextcloud as **admin**
2. Go to **Settings → talk-bot → Devices & sessions**
3. Click **Add device** and give it a name (e.g., "NCdiscordhook")
3. Click **Add device** and give it a name (e.g., "NCbotwebhooks")
4. Copy the generated device password — you'll need this in Step 3
## Step 2: Install the app
### Option A: From the web UI (recommended)
1. ZIP only the `ncdiscordhook` directory (not the parent folder):
1. ZIP only the `nc_bot_webhooks` directory (not the parent folder):
```bash
cd /path/to/ncdiscordhook
zip -r ../ncdiscdhook.zip .
cd /path/to/nc_bot_webhooks
zip -r ../nc_bot_webhooks.zip .
```
2. Upload via web UI:
- Go to **Apps → Apps management** (or **Administration → Apps**)
- Click **Upload app** (or **Download and enable** → upload the ZIP)
- Select `ncdiscdhook.zip`
- Select `nc_bot_webhooks.zip`
- The app will install and enable automatically
### Option B: From the command line
@@ -59,20 +59,20 @@ zip -r ../ncdiscdhook.zip .
cd /path/to/nextcloud/apps
git clone https://github.com/Mr-Newlove/nc_bot_webhooks.git
# or copy the directory manually:
# cp -r /path/to/ncdiscordhook /path/to/nextcloud/apps/ncdiscordhook
# cp -r /path/to/nc_bot_webhooks /path/to/nextcloud/apps/nc_bot_webhooks
```
Enable the app:
```bash
cd /path/to/nextcloud
php occ app:enable ncdiscordhook
php occ app:enable nc_bot_webhooks
```
## Step 3: Configure the app
1. Log in to Nextcloud as **admin**
2. Go to **Settings → Admin → NCdiscordhook**
2. Go to **Settings → Admin → NCbotwebhooks**
3. **Bot App Password** — Paste the device password you generated in Step 1
4. **Default Sender Name** — Set the name that appears as the message sender (default: "Webhook Bot")
5. **Image Retention** — Set how many days to keep uploaded images (default: 90)
@@ -86,7 +86,7 @@ php occ app:enable ncdiscordhook
1. For Discord: go to **Channel Settings → Integrations → Webhooks**, create a new webhook, and set the Webhook URL to:
```
https://your-nextcloud-server/apps/ncdiscordhook/discord-webhook/<room-token>/<auth-token>
https://your-nextcloud-server/apps/nc_bot_webhooks/discord-webhook/<room-token>/<auth-token>
```
Replace `<room-token>` and `<auth-token>` with the values shown in the Nextcloud admin settings for the selected room.
@@ -102,8 +102,8 @@ Test with curl:
```bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"content":"Test message from NCdiscordhook","username":"CI Bot"}' \
https://your-nextcloud-server/apps/ncdiscordhook/discord-webhook/<room-token>/<auth-token>
-d '{"content":"Test message from NCbotwebhooks","username":"CI Bot"}' \
https://your-nextcloud-server/apps/nc_bot_webhooks/discord-webhook/<room-token>/<auth-token>
```
## Apprise webhook
@@ -111,7 +111,7 @@ curl -X POST \
For Apprise integrations, use the `/apprise-webhook/` endpoint with the same room-token and auth-token:
```
https://your-nextcloud-server/apps/ncdiscordhook/apprise-webhook/<room-token>/notify/<auth-token>
https://your-nextcloud-server/apps/nc_bot_webhooks/apprise-webhook/<room-token>/notify/<auth-token>
```
Note: the `notify` segment is required — Apprise's `apprises://` URL scheme inserts it in the path.
@@ -122,8 +122,8 @@ Apprise sends a different JSON format (`title`, `body`, `type`, `attachments`)
- **"talk-bot user not found"** — The `talk-bot` user doesn't exist. Re-run Step 1.
- **"Bot password not configured"** — You haven't entered the bot password in the admin settings, or it was cleared. Re-enter it in Step 3.
- **Messages not appearing** — Check the Nextcloud log (`data/nextcloud.log` or Settings → Admin → Logging) for errors from the `ncdiscordhook` app.
- **Image upload fails** — Verify the bot user has file storage quota and the `NCdiscordhook-images` folder can be created.
- **Messages not appearing** — Check the Nextcloud log (`data/nextcloud.log` or Settings → Admin → Logging) for errors from the `nc_bot_webhooks` app.
- **Image upload fails** — Verify the bot user has file storage quota and the `NCbotwebhooks-images` folder can be created.
## Security Notes
@@ -138,25 +138,25 @@ Apprise sends a different JSON format (`title`, `body`, `type`, `attachments`)
### Debug endpoint
The `/apps/ncdiscordhook/debug` endpoint exposes internal configuration,
The `/apps/nc_bot_webhooks/debug` endpoint exposes internal configuration,
database schema, and bot credentials. It is **disabled by default**.
```bash
# Check status
php occ ncdiscordhook:debug:status
php occ nc_bot_webhooks:debug:status
# Enable (WARNING: exposes sensitive data)
php occ ncdiscordhook:debug:enable
php occ nc_bot_webhooks:debug:enable
# Disable (default)
php occ ncdiscordhook:debug:disable
php occ nc_bot_webhooks:debug:disable
# Toggle current state
php occ ncdiscordhook:debug:toggle
php occ nc_bot_webhooks:debug:toggle
```
After troubleshooting, disable it immediately:
```bash
php occ ncdiscordhook:debug:disable
php occ nc_bot_webhooks:debug:disable
```