docs: push notification setup in README, fix VAPID_SUBJECT example
- .env.example: VAPID_SUBJECT without mailto: prefix (library adds it) - README: VAPID env vars in table, push notification setup section - README: add dm/ to project structure, keygen instructions - README: iOS tap-gesture requirement and Android battery optimization notes
This commit is contained in:
+1
-1
@@ -20,6 +20,6 @@ LIVEKIT_API_SECRET=<gener...n
|
|||||||
# Web Push
|
# Web Push
|
||||||
VAPID_PUBLIC_KEY=<generated>
|
VAPID_PUBLIC_KEY=<generated>
|
||||||
VAPID_PRIVATE_KEY=<generated>
|
VAPID_PRIVATE_KEY=<generated>
|
||||||
VAPID_SUBJECT=mailto:admin@your.domain
|
VAPID_SUBJECT=admin@your.domain
|
||||||
# Integrations
|
# Integrations
|
||||||
GIPHY_API_KEY=your_giphy_api_key_here
|
GIPHY_API_KEY=your_giphy_api_key_here
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ dumpsterChat/
|
|||||||
│ ├── invite/ # Server invite links
|
│ ├── invite/ # Server invite links
|
||||||
│ ├── bot/ # Bot framework, auth, commands
|
│ ├── bot/ # Bot framework, auth, commands
|
||||||
│ ├── webhook/ # Incoming webhooks
|
│ ├── webhook/ # Incoming webhooks
|
||||||
|
│ ├── dm/ # Direct messages (conversations)
|
||||||
│ ├── push/ # Push notification sender (VAPID)
|
│ ├── push/ # Push notification sender (VAPID)
|
||||||
│ ├── permissions/ # Permission bitflags and checker
|
│ ├── permissions/ # Permission bitflags and checker
|
||||||
│ ├── moderation/ # Mute, ban, kick, slowmode, audit log
|
│ ├── moderation/ # Mute, ban, kick, slowmode, audit log
|
||||||
@@ -133,6 +134,21 @@ See `.env.example` for the full list. Key variables:
|
|||||||
| `LIVEKIT_*` | Voice/video server | No |
|
| `LIVEKIT_*` | Voice/video server | No |
|
||||||
| `GIPHY_API_KEY` | Giphy API key for GIF search | No |
|
| `GIPHY_API_KEY` | Giphy API key for GIF search | No |
|
||||||
| `MINIO_*` | File upload storage | No |
|
| `MINIO_*` | File upload storage | No |
|
||||||
|
| `VAPID_PUBLIC_KEY` | Web push public key | No (generate with `go run ./cmd/keygen`) |
|
||||||
|
| `VAPID_PRIVATE_KEY` | Web push private key | No |
|
||||||
|
| `VAPID_SUBJECT` | Contact for VAPID JWT (e.g. `admin@your.domain`) | No |
|
||||||
|
|
||||||
|
### Push Notifications
|
||||||
|
|
||||||
|
Web push uses VAPID keys. Generate a keypair:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go run ./cmd/keygen
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy the output into your `.env`. Set `VAPID_SUBJECT` to your email address **without** the `mailto:` prefix (the library adds it automatically).
|
||||||
|
|
||||||
|
Users are prompted to enable notifications on login. On iOS, the prompt requires a tap gesture, so a banner appears instead of a silent auto-subscribe. On Android, notifications deliver through FCM when Chrome is running (even in background). Ensure Chrome battery optimization is set to Unrestricted for reliable delivery when the PWA is closed.
|
||||||
|
|
||||||
## Wiki
|
## Wiki
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user