Skip to content

Commit cb9daef

Browse files
committed
chore(release): prepare Haven v1.1.0
1 parent fec5152 commit cb9daef

9 files changed

Lines changed: 3 additions & 1305 deletions

File tree

.dockerignore

Lines changed: 0 additions & 31 deletions
This file was deleted.

.env.example

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ CHAT_RELAY_ICON="https://i.nostr.build/6G6wW.gif"
3030
CHAT_RELAY_WOT_DEPTH=3
3131
CHAT_RELAY_WOT_REFRESH_INTERVAL_HOURS=24
3232
CHAT_RELAY_MINIMUM_FOLLOWERS=3
33-
CHAT_RELAY_ALLOW_KIND_4=false # NIP-04 is deprecated in favour of NIP-17 because kind 4 DMs leak metadata
3433

3534
## Chat Relay Rate Limiters
3635
CHAT_RELAY_EVENT_IP_LIMITER_TOKENS_PER_INTERVAL=50
@@ -79,7 +78,7 @@ INBOX_RELAY_CONNECTION_RATE_LIMITER_MAX_TOKENS=9
7978
## Import Settings
8079
IMPORT_START_DATE="2023-01-20"
8180
IMPORT_QUERY_INTERVAL_SECONDS=600
82-
IMPORT_OWNER_NOTES_FETCH_TIMEOUT_SECONDS=30
81+
IMPORT_OWNER_NOTES_FETCH_TIMEOUT_SECONDS=60
8382
IMPORT_TAGGED_NOTES_FETCH_TIMEOUT_SECONDS=120
8483
IMPORT_SEED_RELAYS_FILE="relays_import.json"
8584

@@ -98,7 +97,7 @@ S3_BUCKET_NAME="backups"
9897
BLASTR_RELAYS_FILE="relays_blastr.json"
9998

10099
## WOT Settings
101-
WOT_FETCH_TIMEOUT_SECONDS=30
100+
WOT_FETCH_TIMEOUT_SECONDS=60
102101

103102
## LOGGING
104103
HAVEN_LOG_LEVEL="INFO" # DEBUG, INFO, WARNING or ERROR

Dockerfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -276,51 +276,6 @@ Once everything is set up, the relay will be running on `localhost:3355` with th
276276
- `localhost:3355/chat`
277277
- `localhost:3355/inbox`
278278

279-
## Start the Project with Docker Compose
280-
281-
To start the project using Docker Compose, follow these steps:
282-
283-
1. Ensure Docker and Docker Compose are installed on your system.
284-
2. Navigate to the project directory.
285-
3. Ensure the `.env` file is present in the project directory and has the necessary environment variables set.
286-
4. You'll also need to expose ports 80 and 443 to the internet and set up your DNS A and AAAA (if you are using IPv6)
287-
records to point to your server's IP address.
288-
5. (Optional) You can also change the paths of the `blossom`, `db`, and `templates` folders in the `compose.yml` file.
289-
290-
```yaml
291-
volumes:
292-
- ./blossom:/haven/blossom # only change the left side before the colon
293-
- ./db:/haven/db
294-
- ./templates:/haven/templates
295-
```
296-
6. (Optional) Nginx is pre-configured to reject uploads larger than 100MB. If you want to change this, modify the `client_max_body_size`
297-
directive in the `nginx/haven_proxy.conf file`.
298-
299-
```nginx
300-
client_max_body_size 0;
301-
```
302-
303-
7. Run the following command:
304-
305-
```sh
306-
# in foreground
307-
docker compose up --build
308-
# in background
309-
docker compose up --build -d
310-
```
311-
312-
8. For updating the relay, run the following commands:
313-
314-
```sh
315-
git pull
316-
docker compose down
317-
docker compose build
318-
# in foreground
319-
docker compose up
320-
# in background
321-
docker compose up -d
322-
```
323-
324279
## Database
325280

326281
Haven currently supports [BadgerDB](https://github.com/dgraph-io/badger) and [LMDB](https://www.symas.com/mdb) as embedded

compose.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ type Config struct {
5151
ChatRelayWotDepth int `json:"chat_relay_wot_depth"`
5252
ChatRelayWotRefreshIntervalHours int `json:"chat_relay_wot_refresh_interval_hours"`
5353
ChatRelayMinimumFollowers int `json:"chat_relay_minimum_followers"`
54-
ChatRelayAllowKind4 bool `json:"chat_relay_allow_kind_4"`
5554
OutboxRelayName string `json:"outbox_relay_name"`
5655
OutboxRelayNpub string `json:"outbox_relay_npub"`
5756
OutboxRelayDescription string `json:"outbox_relay_description"`
@@ -100,7 +99,6 @@ func loadConfig() Config {
10099
ChatRelayWotDepth: getEnvInt("CHAT_RELAY_WOT_DEPTH", 0),
101100
ChatRelayWotRefreshIntervalHours: getEnvInt("CHAT_RELAY_WOT_REFRESH_INTERVAL_HOURS", 0),
102101
ChatRelayMinimumFollowers: getEnvInt("CHAT_RELAY_MINIMUM_FOLLOWERS", 0),
103-
ChatRelayAllowKind4: getEnvBool("CHAT_RELAY_ALLOW_KIND_4", false),
104102
OutboxRelayName: getEnv("OUTBOX_RELAY_NAME"),
105103
OutboxRelayNpub: getEnv("OUTBOX_RELAY_NPUB"),
106104
OutboxRelayDescription: getEnv("OUTBOX_RELAY_DESCRIPTION"),

init.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,6 @@ func initRelays() {
257257
nostr.KindSimpleGroupRoles,
258258
}
259259

260-
if config.ChatRelayAllowKind4 {
261-
allowedKinds = append(allowedKinds, nostr.KindEncryptedDirectMessage)
262-
}
263-
264260
chatRelay.RejectEvent = append(chatRelay.RejectEvent, func(ctx context.Context, event *nostr.Event) (bool, string) {
265261
for _, kind := range allowedKinds {
266262
if event.Kind == kind {
@@ -437,7 +433,7 @@ func initRelays() {
437433
return true, "you must be in the web of trust to post to this relay"
438434
}
439435

440-
if event.Kind == nostr.KindEncryptedDirectMessage && !config.ChatRelayAllowKind4 {
436+
if event.Kind == nostr.KindEncryptedDirectMessage {
441437
return true, "only gift wrapped DMs are supported"
442438
}
443439

nginx/haven_proxy.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)