Commit Graph
3446 Commits
Author SHA1 Message Date
binwiederhier 4b6979aa89 Move model constants 2026-02-21 10:42:34 -05:00
binwiederhier c76e39bb0e Manual updates 2026-02-21 10:36:09 -05:00
binwiederhier b82e1c3915 Release notes 2026-02-21 10:02:27 -05:00
binwiederhier 07e60ba041 Merge branch 'main' into postgres-support 2026-02-21 09:59:55 -05:00
binwiederhier 4e22e7f4c8 Release notes 2026-02-21 09:58:52 -05:00
binwiederhier cf3ae187ce Merge branch 'main' of https://hosted.weblate.org/git/ntfy/web 2026-02-21 09:56:33 -05:00
Philipp C. Heckel d19b825192 Merge pull request #1620 from uzkikh/fix/smtp-html-br-linebreaks
fix(smtp): preserve <br> line breaks in HTML emails
2026-02-21 09:56:24 -05:00
Ivan Uzkikh 2e499389fc fix(smtp): preserve <br> line breaks in HTML emails
HTML-only emails (e.g. from Synology DSM 7.3 Task Scheduler) use <br>
tags for line breaks. The existing implementation passed the raw HTML
body to bluemonday with AddSpaceWhenStrippingTag(true), which replaced
every tag including <br> with a space, causing all content to appear
on a single unreadable line.

Fix: convert <br> tags to newlines before stripping HTML, so line break
semantics are preserved in the notification body.

Resolves the gap noted in #690 ("very sub-par" HTML support).
2026-02-21 14:44:06 +01:00
binwiederhier 7c69a76345 Docs 2026-02-20 16:56:47 -05:00
binwiederhier a28d8e7924 Update docs, manual changes 2026-02-20 16:36:41 -05:00
binwiederhier 13a3062a7f Re-add comments 2026-02-20 16:15:07 -05:00
binwiederhier eb6e1ac44a Docs 2026-02-20 15:57:47 -05:00
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
Philipp C. Heckel 93cd7f99f8 Merge pull request #1618 from PanderMusubi/doc_zabbix
add zabbix-ntfy to intergration doc
2026-02-19 11:00:21 -05:00
PanderMusubi 28e85df36e add zabbix-ntfy to intergration doc 2026-02-19 15:47:49 +01: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
Philipp C. Heckel 2bc7b5217b Merge pull request #1615 from benkenawell/example/zsh-terminal
Add comment for zsh users in the terminal example
2026-02-18 20:12:49 -05:00
Benjamin Kenawell 046c0e8c79 Add comment for zsh users in the terminal example
Bash and Zsh terminals' history works slightly different. In bash, the
current command is in the history already. In zsh, the
history command does not have the currently running command in it.  But
it does set the HISTCMD variable to the entry number for the current
command. So we can load the current command with `history "$HISTCMD"` in
zsh and apply the same sed filter to get the same result as the bash
`history | tail -n1` command.

I think it makes more sense to leave this as a comment in the current
example than to create a new example, since it otherwise works the exact
same.  I've added this to my workflow locally!
2026-02-18 08:07:08 -05:00
Yaron Shahrabani 652b2097ad Translated using Weblate (Hebrew)
Currently translated at 17.4% (71 of 407 strings)

Translation: ntfy/Web app
Translate-URL: https://hosted.weblate.org/projects/ntfy/web/he/
2026-02-18 13:09:47 +01: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