docs: update deployment paths and bump version

- add deployment paths table to README
- update installation notes to reference deployment paths
- bump version to 1.1.5
- update nextcloud dependency range (33-35)
- update author homepage and remove email
- remove --prefer-dist flag in ci.yml
- delete img/app (copy).svg
This commit is contained in:
kyle
2026-06-14 22:07:34 -07:00
parent df930de6cd
commit 5f703e0fa9
6 changed files with 26 additions and 118 deletions
+5 -1
View File
@@ -1,5 +1,9 @@
name: CI name: CI
# TODO: Check if we can remove composer.json — CI currently uses `composer install`
# and `composer test` (wrappers around `phpunit` and `php -l`). If CI can use
# direct commands, composer.json can be dropped (no runtime deps needed).
on: on:
push: push:
branches: branches:
@@ -24,7 +28,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
working-directory: ./nc_bot_webhooks working-directory: ./nc_bot_webhooks
run: composer install --prefer-dist run: composer install
- name: Lint PHP files - name: Lint PHP files
working-directory: ./nc_bot_webhooks working-directory: ./nc_bot_webhooks
+15 -4
View File
@@ -75,9 +75,20 @@ Go to **Settings → Admin → nc_bot_webhooks**:
--- ---
### Deployment Paths
The table below lists common Nextcloud install locations. Replace `/var/www/html/custom_apps/` with your environment's path in all commands below.
| Environment | Nextcloud root | App path | Data dir |
|---|---|---|---|
| Docker (standard) | `/var/www/html/` | `/var/www/html/custom_apps/` | `/var/www/html/data/` |
| TrueNAS Scale (app) | `/var/www/html/` | `/var/www/html/custom_apps/` | configurable (set at install) |
| Ubuntu/deb package | `/var/www/nextcloud/` | `/var/www/nextcloud/custom_apps/` | `/var/www/nextcloud/data/` |
| Manual LAMP (official) | `/var/www/nextcloud/` | `/var/www/nextcloud/custom_apps/` | configurable (set in config.php) |
### Updating using git ### Updating using git
> **Note:** On a standard TrueNAS Scale Nextcloud Docker install, the app is located at `/var/www/html/custom_apps/nc_bot_webhooks/`. Adjust the paths below to match your deployment. > **Note:** The paths below assume a Docker install. See [Deployment Paths](#deployment-paths) for your environment.
```bash ```bash
cd /var/www/html/custom_apps/nc_bot_webhooks cd /var/www/html/custom_apps/nc_bot_webhooks
@@ -93,7 +104,7 @@ php occ maintenance:repair
### Local update ### Local update
> **Note:** The paths below are specific to a TrueNAS Scale Nextcloud Docker install. Adjust them to match your deployment. > **Note:** The paths below assume a standard Docker install (`/var/www/html/`). See [Deployment Paths](#deployment-paths) for environment-specific adjustments.
This workflow is for when you keep your local development copy synced to your server via the Nextcloud desktop client. Edit files locally, then deploy with the script below. This workflow is for when you keep your local development copy synced to your server via the Nextcloud desktop client. Edit files locally, then deploy with the script below.
@@ -116,7 +127,7 @@ php occ config:app:delete nc_bot_webhooks routes 2>/dev/null || true
php occ maintenance:repair php occ maintenance:repair
``` ```
> **Note:** The path `"/var/www/html/data/<username>/files/<Path on your nextcloud sync>/nc_bot_webhooks/"` is where your Nextcloud user's synced files land on the server (TrueNAS Docker path). Replace `<username>` with your Nextcloud username, and adjust `<Path on your nextcloud sync>/nc_bot_webhooks/` to match the directory you are syncing to. > **Note:** The path `"/var/www/html/data/<username>/files/<Path on your nextcloud sync>/nc_bot_webhooks/"` is where your Nextcloud user's synced files land on the server. Replace `/var/www/html/data` with your environment's data dir from [Deployment Paths](#deployment-paths).
--- ---
@@ -382,7 +393,7 @@ Or via `occ`:
php occ config:app:set --value=0 core log_level php occ config:app:set --value=0 core log_level
``` ```
The default log file on a TrueNAS Scale Nextcloud Docker install is `/var/www/html/data/nextcloud.log`. Adjust the path if your data directory is elsewhere. The default log file on a TrueNAS Scale Nextcloud Docker install is `/var/www/html/data/nextcloud.log`. Adjust based on your environment's data dir from [Deployment Paths](#deployment-paths).
### Diagnostic grep examples ### Diagnostic grep examples
+3 -3
View File
@@ -5,14 +5,14 @@
<name>nc_bot_webhooks</name> <name>nc_bot_webhooks</name>
<summary>Discord webhook bridge for Nextcloud Talk with image support</summary> <summary>Discord webhook bridge for Nextcloud Talk with image support</summary>
<description>Accepts Discord webhook-style JSON payloads and posts them into Nextcloud Talk rooms, preserving image attachments. Each room gets its own webhook URL with an auth token for security.</description> <description>Accepts Discord webhook-style JSON payloads and posts them into Nextcloud Talk rooms, preserving image attachments. Each room gets its own webhook URL with an auth token for security.</description>
<version>1.1.0</version> <version>1.1.5</version>
<licence>AGPL-3.0-or-later</licence> <licence>AGPL-3.0-or-later</licence>
<author homepage="https://github.com/Mr-Newlove/nc_bot_webhooks/kyle">Kyle</author> <author homepage="https://emberlab.ca">Kyle</author>
<namespace>Ncbotwebhooks</namespace> <namespace>Ncbotwebhooks</namespace>
<category>integration</category> <category>integration</category>
<dependencies> <dependencies>
<nextcloud min-version="33" max-version="33"/> <nextcloud min-version="33" max-version="35"/>
<app>spreed</app> <app>spreed</app>
</dependencies> </dependencies>
+2
View File
@@ -7,6 +7,8 @@
"OCA\\Ncbotwebhooks\\": "../lib/" "OCA\\Ncbotwebhooks\\": "../lib/"
} }
}, },
// NOTE: This autoload path is for dev tooling (phpunit) only.
// Nextcloud apps use their own autoloader — do not rely on this for production.
"require-dev": { "require-dev": {
"phpunit/phpunit": "^10.0" "phpunit/phpunit": "^10.0"
}, },
-110
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

+1
View File
@@ -242,6 +242,7 @@ document.addEventListener('DOMContentLoaded', function () {
authTokensState[roomToken] = []; authTokensState[roomToken] = [];
} }
// Use URL-safe base64 (no +, /, = characters) // Use URL-safe base64 (no +, /, = characters)
// TODO: Switch to server-side token generation for higher security (client-side Math.random() is not cryptographically secure)
var raw = Math.random().toString(36).substring(2) + Date.now().toString(36); var raw = Math.random().toString(36).substring(2) + Date.now().toString(36);
var token = btoa(raw).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); var token = btoa(raw).replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
authTokensState[roomToken].push(token); authTokensState[roomToken].push(token);