Commit Graph
3429 Commits
Author SHA1 Message Date
binwiederhier a4c836b531 Refine 2026-02-20 15:36:12 -05:00
binwiederhier e818b063f7 Fmt 2026-02-20 08:25:32 -05:00
binwiederhier 039d555689 Fix tests 2026-02-20 08:19:25 -05:00
binwiederhier 209d5a4c62 Update parallelism 2026-02-19 22:42:08 -05:00
binwiederhier bf265449ac Docs 2026-02-19 22:38:27 -05:00
binwiederhier 4cbd80c68e Use one PG connection, add support for connection params 2026-02-19 22:34:53 -05:00
binwiederhier 305e3fc9af DB conn to 25 2026-02-19 21:36:09 -05:00
binwiederhier 9e4a48b058 Make server tests also run against postgres 2026-02-19 20:48:01 -05:00
binwiederhier 939b3d1117 Fix lint, make pipeline use psotgres 2026-02-18 21:07:31 -05:00
binwiederhier 9cc9891f49 Add postgres to pipeline 2026-02-18 20:55:03 -05:00
binwiederhier 0d1f3444f2 fmt 2026-02-18 20:48:41 -05:00
binwiederhier 2716ede6e1 Extract message cache into message/ package with model/ types
Move message cache from server/message_cache.go into a dedicated
message/ package with Store interface, SQLite and PostgreSQL
implementations. Extract shared types into model/ package.
2026-02-18 20:22:44 -05:00
binwiederhier ae5e1fe8d8 Merge branch 'postgres-webpush' into postgres-webpush+user 2026-02-17 20:15:27 -05:00
binwiederhier e3a402ed95 Make user tests work for postgres and sqlite 2026-02-17 20:14:45 -05:00
binwiederhier 1abc1005d0 Re-org 2026-02-17 12:04:51 -05:00
binwiederhier 909c3fe17b Add Store-level unit tests for SQLite and PostgreSQL backends
Add shared test functions in store_test.go covering all Store interface
operations (users, tokens, access control, tiers, billing, stats, etc.)
with per-backend wrappers in store_sqlite_test.go and store_postgres_test.go
following the webpush test pattern.

Fix broken isUniqueConstraintError() which used incorrect interface
assertions instead of string matching for SQLite/PostgreSQL errors.
2026-02-16 22:56:31 -05:00
binwiederhier 07c3e280bf Refactor user package to Store interface with PostgreSQL support
Extract database operations from Manager into a Store interface with
SQLite and PostgreSQL implementations using a shared commonStore.
Split SQLite migrations into store_sqlite_migrations.go, use shared
schema_version table for PostgreSQL, rename user_user/user_tier tables
to "user"/tier, and wire up database-url in CLI commands.
2026-02-16 22:39:54 -05:00
binwiederhier b567b4e904 Merge branch 'main' into postgres-webpush 2026-02-16 21:05:04 -05:00
binwiederhier 60fa50f0d5 Merge branch 'main' into postgres-webpush+user 2026-02-16 21:04:46 -05:00
binwiederhier ceda5ec3d8 Move things in user package 2026-02-16 21:04:15 -05:00
binwiederhier 3d72845c81 Tests for user package 2026-02-16 20:49:17 -05:00
binwiederhier 82e15d84bd Manual changes 2026-02-16 20:02:19 -05:00
binwiederhier 4e5f95ba0c Refactor webpush store to eliminate code duplication
Consolidate SQLite and Postgres store implementations into a single
commonStore with database-specific SQL queries passed via configuration.
This eliminates ~100 lines of duplicate code while maintaining full
functionality for both backends.

Key changes:
- Move all store methods to commonStore in store.go
- Remove sqliteStore and postgresStore wrapper structs
- Refactor SQLite to use QueryRow() pattern like Postgres
- Pass database-specific queries via storeQueries struct
- Make store types unexported, only expose Store interface

All tests pass for both SQLite and PostgreSQL backends.
2026-02-16 19:53:34 -05:00
binwiederhier 869b972a50 Manual review 2026-02-16 19:12:14 -05:00
binwiederhier bdd20197b3 Manual refinements 2026-02-16 19:06:45 -05:00
binwiederhier a8dcecdb6d Refactor webpush store tests and add coverage
- Add SetSubscriptionUpdatedAt to Store interface, remove DB() accessor
- Rename store files to store_sqlite.go and store_postgres.go
- Use camelCase for test function names
- Add tests for upsert field updates and multi-user removal
- Use transaction in setupNewPostgresDB
- Use lowercase "excluded." in PostgreSQL upsert query
2026-02-16 18:53:12 -05:00
binwiederhier 5331437664 Unify webpush store tests across SQLite and PostgreSQL backends
Share test logic in store_test.go with thin per-backend wrappers.
Add SetSubscriptionUpdatedAt to both stores, removing the need for
raw SQL and the DB() accessor in tests.
2026-02-16 12:38:00 -05:00
binwiederhier e432bf2886 Rename PostgreSQL table prefix from wp_ to webpush_ 2026-02-16 12:13:10 -05:00
binwiederhier 0edad84d86 Merge branch 'main' of https://hosted.weblate.org/git/ntfy/web 2026-02-16 10:55:17 -05:00
Philipp C. Heckel ddf728acd1 Merge pull request #1607 from ZebMcKayhan/main
Added SIA-Server to integration list
2026-02-16 10:49:34 -05:00
Philipp C. Heckel b1d3671dbb Merge pull request #1610 from luneth/patch-1
docs: Clarify F-Droid flavor excludes Google Services
2026-02-16 09:46:51 -05:00
luneth 3e6b46ec0c Fix: Clarify F-Droid flavor excludes Google Services
Updated documentation to reflect that the F-Droid flavor automatically excludes Google Services dependencies [here](https://github.com/binwiederhier/ntfy-android/blob/33a36c4b548a42dbc712eaa9ccaa89da4201a410/app/build.gradle#L82)
2026-02-16 15:43:57 +01:00
ZebMcKayhan b16d381626 Update integrations.md
Added SIA-Server to project list.
2026-02-15 19:41:22 +01:00
Mazurky 3bd1a1ea03 Translated using Weblate (Slovak)
Currently translated at 100.0% (407 of 407 strings)

Translation: ntfy/Web app
Translate-URL: https://hosted.weblate.org/projects/ntfy/web/sk/
2026-02-13 22:09:46 +00:00
Philipp C. Heckel 7adb37b94b Merge pull request #1603 from cyqsimon/npm-override
Allow overriding `npm` binary in Makefile
2026-02-13 16:22:50 -05:00
cyqsimon bc08819525 Allow overriding npm binary in Makefile 2026-02-12 17:57:09 +08:00
binwiederhier a03a37feb1 Merge branch 'main' into release-2.17.x v2.17.0 2026-02-08 22:31:35 -05:00
binwiederhier 4cd556f5aa Copy fix 2026-02-08 22:31:22 -05:00
binwiederhier 90aeb811ff Changelog 2026-02-08 22:18:45 -05:00
binwiederhier c6ab380ea4 Merge branch '1364-copy-action' 2026-02-08 20:46:54 -05:00
binwiederhier 7860f2142c Constants 2026-02-08 15:11:06 -05:00
binwiederhier 18d5d31bd2 Merge branch 'main' of github.com:binwiederhier/ntfy 2026-02-08 14:29:04 -05:00
binwiederhier cfdc364e3f Version API endpoint 2026-02-08 14:28:27 -05:00
Philipp C. Heckel 763215ecfa Merge pull request #1595 from epifeny/fix/docker-build-include-payments
fix: add payments dir to docker build
2026-02-08 11:24:54 -08:00
binwiederhier 3f0a7b65ee Server/Web: Support "copy" action button to copy a value to the clipboard 2026-02-08 14:20:03 -05:00
binwiederhier 65050ef4dc Fix server crash (nil pointer panic) when subscriber disconnects during publish 2026-02-08 11:23:31 -05:00
binwiederhier 3647d3975c Fix panic in handleSubscribeHTTP when client disconnects during publish
Replace wlock.TryLock() with a proper Lock() + closed flag to prevent
writing to a response writer that has been cleaned up after the handler
returns. The previous TryLock approach could not guarantee the response
writer was still valid when a concurrent Publish goroutine called Flush.
2026-02-08 10:49:31 -05:00
binwiederhier 06ea1f98ac Merge branch 'main' of github.com:binwiederhier/ntfy 2026-02-08 10:29:13 -05:00
binwiederhier 2827df26ee Merge branch 'main' of https://hosted.weblate.org/git/ntfy/web 2026-02-08 10:29:03 -05:00
binwiederhier fe6ee1efa0 Web: Show red notification dot on favicon when there are unread messages 2026-02-08 10:28:46 -05:00