Merge branch 'main' into sandman7920/main

This commit is contained in:
binwiederhier 2023-11-18 06:28:48 -05:00
commit f64dbcb6b2
95 changed files with 2394 additions and 1023 deletions

View File

@ -11,12 +11,12 @@ jobs:
name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
go-version: '1.21.x'
-
name: Install node
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'npm'
cache-dependency-path: './web/package-lock.json'
-

View File

@ -14,12 +14,12 @@ jobs:
name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
go-version: '1.21.x'
-
name: Install node
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'npm'
cache-dependency-path: './web/package-lock.json'
-

View File

@ -11,12 +11,12 @@ jobs:
name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
go-version: '1.21.x'
-
name: Install node
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'npm'
cache-dependency-path: './web/package-lock.json'
-

3
.gitignore vendored
View File

@ -13,4 +13,5 @@ secrets/
node_modules/
.DS_Store
__pycache__
web/dev-dist/
web/dev-dist/
venv/

View File

@ -11,7 +11,9 @@ RUN apt-get update && apt-get install -y \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y \
python3-pip nodejs \
python3-pip \
python3-venv \
nodejs \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
@ -23,7 +25,7 @@ RUN make docs-deps
ADD ./mkdocs.yml .
ADD ./docs ./docs
RUN make docs-build
# web
ADD ./web/package.json ./web/package-lock.json ./web/
RUN make web-deps

View File

@ -39,8 +39,8 @@ help:
@echo " make web-deps - Install web app dependencies (npm install the universe)"
@echo " make web-build - Actually build the web app"
@echo " make web-lint - Run eslint on the web app"
@echo " make web-format - Run prettier on the web app"
@echo " make web-format-check - Run prettier on the web app, but don't change anything"
@echo " make web-fmt - Run prettier on the web app"
@echo " make web-fmt-check - Run prettier on the web app, but don't change anything"
@echo
@echo "Build documentation:"
@echo " make docs - Build the documentation"
@ -95,6 +95,7 @@ docker-dev:
--build-arg COMMIT=$(COMMIT) \
./
# Ubuntu-specific
build-deps-ubuntu:
@ -103,32 +104,27 @@ build-deps-ubuntu:
curl \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabi \
python3 \
python3-venv \
jq
which pip3 || sudo apt-get install -y python3-pip
# Documentation
docs: docs-deps docs-build
docs-build: .PHONY
@if ! /bin/echo -e "import sys\nif sys.version_info < (3,8):\n exit(1)" | python3; then \
if which python3.8; then \
echo "python3.8 $(shell which mkdocs) build"; \
python3.8 $(shell which mkdocs) build; \
else \
echo "ERROR: Python version too low. mkdocs-material needs >= 3.8"; \
exit 1; \
fi; \
else \
echo "mkdocs build"; \
mkdocs build; \
fi
docs-venv: .PHONY
python3 -m venv ./venv
docs-deps: .PHONY
pip3 install -r requirements.txt
docs-build: docs-venv
(. venv/bin/activate && mkdocs build)
docs-deps: docs-venv
(. venv/bin/activate && pip3 install -r requirements.txt)
docs-deps-update: .PHONY
pip3 install -r requirements.txt --upgrade
(. venv/bin/activate && pip3 install -r requirements.txt --upgrade)
# Web app
@ -151,10 +147,10 @@ web-deps:
web-deps-update:
cd web && npm update
web-format:
web-fmt:
cd web && npm run format
web-format-check:
web-fmt-check:
cd web && npm run format:check
web-lint:
@ -248,7 +244,7 @@ cli-build-results:
# Test/check targets
check: test web-format-check fmt-check vet web-lint lint staticcheck
check: test web-fmt-check fmt-check vet web-lint lint staticcheck
test: .PHONY
go test $(shell go list ./... | grep -vE 'ntfy/(test|examples|tools)')
@ -275,7 +271,7 @@ coverage-upload:
# Lint/formatting targets
fmt:
fmt: web-fmt
gofmt -s -w .
fmt-check:

View File

@ -2,7 +2,7 @@
# ntfy.sh | Send push notifications to your phone or desktop via PUT/POST
[![Release](https://img.shields.io/github/release/binwiederhier/ntfy.svg?color=success&style=flat-square)](https://github.com/binwiederhier/ntfy/releases/latest)
[![Go Reference](https://pkg.go.dev/badge/heckel.io/ntfy.svg)](https://pkg.go.dev/heckel.io/ntfy)
[![Go Reference](https://pkg.go.dev/badge/heckel.io/ntfy.svg)](https://pkg.go.dev/heckel.io/ntfy/v2)
[![Tests](https://github.com/binwiederhier/ntfy/workflows/test/badge.svg)](https://github.com/binwiederhier/ntfy/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/binwiederhier/ntfy)](https://goreportcard.com/report/github.com/binwiederhier/ntfy)
[![codecov](https://codecov.io/gh/binwiederhier/ntfy/branch/main/graph/badge.svg?token=A597KQ463G)](https://codecov.io/gh/binwiederhier/ntfy)
@ -155,6 +155,16 @@ account costs. Even small donations are very much appreciated. A big fat **Thank
<a href="https://github.com/spartan"><img src="https://github.com/spartan.png" width="40px" /></a>
<a href="https://github.com/alexandzors"><img src="https://github.com/alexandzors.png" width="40px" /></a>
<a href="https://github.com/dkramer95"><img src="https://github.com/dkramer95.png" width="40px" /></a>
<a href="https://github.com/YezGotIt"><img src="https://github.com/YezGotIt.png" width="40px" /></a>
<a href="https://github.com/thomasskou"><img src="https://github.com/thomasskou.png" width="40px" /></a>
<a href="https://github.com/surfernv"><img src="https://github.com/surfernv.png" width="40px" /></a>
<a href="https://github.com/richardleach"><img src="https://github.com/richardleach.png" width="40px" /></a>
<a href="https://github.com/bear"><img src="https://github.com/bear.png" width="40px" /></a>
<a href="https://github.com/cminter"><img src="https://github.com/cminter.png" width="40px" /></a>
<a href="https://github.com/bahur142"><img src="https://github.com/bahur142.png" width="40px" /></a>
<a href="https://github.com/pgwiebes"><img src="https://github.com/pgwiebes.png" width="40px" /></a>
<a href="https://github.com/ralhei"><img src="https://github.com/ralhei.png" width="40px" /></a>
<a href="https://github.com/TechMDW"><img src="https://github.com/TechMDW.png" width="40px" /></a>
I'd also like to thank JetBrains for their awesome [IntelliJ IDEA](https://www.jetbrains.com/idea/),
and [DigitalOcean](https://m.do.co/c/442b929528db) (*referral link*) for supporting the project:

View File

@ -7,8 +7,8 @@ import (
"encoding/json"
"errors"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"regexp"

View File

@ -3,9 +3,9 @@ package client_test
import (
"fmt"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/test"
"heckel.io/ntfy/v2/client"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/test"
"os"
"testing"
"time"

View File

@ -2,7 +2,7 @@ package client_test
import (
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"heckel.io/ntfy/v2/client"
"os"
"path/filepath"
"testing"

View File

@ -2,7 +2,7 @@ package client
import (
"fmt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"net/http"
"strings"
"time"

View File

@ -6,8 +6,8 @@ import (
"errors"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
)
func init() {

View File

@ -4,8 +4,8 @@ import (
"fmt"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"heckel.io/ntfy/v2/server"
"heckel.io/ntfy/v2/test"
"testing"
)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/log"
"heckel.io/ntfy/v2/log"
"os"
"regexp"
)

View File

@ -4,8 +4,8 @@ import (
"bytes"
"encoding/json"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/v2/client"
"heckel.io/ntfy/v2/log"
"os"
"strings"
"testing"

View File

@ -5,7 +5,7 @@ import (
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"gopkg.in/yaml.v2"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"os"
)

View File

@ -4,9 +4,9 @@ import (
"errors"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/client"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"io"
"os"
"os/exec"

View File

@ -3,8 +3,8 @@ package cmd
import (
"fmt"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/test"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/test"
"heckel.io/ntfy/v2/util"
"net/http"
"net/http/httptest"
"os"

View File

@ -6,7 +6,7 @@ import (
"errors"
"fmt"
"github.com/stripe/stripe-go/v74"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
"io/fs"
"math"
"net"
@ -17,12 +17,12 @@ import (
"syscall"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/v2/log"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/server"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/server"
"heckel.io/ntfy/v2/util"
)
func init() {

View File

@ -12,15 +12,11 @@ import (
"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"heckel.io/ntfy/test"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/client"
"heckel.io/ntfy/v2/test"
"heckel.io/ntfy/v2/util"
)
func init() {
rand.Seed(time.Now().UnixMilli())
}
func TestCLI_Serve_Unix_Curl(t *testing.T) {
sockFile := filepath.Join(t.TempDir(), "ntfy.sock")
configFile := newEmptyFile(t) // Avoid issues with existing server.yml file on system

View File

@ -4,9 +4,9 @@ import (
"errors"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/client"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"os"
"os/exec"
"os/user"

View File

@ -6,8 +6,8 @@ import (
"errors"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
)
func init() {

View File

@ -3,8 +3,8 @@ package cmd
import (
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"heckel.io/ntfy/v2/server"
"heckel.io/ntfy/v2/test"
"testing"
)

View File

@ -6,8 +6,8 @@ import (
"errors"
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"net/netip"
"time"
)

View File

@ -4,8 +4,8 @@ import (
"fmt"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"heckel.io/ntfy/v2/server"
"heckel.io/ntfy/v2/test"
"regexp"
"testing"
)

View File

@ -6,13 +6,13 @@ import (
"crypto/subtle"
"errors"
"fmt"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
"os"
"strings"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
)
const (

View File

@ -3,9 +3,9 @@ package cmd
import (
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/server"
"heckel.io/ntfy/v2/test"
"heckel.io/ntfy/v2/user"
"os"
"path/filepath"
"testing"

View File

@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/v2/server"
)
func TestCLI_WebPush_GenerateKeys(t *testing.T) {

View File

@ -429,7 +429,7 @@ steps:
### XCode setup
1. Follow step 4 of [https://firebase.google.com/docs/ios/setup](Add Firebase to your Apple project) to install the
1. Follow step 4 of [Add Firebase to your Apple project](https://firebase.google.com/docs/ios/setup) to install the
`firebase-ios-sdk` in XCode, if it's not already present - you can select any packages in addition to Firebase Core / Firebase Messaging
1. Similarly, install the SQLite.swift package dependency in XCode
1. When running the debug build, ensure XCode is pointed to the connected iOS device - registering for push notifications does not work in the iOS simulators

View File

@ -2,9 +2,9 @@
<!-- This file was generated by scripts/emoji-convert.sh -->
You can [tag messages](../publish/#tags-emojis) with emojis 🥳 🎉 and other relevant strings. Matching tags are automatically
You can [tag messages](publish.md#tags-emojis) with emojis 🥳 🎉 and other relevant strings. Matching tags are automatically
converted to emojis. This is a reference of all supported emojis. To learn more about the feature, please refer to the
[tagging and emojis page](../publish/#tags-emojis).
[tagging and emojis page](publish.md#tags-emojis).
<table class="remove-md-box emoji-table"><tr>

View File

@ -135,6 +135,21 @@ You can send a message during a workflow run with curl. Here is an example sendi
${{ secrets.NTFY_URL }}
```
## Changedetection.io
ntfy is an excellent choice for getting notifications when a website has a change sent to your mobile (or desktop),
[changedetection.io](https://changedetection.io) or on GitHub ([dgtlmoon/changedetection.io](https://github.com/dgtlmoon/changedetection.io))
uses [apprise](https://github.com/caronc/apprise) library for notification integrations.
To add any ntfy(s) notification to a website change simply add the [ntfy style URL](https://github.com/caronc/apprise/wiki/Notify_ntfy)
to the notification list.
For example `ntfy://{topic}` or `ntfy://{user}:{password}@{host}:{port}/{topics}`
In your changedetection.io installation, click `Edit` > `Notifications` on a single website watch (or group) then add
the special ntfy Apprise Notification URL to the Notification List.
![ntfy alerts on website change](static/img/cdio-setup.jpg)
## Watchtower (shoutrrr)
You can use [shoutrrr](https://containrrr.dev/shoutrrr/latest/services/ntfy/) to send
[Watchtower](https://github.com/containrrr/watchtower/) notifications to your ntfy topic.

View File

@ -3,9 +3,9 @@ ntfy lets you **send push notifications to your phone or desktop via scripts fro
or POST requests. I use it to notify myself when scripts fail, or long-running commands complete.
## Step 1: Get the app
<a href="https://play.google.com/store/apps/details?id=io.heckel.ntfy"><img src="../../static/img/badge-googleplay.png"></a>
<a href="https://f-droid.org/en/packages/io.heckel.ntfy/"><img src="../../static/img/badge-fdroid.png"></a>
<a href="https://apps.apple.com/us/app/ntfy/id1625396347"><img src="../../static/img/badge-appstore.png"></a>
<a href="https://play.google.com/store/apps/details?id=io.heckel.ntfy"><img src="static/img/badge-googleplay.png"></a>
<a href="https://f-droid.org/en/packages/io.heckel.ntfy/"><img src="static/img/badge-fdroid.png"></a>
<a href="https://apps.apple.com/us/app/ntfy/id1625396347"><img src="static/img/badge-appstore.png"></a>
To [receive notifications on your phone](subscribe/phone.md), install the app, either via Google Play or F-Droid.
Once installed, open it and subscribe to a topic of your choosing. Topics don't have to explicitly be created, so just

View File

@ -14,7 +14,7 @@ We support amd64, armv7 and arm64.
1. Install ntfy using one of the methods described below
2. Then (optionally) edit `/etc/ntfy/server.yml` for the server (Linux only, see [configuration](config.md) or [sample server.yml](https://github.com/binwiederhier/ntfy/blob/main/server/server.yml))
3. Or (optionally) create/edit `~/.config/ntfy/client.yml` (for the non-root user) or `/etc/ntfy/client.yml` (for the root user), see [sample client.yml](https://github.com/binwiederhier/ntfy/blob/main/client/client.yml))
3. Or (optionally) create/edit `~/.config/ntfy/client.yml` (for the non-root user), `~/Library/Application Support/ntfy/client.yml` (for the macOS non-root user), or `/etc/ntfy/client.yml` (for the root user), see [sample client.yml](https://github.com/binwiederhier/ntfy/blob/main/client/client.yml))
To run the ntfy server, then just run `ntfy serve` (or `systemctl start ntfy` when using the deb/rpm).
To send messages, use `ntfy publish`. To subscribe to topics, use `ntfy subscribe` (see [subscribing via CLI](subscribe/cli.md)

View File

@ -24,6 +24,7 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [diun](https://crazymax.dev/diun/) - Docker Image Update Notifier
- [Cloudron](https://www.cloudron.io/store/sh.ntfy.cloudronapp.html) - Platform that makes it easy to manage web apps on your server
- [Xitoring](https://xitoring.com/docs/notifications/notification-roles/ntfy/) - Server and Uptime monitoring
- [changedetection.io](https://changedetection.io) ⭐ - Website change detection and notification
## Integration via HTTP/SMTP/etc.
@ -82,7 +83,6 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [backup-projects](https://gist.github.com/anthonyaxenov/826ba65abbabd5b00196bc3e6af76002) - Stupidly simple backup script for own projects (Shell)
- [grav-plugin-whistleblower](https://github.com/Himmlisch-Studios/grav-plugin-whistleblower) - Grav CMS plugin to get notifications via ntfy (PHP)
- [ntfy-server-status](https://github.com/filip2cz/ntfy-server-status) - Checking if server is online and reporting through ntfy (C)
- [borg-based backup](https://github.com/davidhi7/backup) - Simple borg-based backup script with notifications based on ntfy.sh or Discord webhooks (Python/Shell)
- [ntfy.sh *arr script](https://github.com/agent-squirrel/nfty-arr-script) - Quick and hacky script to get sonarr/radarr to notify the ntfy.sh service (Shell)
- [website-watcher](https://github.com/muety/website-watcher) - A small tool to watch websites for changes (with XPath support) (Python)
- [siteeagle](https://github.com/tpanum/siteeagle) - A small Python script to monitor websites and notify changes (Python)
@ -133,6 +133,9 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [ntfy-ios-url-share](https://www.icloud.com/shortcuts/be8a7f49530c45f79733cfe3e41887e6) - An iOS shortcut that lets you share URLs easily and quickly.
- [ntfy-ios-filesharing](https://www.icloud.com/shortcuts/fe948d151b2e4ae08fb2f9d6b27d680b) - An iOS shortcut that lets you share files from your share feed to a topic of your choice.
- [systemd-ntfy](https://hackage.haskell.org/package/systemd-ntfy) - monitor a set of systemd services an send a notification to ntfy.sh whenever their status changes
- [RouterOS Scripts](https://git.eworm.de/cgit/routeros-scripts/about/) - a collection of scripts for MikroTik RouterOS
- [ntfy-android-builder](https://github.com/TheBlusky/ntfy-android-builder) - Script for building ntfy-android with custom Firebase configuration (Docker/Shell)
- [jetspotter](https://github.com/vvanouytsel/jetspotter) - a tool to send notifications whenever specified types of aircraft are spotted near a specified location
## Blog + forum posts
@ -235,6 +238,7 @@ ntfy community. Thanks to everyone running a public server. **You guys rock!**
| [ntfy.envs.net](https://ntfy.envs.net) | 🇩🇪 Germany |
| [ntfy.mzte.de](https://ntfy.mzte.de/) | 🇩🇪 Germany |
| [ntfy.hostux.net](https://ntfy.hostux.net/) | 🇫🇷 France |
| [ntfy.fossman.de](https://ntfy.fossman.de/) | 🇩🇪 Germany |
Please be aware that **server operators can log your messages**. The project also cannot guarantee the reliability
and uptime of third party servers, so use of each server is **at your own discretion**.

View File

@ -1131,7 +1131,7 @@ As of today, the following actions are supported:
when the action button is tapped (only supported on Android)
* [`http`](#send-http-request): Sends HTTP POST/GET/PUT request when the action button is tapped
Here's an example of what that a notification with actions can look like:
Here's an example of what a notification with actions can look like:
<figure markdown>
![notification with actions](static/img/android-screenshot-notification-actions.png){ width=500 }

View File

@ -1273,7 +1273,7 @@ Released Dec 28, 2021
**Features & bug fixes:**
* [Publish messages via e-mail](ntfy.sh/docs/publish/#e-mail-publishing) #66
* [Publish messages via e-mail](publish.md#e-mail-publishing) #66
* Server-side work to support [unifiedpush.org](https://unifiedpush.org) #64
* Fixing the Santa bug #65
@ -1287,10 +1287,16 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
**Bug fixes + maintenance:**
* Support for HTML-only emails ([#690](https://github.com/binwiederhier/ntfy/issues/690)/[#693](https://github.com/binwiederhier/ntfy/pull/693), thanks to [@teastrainer](https://github.com/teastrainer) and [@CrazyWolf13](https://github.com/CrazyWolf13) for reporting)
* Fix ACL issue with topic patterns containing underscores ([#840](https://github.com/binwiederhier/ntfy/issues/840), thanks to [@Joe-0237](https://github.com/Joe-0237) for reporting)
* Re-add `tzdata` to Docker images for amd64 image ([#894](https://github.com/binwiederhier/ntfy/issues/894), [#307](https://github.com/binwiederhier/ntfy/pull/307))
* Add special logic to ignore `Priority` header if it resembled a RFC 9218 value ([#851](https://github.com/binwiederhier/ntfy/pull/851)/[#895](https://github.com/binwiederhier/ntfy/pull/895), thanks to [@gusdleon](https://github.com/gusdleon), see also [#351](https://github.com/binwiederhier/ntfy/issues/351), [#353](https://github.com/binwiederhier/ntfy/issues/353), [#461](https://github.com/binwiederhier/ntfy/issues/461))
* PWA: hide install prompt on macOS 14 Safari ([#899](https://github.com/binwiederhier/ntfy/pull/899), thanks to [@nihalgonsalves](https://github.com/nihalgonsalves))
* Fix web app crash in Edge for languages with underline in locale ([#922](https://github.com/binwiederhier/ntfy/pull/922)/[#912](https://github.com/binwiederhier/ntfy/issues/912)/[#852](https://github.com/binwiederhier/ntfy/issues/852), thanks to [@imkero](https://github.com/imkero))
**Additional languages:**
* Finnish (thanks to [@Seppo](https://hosted.weblate.org/user/Seppo/)
### ntfy Android app v1.16.1 (UNRELEASED)

BIN
docs/static/img/cdio-setup.jpg vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

View File

@ -190,9 +190,10 @@ format. Keepalive messages are sent as empty lines.
## WebSockets
You may also subscribe to topics via [WebSockets](https://en.wikipedia.org/wiki/WebSocket), which is also widely
supported in many languages. Most notably, WebSockets are natively supported in JavaScript. On the command line,
I recommend [websocat](https://github.com/vi/websocat), a fantastic tool similar to `socat` or `curl`, but specifically
for WebSockets.
supported in many languages. Most notably, WebSockets are natively supported in JavaScript. You may also want to
check out the [full example on GitHub](https://github.com/binwiederhier/ntfy/tree/main/examples/web-example-websocket).
On the command line, I recommend [websocat](https://github.com/vi/websocat), a fantastic tool similar to `socat`
or `curl`, but specifically for WebSockets.
The WebSockets endpoint is available at `<topic>/ws` and returns messages as JSON objects similar to the
[JSON stream endpoint](#subscribe-as-json-stream).

View File

@ -10,7 +10,7 @@ to topics via the ntfy CLI. The CLI is included in the same `ntfy` binary that c
## Install + configure
To install the ntfy CLI, simply **follow the steps outlined on the [install page](../install.md)**. The ntfy server and
client are the same binary, so it's all very convenient. After installing, you can (optionally) configure the client
by creating `~/.config/ntfy/client.yml` (for the non-root user), or `/etc/ntfy/client.yml` (for the root user). You
by creating `~/.config/ntfy/client.yml` (for the non-root user), `~/Library/Application Support/ntfy/client.yml` (for the macOS non-root user), or `/etc/ntfy/client.yml` (for the root user). You
can find a [skeleton config](https://github.com/binwiederhier/ntfy/blob/main/client/client.yml) on GitHub.
If you just want to use [ntfy.sh](https://ntfy.sh), you don't have to change anything. If you **self-host your own server**,

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ntfy.sh: WebSocket Example</title>
<meta name="robots" content="noindex, nofollow" />
<style>
body { font-size: 1.2em; line-height: 130%; }
#events { font-family: monospace; }
</style>
</head>
<body>
<h1>ntfy.sh: WebSocket Example</h1>
<p>
This is an example showing how to use <a href="https://ntfy.sh">ntfy.sh</a> with
<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket">WebSocket</a>.<br/>
This example doesn't need a server. You can just save the HTML page and run it from anywhere.
</p>
<button id="publishButton">Send test notification</button>
<p><b>Log:</b></p>
<div id="events"></div>
<script type="text/javascript">
const publishURL = `https://ntfy.sh/example`;
const subscribeURL = `wss://ntfy.sh/example/ws`;
const events = document.getElementById('events');
const websocket = new WebSocket(subscribeURL);
// Publish button
document.getElementById("publishButton").onclick = () => {
fetch(publishURL, {
method: 'POST', // works with PUT as well, though that sends an OPTIONS request too!
body: `It is ${new Date().toString()}. This is a test.`
})
};
// Incoming events
websocket.onopen = () => {
let event = document.createElement('div');
event.innerHTML = `WebSocket connected to ${subscribeURL}`;
events.appendChild(event);
};
websocket.onerror = (e) => {
let event = document.createElement('div');
event.innerHTML = `WebSocket error: Failed to connect to ${subscribeURL}`;
events.appendChild(event);
};
websocket.onmessage = (e) => {
let event = document.createElement('div');
event.innerHTML = e.data;
events.appendChild(event);
};
</script>
</body>
</html>

74
go.mod
View File

@ -1,25 +1,27 @@
module heckel.io/ntfy
module heckel.io/ntfy/v2
go 1.18
go 1.21
toolchain go1.21.3
require (
cloud.google.com/go/firestore v1.13.0 // indirect
cloud.google.com/go/storage v1.33.0 // indirect
cloud.google.com/go/firestore v1.14.0 // indirect
cloud.google.com/go/storage v1.35.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/emersion/go-smtp v0.18.0
github.com/gabriel-vasile/mimetype v1.4.2
github.com/gorilla/websocket v1.5.0
github.com/mattn/go-sqlite3 v1.14.17
github.com/gabriel-vasile/mimetype v1.4.3
github.com/gorilla/websocket v1.5.1
github.com/mattn/go-sqlite3 v1.14.18
github.com/olebedev/when v1.0.0
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.7
golang.org/x/crypto v0.13.0
golang.org/x/oauth2 v0.12.0 // indirect
golang.org/x/sync v0.3.0
golang.org/x/term v0.12.0
golang.org/x/time v0.3.0
google.golang.org/api v0.143.0
golang.org/x/crypto v0.15.0
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sync v0.5.0
golang.org/x/term v0.14.0
golang.org/x/time v0.4.0
google.golang.org/api v0.151.0
gopkg.in/yaml.v2 v2.4.0
)
@ -29,52 +31,54 @@ require github.com/pkg/errors v0.9.1 // indirect
require (
firebase.google.com/go/v4 v4.12.1
github.com/SherClockHolmes/webpush-go v1.2.0
github.com/SherClockHolmes/webpush-go v1.3.0
github.com/microcosm-cc/bluemonday v1.0.26
github.com/prometheus/client_golang v1.17.0
github.com/stripe/stripe-go/v74 v74.30.0
)
require (
cloud.google.com/go v0.110.8 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go v0.110.10 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.2 // indirect
cloud.google.com/go/longrunning v0.5.1 // indirect
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/longrunning v0.5.4 // indirect
github.com/AlekSi/pointer v1.2.0 // indirect
github.com/MicahParks/keyfunc v1.9.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emersion/go-sasl v0.0.0-20220912192320-0145f2c60ead // indirect
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/appengine/v2 v2.0.5 // indirect
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/grpc v1.58.2 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

163
go.sum
View File

@ -1,20 +1,18 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME=
cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk=
cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY=
cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM=
cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y=
cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic=
cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI=
cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=
cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA=
cloud.google.com/go/firestore v1.13.0 h1:/3S4RssUV4GO/kvgJZB+tayjhOfyAHs+KcpJgRVu/Qk=
cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8=
cloud.google.com/go/iam v1.1.2 h1:gacbrBdWcoVmGLozRuStX45YKvJtzIjJdAolzUs1sm4=
cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU=
cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI=
cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc=
cloud.google.com/go/storage v1.33.0 h1:PVrDOkIC8qQVa1P3SXGpQvfuJhN2LHOoyZvWs8D2X5M=
cloud.google.com/go/storage v1.33.0/go.mod h1:Hhh/dogNRGca7IWv1RC2YqEn0c0G77ctA/OxflYkiD8=
firebase.google.com/go/v4 v4.12.0 h1:I6dCkcWUMFNkFdWgzlf8SLWecQnKdFgJhMv5fT9l1qI=
firebase.google.com/go/v4 v4.12.0/go.mod h1:60c36dWLK4+j05Vw5XMllek3b3PCynU3BfI46OSwsUE=
cloud.google.com/go/firestore v1.14.0 h1:8aLcKnMPoldYU3YHgu4t2exrKhLQkqaXAGqT0ljrFVw=
cloud.google.com/go/firestore v1.14.0/go.mod h1:96MVaHLsEhbvkBEdZgfN+AS/GIkco1LRpH9Xp9YZfzQ=
cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI=
cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8=
cloud.google.com/go/longrunning v0.5.4 h1:w8xEcbZodnA2BbW6sVirkkoC+1gP8wS57EUUgGS0GVg=
cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI=
cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w=
cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8=
firebase.google.com/go/v4 v4.12.1 h1:tDNvobifGsx/1HSFLnM0fmNfx/CDZSgsTO2KhZtgpcs=
firebase.google.com/go/v4 v4.12.1/go.mod h1:60c36dWLK4+j05Vw5XMllek3b3PCynU3BfI46OSwsUE=
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
@ -24,8 +22,10 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/MicahParks/keyfunc v1.9.0 h1:lhKd5xrFHLNOWrDc4Tyb/Q1AJ4LCzQ48GVJyVIID3+o=
github.com/MicahParks/keyfunc v1.9.0/go.mod h1:IdnCilugA0O/99dW+/MkvlyrsX8+L8+x95xuVNtM5jw=
github.com/SherClockHolmes/webpush-go v1.2.0 h1:sGv0/ZWCvb1HUH+izLqrb2i68HuqD/0Y+AmGQfyqKJA=
github.com/SherClockHolmes/webpush-go v1.2.0/go.mod h1:w6X47YApe/B9wUz2Wh8xukxlyupaxSSEbu6yKJcHN2w=
github.com/SherClockHolmes/webpush-go v1.3.0 h1:CAu3FvEE9QS4drc3iKNgpBWFfGqNthKlZhp5QpYnu6k=
github.com/SherClockHolmes/webpush-go v1.3.0/go.mod h1:AxRHmJuYwKGG1PVgYzToik1lphQvDnqFYDqimHvwhIw=
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@ -33,23 +33,23 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ=
github.com/emersion/go-sasl v0.0.0-20220912192320-0145f2c60ead h1:fI1Jck0vUrXT8bnphprS1EoVRe2Q5CKCX8iDlpqjQ/Y=
github.com/emersion/go-sasl v0.0.0-20220912192320-0145f2c60ead/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ=
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43 h1:hH4PQfOndHDlpzYfLAAfl63E8Le6F2+EL/cdhlkyRJY=
github.com/emersion/go-sasl v0.0.0-20231106173351-e73c9f7bad43/go.mod h1:iL2twTeMvZnrg54ZoPDNfJaJaqy0xIQFuBdrLsmspwQ=
github.com/emersion/go-smtp v0.17.0 h1:tq90evlrcyqRfE6DSXaWVH54oX6OuZOQECEmhWBMEtI=
github.com/emersion/go-smtp v0.17.0/go.mod h1:qm27SGYgoIPRot6ubfQ/GpiPy/g3PaZAVRxiO/sDUgQ=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
@ -80,47 +80,50 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw=
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ=
github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas=
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI=
github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/microcosm-cc/bluemonday v1.0.26 h1:xbqSvqzQMeEHCqMi64VAs4d8uy6Mequs3rQ0k/Khz58=
github.com/microcosm-cc/bluemonday v1.0.26/go.mod h1:JyzOCs9gkyQyjs+6h10UEVSe02CGwkhd72Xdqh78TWs=
github.com/olebedev/when v1.0.0 h1:T2DZCj8HxUhOVxcqaLOmzuTr+iZLtMHsZEim7mjIA2w=
github.com/olebedev/when v1.0.0/go.mod h1:T0THb4kP9D3NNqlvCwIG4GyUioTAzEhB4RNVzig/43E=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8=
github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY=
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM=
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM=
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@ -130,8 +133,9 @@ github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpE
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stripe/stripe-go/v74 v74.30.0 h1:0Kf0KkeFnY7iRhOwvTerX0Ia1BRw+eV1CVJ51mGYAUY=
github.com/stripe/stripe-go/v74 v74.30.0/go.mod h1:f9L6LvaXa35ja7eyvP6GQswoaIPaBRvGAimAO+udbBw=
github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs=
@ -141,17 +145,18 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsr
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
golang.org/x/crypto v0.0.0-20190131182504-b8fe1690c613/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA=
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -162,18 +167,20 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0=
golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -183,21 +190,27 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU=
golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8=
golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY=
golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@ -205,14 +218,13 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
google.golang.org/api v0.142.0 h1:mf+7EJ94fi5ZcnpPy+m0Yv2dkz8bKm+UL0snTCuwXlY=
google.golang.org/api v0.142.0/go.mod h1:zJAN5o6HRqR7O+9qJUFOWrZkYE66RH+efPBdTLA4xBA=
google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA=
google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU=
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
google.golang.org/api v0.151.0 h1:FhfXLO/NFdJIzQtCqjpysWwqKk8AzGWBUhMIx67cVDU=
google.golang.org/api v0.151.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
@ -222,19 +234,19 @@ google.golang.org/appengine/v2 v2.0.5/go.mod h1:WoEXGoXNfa0mLvaH5sV3ZSGXwVmy8yf7
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13 h1:vlzZttNJGVqTsRFU9AmdnrcO1Znh8Ew9kCD//yjigk0=
google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU=
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 h1:U7+wNaVuSTaUqNvK2+osJ9ejEZxbjHHk8F2b6Hpx0AE=
google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA=
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ=
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo=
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk=
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -251,6 +263,7 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -3,7 +3,7 @@ package log
import (
"encoding/json"
"fmt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"log"
"os"
"sort"

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/cmd"
"heckel.io/ntfy/v2/cmd"
"os"
"runtime"
)

View File

@ -64,7 +64,6 @@ markdown_extensions:
- attr_list
- md_in_html
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
plugins:

View File

@ -25,9 +25,9 @@ elif [[ "$1" == *.md ]]; then
<!-- This file was generated by scripts/emoji-convert.sh -->
You can [tag messages](../publish/#tags-emojis) with emojis 🥳 🎉 and other relevant strings. Matching tags are automatically
You can [tag messages](publish.md#tags-emojis) with emojis 🥳 🎉 and other relevant strings. Matching tags are automatically
converted to emojis. This is a reference of all supported emojis. To learn more about the feature, please refer to the
[tagging and emojis page](../publish/#tags-emojis).
[tagging and emojis page](publish.md#tags-emojis).
<table class=\"remove-md-box emoji-table\"><tr>
" > "$1"

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"regexp"
"strings"
"unicode/utf8"

View File

@ -5,7 +5,7 @@ import (
"net/netip"
"time"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
)
// Defines default config settings (excluding limits, see below)

View File

@ -2,7 +2,7 @@ package server_test
import (
"github.com/stretchr/testify/assert"
"heckel.io/ntfy/server"
"heckel.io/ntfy/v2/server"
"testing"
)

View File

@ -3,7 +3,7 @@ package server
import (
"encoding/json"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/v2/log"
"net/http"
)

View File

@ -3,8 +3,8 @@ package server
import (
"errors"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"io"
"os"
"path/filepath"

View File

@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"os"
"strings"
"testing"

View File

@ -4,8 +4,8 @@ import (
"fmt"
"github.com/emersion/go-smtp"
"github.com/gorilla/websocket"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"net/http"
"strings"
"unicode/utf8"

View File

@ -10,8 +10,8 @@ import (
"time"
_ "github.com/mattn/go-sqlite3" // SQLite driver
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
)
var (

View File

@ -30,9 +30,9 @@ import (
"github.com/gorilla/websocket"
"github.com/prometheus/client_golang/prometheus/promhttp"
"golang.org/x/sync/errgroup"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
)
// Server is the main server, providing the UI and API for ntfy

View File

@ -2,9 +2,9 @@ package server
import (
"encoding/json"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"net/http"
"net/netip"
"strings"

View File

@ -3,9 +3,9 @@ package server
import (
"fmt"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/netip"
"path/filepath"

View File

@ -1,7 +1,7 @@
package server
import (
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
"net/http"
)

View File

@ -2,8 +2,8 @@ package server
import (
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"sync/atomic"
"testing"
"time"

View File

@ -8,8 +8,8 @@ import (
"firebase.google.com/go/v4/messaging"
"fmt"
"google.golang.org/api/option"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"strings"
)

View File

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
"net/netip"
"strings"
"sync"

View File

@ -1,8 +1,8 @@
package server
import (
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"strings"
)

View File

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"strings"

View File

@ -3,7 +3,7 @@ package server
import (
"net/http"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
)
type contextKey int

View File

@ -11,9 +11,9 @@ import (
"github.com/stripe/stripe-go/v74/price"
"github.com/stripe/stripe-go/v74/subscription"
"github.com/stripe/stripe-go/v74/webhook"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"net/netip"

View File

@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74"
"golang.org/x/time/rate"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/netip"
"path/filepath"

View File

@ -3,13 +3,13 @@ package server
import (
"bufio"
"context"
"crypto/rand"
"encoding/base64"
"encoding/json"
"fmt"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/user"
"io"
"math/rand"
"net/http"
"net/http/httptest"
"net/netip"
@ -24,8 +24,8 @@ import (
"github.com/SherClockHolmes/webpush-go"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
)
func TestMain(m *testing.M) {
@ -512,6 +512,8 @@ func TestServer_PublishAtAndPrune(t *testing.T) {
messages := toMessages(t, response.Body.String())
require.Equal(t, 1, len(messages)) // Not affected by pruning
require.Equal(t, "a message", messages[0].Message)
time.Sleep(time.Second) // FIXME CI failing not sure why
}
func TestServer_PublishAndMultiPoll(t *testing.T) {

View File

@ -4,9 +4,9 @@ import (
"bytes"
"encoding/xml"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"net/url"

View File

@ -2,8 +2,8 @@ package server
import (
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"net/http/httptest"

View File

@ -8,8 +8,8 @@ import (
"strings"
"github.com/SherClockHolmes/webpush-go"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
)
const (

View File

@ -4,8 +4,8 @@ import (
"encoding/json"
"fmt"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/v2/util"
"io"
"net/http"
"net/http/httptest"

View File

@ -11,8 +11,8 @@ import (
"sync"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
)
type mailer interface {

View File

@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"github.com/emersion/go-smtp"
"github.com/microcosm-cc/bluemonday"
"io"
"mime"
"mime/multipart"
@ -14,6 +15,7 @@ import (
"net/http"
"net/http/httptest"
"net/mail"
"regexp"
"strings"
"sync"
)
@ -27,6 +29,11 @@ var (
errUnsupportedContentType = errors.New("unsupported content type")
)
var (
onlySpacesRegex = regexp.MustCompile(`(?m)^\s+$`)
consecutiveNewLinesRegex = regexp.MustCompile(`\n{3,}`)
)
const (
maxMultipartDepth = 2
)
@ -232,37 +239,66 @@ func readMailBody(body io.Reader, header mail.Header) (string, error) {
if err != nil {
return "", err
}
if strings.ToLower(contentType) == "text/plain" {
return readPlainTextMailBody(body, header.Get("Content-Transfer-Encoding"))
} else if strings.HasPrefix(strings.ToLower(contentType), "multipart/") {
return readMultipartMailBody(body, params, 0)
canonicalContentType := strings.ToLower(contentType)
if canonicalContentType == "text/plain" || canonicalContentType == "text/html" {
return readTextMailBody(body, canonicalContentType, header.Get("Content-Transfer-Encoding"))
} else if strings.HasPrefix(canonicalContentType, "multipart/") {
return readMultipartMailBody(body, params)
}
return "", errUnsupportedContentType
}
func readMultipartMailBody(body io.Reader, params map[string]string, depth int) (string, error) {
func readMultipartMailBody(body io.Reader, params map[string]string) (string, error) {
parts := make(map[string]string)
if err := readMultipartMailBodyParts(body, params, 0, parts); err != nil && err != io.EOF {
return "", err
} else if s, ok := parts["text/plain"]; ok {
return s, nil
} else if s, ok := parts["text/html"]; ok {
return s, nil
}
return "", io.EOF
}
func readMultipartMailBodyParts(body io.Reader, params map[string]string, depth int, parts map[string]string) error {
if depth >= maxMultipartDepth {
return "", errMultipartNestedTooDeep
return errMultipartNestedTooDeep
}
mr := multipart.NewReader(body, params["boundary"])
for {
part, err := mr.NextPart()
if err != nil { // may be io.EOF
return "", err
return err
}
partContentType, partParams, err := mime.ParseMediaType(part.Header.Get("Content-Type"))
if err != nil {
return "", err
return err
}
if strings.ToLower(partContentType) == "text/plain" {
return readPlainTextMailBody(part, part.Header.Get("Content-Transfer-Encoding"))
canonicalPartContentType := strings.ToLower(partContentType)
if canonicalPartContentType == "text/plain" || canonicalPartContentType == "text/html" {
s, err := readTextMailBody(part, canonicalPartContentType, part.Header.Get("Content-Transfer-Encoding"))
if err != nil {
return err
}
parts[canonicalPartContentType] = s
} else if strings.HasPrefix(strings.ToLower(partContentType), "multipart/") {
return readMultipartMailBody(part, partParams, depth+1)
if err := readMultipartMailBodyParts(part, partParams, depth+1, parts); err != nil {
return err
}
}
// Continue with next part
}
}
func readTextMailBody(reader io.Reader, contentType, transferEncoding string) (string, error) {
if contentType == "text/plain" {
return readPlainTextMailBody(reader, transferEncoding)
} else if contentType == "text/html" {
return readHTMLMailBody(reader, transferEncoding)
}
return "", fmt.Errorf("unsupported content type: %s", contentType)
}
func readPlainTextMailBody(reader io.Reader, transferEncoding string) (string, error) {
if strings.ToLower(transferEncoding) == "base64" {
reader = base64.NewDecoder(base64.StdEncoding, reader)
@ -275,3 +311,21 @@ func readPlainTextMailBody(reader io.Reader, transferEncoding string) (string, e
}
return string(body), nil
}
func readHTMLMailBody(reader io.Reader, transferEncoding string) (string, error) {
body, err := readPlainTextMailBody(reader, transferEncoding)
if err != nil {
return "", err
}
stripped := bluemonday.
StrictPolicy().
AddSpaceWhenStrippingTag(true).
Sanitize(body)
return removeExtraEmptyLines(stripped), nil
}
func removeExtraEmptyLines(s string) string {
s = onlySpacesRegex.ReplaceAllString(s, "")
s = consecutiveNewLinesRegex.ReplaceAllString(s, "\n\n")
return s
}

View File

@ -568,6 +568,803 @@ L0VOIj4KClRoaXMgaXMgYSB0ZXN0IG1lc3NhZ2UgZnJvbSBUcnVlTkFTIENPUkUuCg==
writeAndReadUntilLine(t, email, c, scanner, "554 5.0.0 Error: transaction failed, blame it on the weather: multipart message nested too deep")
}
func TestSmtpBackend_HTMLEmail(t *testing.T) {
email := `EHLO example.com
MAIL FROM: test@mydomain.me
RCPT TO: ntfy-mytopic@ntfy.sh
DATA
Message-Id: <51610934ss4.mmailer@fritz.box>
From: <email@email.com>
To: <email@email.com>,
<ntfy-subjectatntfy@ntfy.sh>
Date: Thu, 30 Mar 2023 02:56:53 +0000
Subject: A HTML email
Mime-Version: 1.0
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<=21DOCTYPE html>
<html>
<head>
<title>Alerttitle</title>
<meta http-equiv=3D"content-type" content=3D"text/html;charset=3Dutf-8"/>
</head>
<body style=3D"color: =23000000; background-color: =23f0eee6;">
<table width=3D"100%" align=3D"center" style=3D"border:solid 2px =23eeeeee=
; border-collapse: collapse;">
<tr>
<td>
<table style=3D"border-collapse: collapse;">
<tr>
<td style=3D"background: =23FFFFFF;">
<table style=3D"color: =23FFFFFF; background-color: =23006EC0; border-coll=
apse: collapse;">
<tr>
<td style=3D"width: 1000px; text-align: center; font-size: 18pt; font-fami=
ly: Arial, Helvetica, sans-serif; padding: 10px;">
headertext of table
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style=3D"padding: 10px 20px; background: =23FFFFFF;">
<table style=3D"border-collapse: collapse;">
<tr>
<td style=3D"width: 940px; font-size: 13pt; font-family: Arial, Helvetica,=
sans-serif; text-align: left;">
" Very important information about a change in your
home automation setup
Now the light is on
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style=3D"padding: 10px 20px; background: =23FFFFFF;">
<table>
<tr>
<td style=3D"width: 960px; font-size: 10pt; font-family: Arial, Helvetica,=
sans-serif; text-align: left;">
<hr />
If you don't want to receive this message anymore, stop the push
services in your <a href=3D"https:fritzbox" target=3D"_=
blank">FRITZ=21Box</a>=2E<br />
Here you can see the active push services: "System > Push Service"=2E
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table style=3D"color: =23FFFFFF; background-color: =23006EC0;">
<tr>
<td style=3D"width: 1000px; font-size: 10pt; font-family: Arial, Helvetica=
, sans-serif; text-align: center; padding: 10px;">
This mail has ben sent by your <a style=3D"color: =23FFFFFF;" href=3D"https:=
//fritzbox" target=3D"_blank">FRITZ=21Box</a=
> automatically=2E
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
.
`
s, c, _, scanner := newTestSMTPServer(t, func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/mytopic", r.URL.Path)
require.Equal(t, "A HTML email", r.Header.Get("Title"))
expected := `headertext of table
&#34; Very important information about a change in your
home automation setup
Now the light is on
If you don&#39;t want to receive this message anymore, stop the push
services in your FRITZ!Box .
Here you can see the active push services: &#34;System &gt; Push Service&#34;.
This mail has ben sent by your FRITZ!Box automatically.`
require.Equal(t, expected, readAll(t, r.Body))
})
defer s.Close()
defer c.Close()
writeAndReadUntilLine(t, email, c, scanner, "250 2.0.0 OK: queued")
}
const spamEmail = `
EHLO example.com
MAIL FROM: test@mydomain.me
RCPT TO: ntfy-mytopic@ntfy.sh
DATA
Delivered-To: somebody@gmail.com
Received: by 2002:a05:651c:1248:b0:2bf:c263:285 with SMTP id h8csp1096496ljh;
Mon, 30 Oct 2023 06:23:08 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFsB3WqbwbeefbeefbeefbeefbeefiXRNDHnIy2xBeaYHZCM3EC8DfPv55qDtgq9djTeBCF
X-Received: by 2002:a05:6808:147:b0:3af:66e5:5d3c with SMTP id h7-20020a056808014700b003af66e55d3cmr11662458oie.26.1698672188132;
Mon, 30 Oct 2023 06:23:08 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1698672188; cv=none;
d=google.com; s=arc-20160816;
b=XM96KvnTbr4h6bqrTPTuuDNXmFCr9Be/HvVhu+UsSQjP9RxPk0wDTPUPZ/HWIJs52y
beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeef
BUmQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=list-unsubscribe-post:list-unsubscribe:mime-version:subject:to
:reply-to:from:date:message-id:dkim-signature:dkim-signature;
bh=BERwBIp6fBgrZePFKQjyNMmgPkcnq1Zy1jPO8M0T4Ok=;
fh=+kTCcNpX22TOI/SVSLygnrDqWeUt4zW7QKiv0TOVSGs=;
b=lyIBRuOxPOTY2s36OqP7M7awlBKd4t5PX9mJOEJB0eTnTZqML+cplrXUIg2ZTlAAi9
beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeef
tgVQ==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@spamspam.com header.s=2020294246 header.b=G8y6xmtK;
dkim=pass header.i=@auth.ccsend.com header.s=1000073432 header.b=ht8IksVK;
spf=pass (google.com: domain of aigxeklyirlg+dvwkrmsgua==_1133104752381_suqcukvbeeynm/owplvdba==@in.constantcontact.com designates 208.75.123.226 as permitted sender) smtp.mailfrom="AigXeKlyIRLG+DvWkRMsGUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=spamspam.com
Return-Path: <AigXeKlyIRLG+DvWkRMsGUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com>
Received: from ccm30.constantcontact.com (ccm30.constantcontact.com. [208.75.123.226])
by mx.google.com with ESMTPS id h2-20020a05620a21c200b0076eeed38118si5450962qka.131.2023.10.30.06.23.07
for <somebody@gmail.com>
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Mon, 30 Oct 2023 06:23:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of aigxeklyirlg+dvwkrmsgua==_1133104752381_suqcukvbeeynm/owplvdba==@in.constantcontact.com designates 208.75.123.226 as permitted sender) client-ip=208.75.123.226;
Authentication-Results: mx.google.com;
dkim=pass header.i=@spamspam.com header.s=2020294246 header.b=G8y6xmtK;
dkim=pass header.i=@auth.ccsend.com header.s=1000073432 header.b=ht8IksVK;
spf=pass (google.com: domain of aigxeklyirlg+dvwkrmsgua==_1133104752381_suqcukvbeeynm/owplvdba==@in.constantcontact.com designates 208.75.123.226 as permitted sender) smtp.mailfrom="AigXeKlyIRLG+DvWkRMsGUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com";
dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=spamspam.com
Return-Path: <AigXeKlyIRLG+DvWkRMsGUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com>
Received: from [10.252.0.3] ([10.252.0.3:53254] helo=p2-jbemailsyndicator12.ctct.net) by 10.249.225.20 (envelope-from <AigXeKlyIRLG+DvWkRMsGUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com>) (ecelerity 4.3.1.999 r(:)) with ESMTP id A4/82-60517-B3EAF356; Mon, 30 Oct 2023 09:23:07 -0400
DKIM-Signature: v=1; q=dns/txt; a=rsa-sha256; c=relaxed/relaxed; s=2020294246; d=spamspam.com; h=date:mime-version:subject:X-Feedback-ID:X-250ok-CID:message-id:from:reply-to:list-unsubscribe:list-unsubscribe-post:to; bh=BERwBIp6fBgrZePFKQjyNMmgPkcnq1Zy1jPO8M0T4Ok=; b=G8y6xmtKv8asfEXA9o8dP+6foQjclo6j5sFREYVIJBbj5YJ5tqoiv5B04/qoRkoTBFDhmjt+BUua7AqDgPSnwbP2iPSA4fTJehnHhut1PyVUp/9vqSYlhxQehfdhma8tPg8ArKfYIKmfKJwKRaQBU0JHCaB1m+5LNQQX3UjkxAg=
DKIM-Signature: v=1; q=dns/txt; a=rsa-sha256; c=relaxed/relaxed; s=1000073432; d=auth.ccsend.com; h=date:mime-version:subject:X-Feedback-ID:X-250ok-CID:message-id:from:reply-to:list-unsubscribe:list-unsubscribe-post:to; bh=BERwBIp6fBgrZePFKQjyNMmgPkcnq1Zy1jPO8M0T4Ok=; b=ht8IksVKYY/Kb3dUERWoeW4eVdYjKL6F4PEoIZOhfFXor6XAIbPnd3A/CPmbmoqFZjnKh5OdcUy1N5qEoj8w1Q3TmN8/ySQkqrlrmSDSZIHZMY7Qp9/TJrqUe4RMFOO1KKIN6Y0vGP1+dWe98msMAHwvi2qMjG9aEKLfFr2JUTQ=
Message-ID: <1140728754828.1133104752381.1941549819.0.260913JL.2002@synd.ccsend.com>
Date: Mon, 30 Oct 2023 09:23:07 -0400 (EDT)
From: spamspam Loan Servicing <marklake@spamspam.com>
Reply-To: marklake@spamspam.com
To: somebody@gmail.com
Subject: Buying a home? You deserve the confidence of Pre-Approval
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_75055660_144854819.1698672187348"
List-Unsubscribe: <https://visitor.constantcontact.com/do?p=un&m=beefbeefbeef>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
X-Campaign-Activity-ID: 8a05de2a-5c88-44b1-be0e-f5a444cb0650
X-250ok-CID: 8a05de2a-5c88-44b1-be0e-f5a444cb0650
X-Channel-ID: b1441c50-a541-11ec-a79b-fa163e5bc304
X-Return-Path-Hint: AbeefbeefbeefbeefbeefUA==_1133104752381_sUQcUKVBEeynm/oWPlvDBA==@in.constantcontact.com
X-Roving-Campaignid: 1140728754811
X-Roving-Id: 1133104752381.1111111111
X-Feedback-ID: b1441c50-a541-11ec-beef-beefbeefbeefbeef5de2a-5c88-44b1-be0e-f5a444cb0650:1133104752381:CTCT
X-CTCT-ID: b13a9586-a541-11ec-beef-beefbeefbeef
------=_Part_75055660_144854819.1698672187348
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
When you're buying a home, Pre-Approval gives you confidence you're in the =
right price range and shows sellers you mean business. xxxxxxxxx SELLING or=
BUYING? Call: 844-590-2275 Get Your Homebuying PRE-APPROVAL IN 24-HOURS* G=
et Pre-Approved When you're buying a home, Pre-Approval gives you confidenc=
e you're in the right price range and shows sellers you mean business. xxx=
xxxxxxGet Pre-Approved today! Click or Call to Get Pre-Approved 844-590-227=
5 Get Pre-Approved nmlsconsumeraccess.org/ *The 24 hour timeframe is for mo=
st approvals, however if additional information is needed or a request is o=
n a holiday, the time for preapproval may be greater than 24 hours. This em=
ail is for informational purposes only and is not an offer, loan approval o=
r loan commitment. Mortgage rates are subject to change without notice. Som=
e terms and restrictions may apply to certain loan programs. Refinancing ex=
isting loans may result in total finance charges being higher over the life=
of the loan, reduction in payments may partially reflect a longer loan ter=
m. This information is provided as guidance and illustrative purposes only =
and does not constitute legal or financial advice. We are not liable or bou=
nd legally for any answers provided to any user for our process or position=
on an issue. This information may change from time to time and at any time=
without notification. The most current information will be updated periodi=
cally and posted in the online forum. spamspam Loan Servicing, LLC. NMLS#39=
1521. nmlsconsumeraccess.org. You are receiving this information as a curre=
nt loan customer with spamspam Loan Servicing, LLC. Not licensed for lendin=
g activities in any of the U.S. territories. Not authorized to originate lo=
ans in the State of New York. Licensed by the Dept. of Financial Protection=
and Innovation under the California Residential Mortgage .Lending Act #413=
1216. This email was sent to somebody@gmail.com Version 103023PCHPrAp=
9 xxxxxxxxx spamspam Loan Servicing | 4425 Ponce de Leon Blvd 5-251, Coral =
Gables, FL 33146-1837 Unsubscribe somebody@gmail.com Update Profile |=
Our Privacy Policy | Constant Contact Data Notice Sent by marklake@spamspa=
m.com
------=_Part_75055660_144854819.1698672187348
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML>
<html lang=3D"en-US"> <head> <meta http-equiv=3D"Content-Type" content=3D"=
text/html; charset=3Dutf-8"> <meta name=3D"viewport" content=3D"width=3Ddev=
ice-width, initial-scale=3D1, maximum-scale=3D1"> <style type=3D"text/css=
" data-premailer=3D"ignore">=20
@media only screen and (max-width:480px) { .footer-main-width { width: 100%=
!important; } .footer-mobile-hidden { display: none !important; } .foote=
r-mobile-hidden { display: none !important; } .footer-column { display: bl=
ock !important; } .footer-mobile-stack { display: block !important; } .fo=
oter-mobile-stack-padding { padding-top: 3px; } }=20
/* IE: correctly scale images with w/h attbs */ img { -ms-interpolation-mod=
e: bicubic; }=20
.layout { min-width: 100%; }=20
table { table-layout: fixed; } .shell_outer-row { table-layout: auto; }=20
/* Gmail/Web viewport fix */ u + .body .shell_outer-row { width: 620px; }=
=20
/* LIST AND p STYLE OVERRIDES */ .text .text_content-cell p { margin: 0; pa=
dding: 0; margin-bottom: 0; } .text .text_content-cell ul, .text .text_cont=
ent-cell ol { padding: 0; margin: 0 0 0 40px; } .text .text_content-cell li=
{ padding: 0; margin: 0; /* line-height: 1.2; Remove after testing */ } /*=
Text Link Style Reset */ a { text-decoration: underline; } /* iOS: Autolin=
k styles inherited */ a[x-apple-data-detectors] { text-decoration: underlin=
e !important; font-size: inherit !important; font-family: inherit !importan=
t; font-weight: inherit !important; line-height: inherit !important; color:=
inherit !important; } /* FF/Chrome: Smooth font rendering */ .text .text_c=
ontent-cell { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing:=
grayscale; }=20
</style> <!--[if gte mso 9]> <style id=3D"ol-styles">=20
/* OUTLOOK-SPECIFIC STYLES */ li { text-indent: -1em; padding: 0; margin: 0=
; /* line-height: 1.2; Remove after testing */ } ul, ol { padding: 0; margi=
n: 0 0 0 40px; } p { margin: 0; padding: 0; margin-bottom: 0; }=20
</style> <![endif]--> <style>@media only screen and (max-width:480px) {
.button_content-cell {
padding-top: 10px !important; padding-right: 20px !important; padding-botto=
m: 10px !important; padding-left: 20px !important;
}
.button_border-row .button_content-cell {
padding-top: 10px !important; padding-right: 20px !important; padding-botto=
m: 10px !important; padding-left: 20px !important;
}
.column .content-padding-horizontal {
padding-left: 20px !important; padding-right: 20px !important;
}
.layout .column .content-padding-horizontal .content-padding-horizontal {
padding-left: 0px !important; padding-right: 0px !important;
}
.layout .column .content-padding-horizontal .block-wrapper_border-row .cont=
ent-padding-horizontal {
padding-left: 20px !important; padding-right: 20px !important;
}
.dataTable {
overflow: auto !important;
}
.dataTable .dataTable_content {
width: auto !important;
}
.image--mobile-scale .image_container img {
width: auto !important;
}
.image--mobile-center .image_container img {
margin-left: auto !important; margin-right: auto !important;
}
.layout-margin .layout-margin_cell {
padding: 0px 20px !important;
}
.layout-margin--uniform .layout-margin_cell {
padding: 20px 20px !important;
}
.scale {
width: 100% !important;
}
.stack {
display: block !important; box-sizing: border-box;
}
.hide {
display: none !important;
}
u + .body .shell_outer-row {
width: 100% !important;
}
.socialFollow_container {
text-align: center !important;
}
.text .text_content-cell {
font-size: 16px !important;
}
.text .text_content-cell h1 {
font-size: 24px !important;
}
.text .text_content-cell h2 {
font-size: 20px !important;
}
.text .text_content-cell h3 {
font-size: 20px !important;
}
.text--sectionHeading .text_content-cell {
font-size: 26px !important;
}
.text--heading .text_content-cell {
font-size: 26px !important;
}
.text--feature .text_content-cell h2 {
font-size: 20px !important;
}
.text--articleHeading .text_content-cell {
font-size: 20px !important;
}
.text--article .text_content-cell h3 {
font-size: 20px !important;
}
.text--featureHeading .text_content-cell {
font-size: 20px !important;
}
.text--feature .text_content-cell h3 {
font-size: 20px !important;
}
.text--dataTable .text_content-cell .dataTable .dataTable_content-cell {
font-size: 12px !important;
}
.text--dataTable .text_content-cell .dataTable th.dataTable_content-cell {
font-size: px !important;
}
}
</style>
</head> <body class=3D"body template template--en-US" data-template-version=
=3D"1.38.0" data-canonical-name=3D"CPE10001" lang=3D"en-US" align=3D"center=
" style=3D"-ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; min-=
width: 100%; width: 100%; margin: 0px; padding: 0px;"> <div id=3D"preheader=
" style=3D"color: transparent; display: none; font-size: 1px; line-height: =
1px; max-height: 0px; max-width: 0px; opacity: 0; overflow: hidden;"><span =
data-entity-ref=3D"preheader">When you&#x27;re buying a home, Pre-Approval =
gives you confidence you&#x27;re in the right price range and shows sellers=
you mean business. </span></div> <div id=3D"tracking-image" style=3D"color=
: transparent; display: none; font-size: 1px; line-height: 1px; max-height:=
0px; max-width: 0px; opacity: 0; overflow: hidden;"><img src=3D"https://r2=
0.rs6.net/on.jsp?ca=beefbeefbe-beef-44b1-be0e-f5a444cb0650&a=3D113310475238=
1&c=3Db13a9586-a541-11ec-a79b-fa163e5bc304&ch=3Db1441c50-a541-11ec-a79b-fa1=
63e5bc304" / alt=3D""></div> <div class=3D"shell" lang=3D"en-US" style=3D"b=
ackground-color: #015288;"> <table class=3D"shell_panel-row" width=3D"100%=
" border=3D"0" cellpadding=3D"0" cellspacing=3D"0" style=3D"background-colo=
r: #015288;" bgcolor=3D"#015288"> <tr class=3D""> <td class=3D"shell_panel-=
cell" style=3D"" align=3D"center" valign=3D"top"> <table class=3D"shell_wid=
th-row scale" style=3D"width: 620px;" align=3D"center" border=3D"0" cellpad=
ding=3D"0" cellspacing=3D"0"> <tr> <td class=3D"shell_width-cell" style=3D"=
padding: 15px 10px;" align=3D"center" valign=3D"top"> <table class=3D"shell=
_content-row" width=3D"100%" align=3D"center" border=3D"0" cellpadding=3D"0=
" cellspacing=3D"0"> <tr> <td class=3D"shell_content-cell" style=3D"border-=
radius: 0px; background-color: #FFFFFF; padding: 0; border: 0px solid #0096=
d6;" align=3D"center" valign=3D"top" bgcolor=3D"#FFFFFF"> <table class=3D"l=
ayout layout--1-column" style=3D"table-layout: fixed;" width=3D"100%" borde=
r=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column colum=
n--1 scale stack" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"divider" width=3D"100%" cellpadding=3D"0" cellspacing=3D"0"=
border=3D"0"> <tr> <td class=3D"divider_container" style=3D"padding-top: 0=
px; padding-bottom: 10px;" width=3D"100%" align=3D"center" valign=3D"top"> =
<table class=3D"divider_content-row" style=3D"width: 100%; height: 1px;" ce=
llpadding=3D"0" cellspacing=3D"0" border=3D"0"> <tr> <td class=3D"divider_c=
ontent-cell" style=3D"padding-bottom: 5px; height: 1px; line-height: 1px; b=
ackground-color: #0096D6; border-bottom-width: 0px;" height=3D"1" align=3D"=
center" bgcolor=3D"#0096D6"> <img alt=3D"" width=3D"5" height=3D"1" border=
=3D"0" hspace=3D"0" vspace=3D"0" src=3D"https://imgssl.constantcontact.com/=
letters/images/1101116784221/S.gif" style=3D"display: block; height: 1px; w=
idth: 5px;"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table>=
<table class=3D"layout layout--1-column" style=3D"table-layout: fixed;" wi=
dth=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td cla=
ss=3D"column column--1 scale stack" style=3D"width: 100%;" align=3D"center"=
valign=3D"top"><div class=3D"spacer" style=3D"line-height: 10px; height: 1=
0px;">&#x200a;</div></td> </tr> </table> <table class=3D"layout layout--1-c=
olumn" style=3D"table-layout: fixed;" width=3D"100%" border=3D"0" cellpaddi=
ng=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column column--1 scale stack"=
style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"image image--padding-vertical image--mobile-scale image--mo=
bile-center" width=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0=
"> <tr> <td class=3D"image_container" align=3D"center" valign=3D"top" style=
=3D"padding-top: 10px; padding-bottom: 10px;"> <a href=3D"https://r20.rs6.n=
et/tn.jsp?f=3D001YKO1VR2jLW0SuSLZLfN7qCP9AwEGO0v-Vy-0SCUlMWvTEiCsv-QEMhmJe9=
ch=3DHu9wLy0fth6D8jxFBWPA_NhdnWcZZPivk0KUTgRJoVIo_si10jiydw=3D=3D" data-tra=
ckable=3D"true"><img data-image-content class=3D"image_content" width=3D"26=
2" src=3D"https://files.constantcontact.com/beefbeefbee/057bff2a-bdba-4165-=
b108-a7baa91c42c6.jpg" alt=3D"" style=3D"display: block; height: auto; max-=
width: 100%;"></a> </td> </tr> </table> </td> </tr> </table> <table class=
=3D"layout layout--heading layout--1-column" style=3D"background-color: #00=
527e; table-layout: fixed;" width=3D"100%" border=3D"0" cellpadding=3D"0" c=
ellspacing=3D"0" bgcolor=3D"#00527e"> <tr> <td class=3D"column column--1 sc=
ale stack" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"text text--padding-vertical" width=3D"100%" border=3D"0" ce=
llpadding=3D"0" cellspacing=3D"0" style=3D"table-layout: fixed;"> <tr> <td =
class=3D"text_content-cell content-padding-horizontal" style=3D"text-align:=
center; font-family: Arial,Verdana,Helvetica,sans-serif; color: #000000; f=
ont-size: 14px; line-height: 1.2; display: block; word-wrap: break-word; pa=
dding: 10px 20px;" align=3D"center" valign=3D"top">
<h1 style=3D"font-family: Arial,Verdana,Helvetica,sans-serif; color: #606d7=
8; font-size: 26px; font-weight: bold; margin: 0;"><span style=3D"color: rg=
b(0, 150, 214);">SELLING or BUYING?</span></h1>
<p style=3D"margin: 0;"><span style=3D"font-size: 16px; color: rgb(255, 255=
, 255); font-weight: bold;">Call: 844-590-2275</span></p>
</td> </tr> </table> </td> </tr> </table> <table class=3D"layout layout--ar=
ticle layout--1-column" style=3D"table-layout: fixed;" width=3D"100%" borde=
r=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column colum=
n--1 scale stack" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"text text--heading text--padding-vertical" width=3D"100%" b=
order=3D"0" cellpadding=3D"0" cellspacing=3D"0" style=3D"table-layout: fixe=
d;"> <tr> <td class=3D"text_content-cell content-padding-horizontal" style=
=3D"text-align: center; font-family: Arial,Verdana,Helvetica,sans-serif; co=
lor: #606d78; font-size: 26px; line-height: 1.2; display: block; word-wrap:=
break-word; font-weight: bold; padding: 10px 20px;" align=3D"center" valig=
n=3D"top">
<p style=3D"margin: 0;"><span style=3D"font-size: 30px; color: rgb(0, 150, =
214);">Get Your Homebuying</span></p>
<p style=3D"margin: 0;"><span style=3D"font-size: 30px; color: rgb(0, 82, 1=
26);">PRE-APPROVAL IN 24-HOURS</span><span style=3D"font-size: 30px; color:=
rgb(0, 82, 126); font-weight: normal;">*</span></p>
</td> </tr> </table> <table class=3D"image image--padding-vertical image--m=
obile-scale image--mobile-center" width=3D"100%" border=3D"0" cellpadding=
=3D"0" cellspacing=3D"0"> <tr> <td class=3D"image_container content-padding=
-horizontal" align=3D"center" valign=3D"top" style=3D"padding: 10px 20px;">=
<img data-image-content class=3D"image_content" width=3D"548" src=3D"https=
://files.constantcontact.com/df66e42d701/2092a2d7-0bda-4289-910b-bf50a2398d=
60.jpg" alt=3D"" style=3D"display: block; height: auto; max-width: 100%;"> =
</td> </tr> </table> <table class=3D"button button--padding-vertical" widt=
h=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0" style=3D"table-=
layout: fixed;"> <tr> <td class=3D"button_container content-padding-horizon=
tal" align=3D"center" style=3D"padding: 10px 20px;"> <table class=3D"but=
ton_content-row" style=3D"width: inherit; border-radius: 3px; border-spacin=
g: 0; background-color: #0096D6; border: none;" border=3D"0" cellpadding=3D=
"0" cellspacing=3D"0" bgcolor=3D"#0096D6"> <tr> <td class=3D"button_content=
-cell" style=3D"padding: 10px 40px;" align=3D"center"> <a class=3D"button_l=
ink" href=3D"https://r20.rs6.net/tn.jsp?f=3D001YKO1VR2jLW0SuSLZLfN7qCP9AwEG=
O0v-Vy-0SCUlMWvTEiCsv-QEMuu9ZVVi6WGHhCias4f7-QkeggQvxIvbs-6TTaZHHhXLKf88NID=
dci4Ge7aYN-QihEgqblie1-DQ2Fa1BKLbT3AM8rtrgeYQgVxJ6cG8POsvFzv7JstrGkCkg3a3AE=
633LfQpAddyVLFkTv6oyS4T2j_YjYIPKDOZktqK_5rOR-Fh8cWGtUD8YPpPNnZ037z6_t9Nkemu=
hxG&c=3DA65qX-dQJPS0J4afCS7H0Je5N-_6Q8Nh2fNHkb5-5biUYd5B9SY3zA=3D=3D&ch=3DH=
u9wLy0fth6D8jxFBWPA_NhdnWcZZPivk0KUTgRJoVIo_si10jiydw=3D=3D" data-trackable=
=3D"true" style=3D"font-size: 16px; font-weight: bold; color: #FFFFFF; font=
-family: Helvetica,Arial,sans-serif; word-wrap: break-word; text-decoration=
: none;">Get Pre-Approved</a> </td> </tr> </table> </td> </tr> </table> =
<table class=3D"text text--padding-vertical" width=3D"100%" border=3D"0" =
cellpadding=3D"0" cellspacing=3D"0" style=3D"table-layout: fixed;"> <tr> <t=
d class=3D"text_content-cell content-padding-horizontal" style=3D"line-heig=
ht: 1; text-align: center; font-family: Arial,Verdana,Helvetica,sans-serif;=
color: #000000; font-size: 14px; display: block; word-wrap: break-word; pa=
dding: 10px 20px;" align=3D"center" valign=3D"top">
<p style=3D"text-align: left; margin: 0;" align=3D"left"><br></p>
<p style=3D"margin: 0;"><span style=3D"font-size: 19px;">When you're buying=
a home, Pre-Approval gives you confidence you're in the right price range =
and shows sellers you mean business. </span></p>
<p style=3D"margin: 0;"><span style=3D"font-size: 19px;">&#xfeff;Get Pre-Ap=
proved today!</span></p>
</td> </tr> </table> </td> </tr> </table> <table class=3D"layout layout--1-=
column" style=3D"table-layout: fixed;" width=3D"100%" border=3D"0" cellpadd=
ing=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column column--1 scale stack=
" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"text text--padding-vertical" width=3D"100%" border=3D"0" ce=
llpadding=3D"0" cellspacing=3D"0" style=3D"table-layout: fixed;"> <tr> <td =
class=3D"text_content-cell content-padding-horizontal" style=3D"text-align:=
left; font-family: Arial,Verdana,Helvetica,sans-serif; color: #000000; fon=
t-size: 14px; line-height: 1.2; display: block; word-wrap: break-word; padd=
ing: 10px 20px;" align=3D"left" valign=3D"top">
<p style=3D"text-align: center; margin: 0;" align=3D"center"><br></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 23px; color: rgb(0, 82, 126); font-weight: bold; font-family: A=
rial, Verdana, Helvetica, sans-serif;">Click or Call to Get Pre-Approved </=
span></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 28px; color: rgb(0, 150, 214); font-weight: bold;">844-590-2275=
</span></p>
</td> </tr> </table> </td> </tr> </table> <table class=3D"layout layout--1-=
column" style=3D"table-layout: fixed;" width=3D"100%" border=3D"0" cellpadd=
ing=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column column--1 scale stack=
" style=3D"width: 100%;" align=3D"center" valign=3D"top"> <table class=3D"b=
utton button--padding-vertical" width=3D"100%" border=3D"0" cellpadding=3D"=
0" cellspacing=3D"0" style=3D"table-layout: fixed;"> <tr> <td class=3D"butt=
on_container content-padding-horizontal" align=3D"center" style=3D"padding:=
10px 20px;"> <table class=3D"button_content-row" style=3D"background-co=
lor: #0096D6; width: inherit; border-radius: 3px; border-spacing: 0; border=
: none;" border=3D"0" cellpadding=3D"0" cellspacing=3D"0" bgcolor=3D"#0096D=
6"> <tr> <td class=3D"button_content-cell" style=3D"padding: 10px 40px;" al=
ign=3D"center"> <a class=3D"button_link" href=3D"https://r20.rs6.net/tn.jsp=
?f=3D001thisisfakethisisfakethisisfakev-Vy-0SCUlMWvTEiCsv-QEMuu9ZVVi6WGHhCi=
oVIo_si10jiydw=3D=3D" data-trackable=3D"true" style=3D"font-size: 16px; fon=
t-weight: bold; color: #FFFFFF; font-family: Helvetica,Arial,sans-serif; wo=
rd-wrap: break-word; text-decoration: none;">Get Pre-Approved</a> </td> </t=
r> </table> </td> </tr> </table> </td> </tr> </table> <table class=3D"=
layout layout--1-column" style=3D"table-layout: fixed;" width=3D"100%" bord=
er=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column colu=
mn--1 scale stack" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"image image--padding-vertical image--mobile-scale image--mo=
bile-center" width=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0=
"> <tr> <td class=3D"image_container" align=3D"center" valign=3D"top" style=
=3D"padding-top: 10px; padding-bottom: 10px;"> <img data-image-content clas=
s=3D"image_content" width=3D"87" src=3D"https://files.constantcontact.com/d=
f66e42d701/beefbeef-beef-beef-9a13-2779ab497b8d.png" alt=3D"" style=3D"disp=
lay: block; height: auto; max-width: 100%;"> </td> </tr> </table> </td> </t=
r> </table> <table class=3D"layout layout--1-column" style=3D"table-layout:=
fixed;" width=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <=
tr> <td class=3D"column column--1 scale stack" style=3D"width: 100%;" align=
=3D"center" valign=3D"top">
<table class=3D"text text--padding-vertical" width=3D"100%" border=3D"0" ce=
llpadding=3D"0" cellspacing=3D"0" style=3D"table-layout: fixed;"> <tr> <td =
class=3D"text_content-cell content-padding-horizontal" style=3D"text-align:=
left; font-family: Arial,Verdana,Helvetica,sans-serif; color: #000000; fon=
t-size: 14px; line-height: 1.2; display: block; word-wrap: break-word; padd=
ing: 10px 20px;" align=3D"left" valign=3D"top">
<p style=3D"text-align: center; margin: 0;" align=3D"center"><br></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><a href=3D"htt=
ps://r20.rs6.net/tn.jsp?f=3D001YKO1VR2jLW0SuSLZLfN7qCP9AwEGO0v-Vy-0SCUlMWvT=
EiCsv-QEMgYju54LKeEV1_a2OCyOAfG7VhZpxtOW89WM-s6S5iiXcmnbK-Z6XDc9LL569h6DE4L=
IRMWiBWHOlFB9TZWQVuX6Ycz3505y1keCrca4QArp&c=3DA65qX-dQJPS0J4afCS7H0Je5N-_6Q=
8Nh2fNHkb5-5biUYd5B9SY3zA=3D=3D&ch=3DHu9wLy0fth6D8jxFBWPA_NhdnWcZZPivk0KUTg=
RJoVIo_si10jiydw=3D=3D" target=3D"_blank" style=3D"font-size: 11px; color: =
rgb(153, 153, 153); text-decoration: underline; font-weight: normal; font-s=
tyle: normal;">nmlsconsumeraccess.org/</a></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(153, 153, 153);">*The 24 hour timeframe is for=
most approvals, however if additional information is needed or a request i=
s on a holiday, the time for preapproval may be greater than 24 hours.</spa=
n></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(153, 153, 153); background-color: rgb(255, 255=
, 255);">This email is for informational purposes only and is not an offer,=
loan approval or loan commitment. Mortgage rates are subject to change wit=
hout notice. Some terms and restrictions may apply to certain loan programs=
. Refinancing existing loans may result in total finance charges being high=
er over the life of the loan, reduction in payments may partially reflect a=
longer loan term. This information is provided as guidance and illustrativ=
e purposes only and does not constitute legal or financial advice. We are n=
ot liable or bound legally for any answers provided to any user for our pro=
cess or position on an issue. This information may change from time to time=
and at any time without notification. The most current information will be=
updated periodically and posted in the online forum.</span></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(153, 153, 153); background-color: rgb(255, 255=
, 255);">spamspam Loan Servicing, LLC. NMLS#391521. nmlsconsumeraccess.org.=
You are receiving this information as a current loan customer with spamspa=
m Loan Servicing, LLC. Not licensed for lending activities in any of the U.=
S. territories. Not authorized to originate loans in the State of New York.=
Licensed by the Dept. of Financial Protection and Innovation under the Cal=
ifornia Residential Mortgage .Lending Act #4131216.</span></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><br></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(153, 153, 153);">This email was sent to <span =
data-id=3D"emailAddress">somebody@gmail.com</span></span></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(153, 153, 153);">Version 103023PCHPrAp9 </span=
></p>
<p style=3D"text-align: center; margin: 0;" align=3D"center"><span style=3D=
"font-size: 11px; color: rgb(162, 162, 162);">&#xfeff;</span></p>
</td> </tr> </table> </td> </tr> </table> <table class=3D"layout layout--1-=
column" style=3D"table-layout: fixed;" width=3D"100%" border=3D"0" cellpadd=
ing=3D"0" cellspacing=3D"0"> <tr> <td class=3D"column column--1 scale stack=
" style=3D"width: 100%;" align=3D"center" valign=3D"top">
<table class=3D"divider" width=3D"100%" cellpadding=3D"0" cellspacing=3D"0"=
border=3D"0"> <tr> <td class=3D"divider_container" style=3D"padding-top: 1=
0px; padding-bottom: 0px;" width=3D"100%" align=3D"center" valign=3D"top"> =
<table class=3D"divider_content-row" style=3D"width: 100%; height: 1px;" ce=
llpadding=3D"0" cellspacing=3D"0" border=3D"0"> <tr> <td class=3D"divider_c=
ontent-cell" style=3D"padding-bottom: 2px; height: 1px; line-height: 1px; b=
ackground-color: #0096D6; border-bottom-width: 0px;" height=3D"1" align=3D"=
center" bgcolor=3D"#0096D6"> <img alt=3D"" width=3D"5" height=3D"1" border=
=3D"0" hspace=3D"0" vspace=3D"0" src=3D"https://imgssl.constantcontact.com/=
letters/images/1111111111111/S.gif" style=3D"display: block; height: 1px; w=
idth: 5px;"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table>=
</td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td class=3D"s=
hell_panel-cell shell_panel-cell--systemFooter" style=3D"" align=3D"center"=
valign=3D"top"> <table class=3D"shell_width-row scale" style=3D"width: 100=
%;" align=3D"center" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr>=
<td class=3D"shell_width-cell" style=3D"padding: 0px;" align=3D"center" va=
lign=3D"top"> <table class=3D"shell_content-row" width=3D"100%" align=3D"ce=
nter" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td class=3D"s=
hell_content-cell" style=3D"background-color: #FFFFFF; padding: 0; border: =
0 solid #0096d6;" align=3D"center" valign=3D"top" bgcolor=3D"#FFFFFF"> <tab=
le class=3D"layout layout--1-column" style=3D"table-layout: fixed;" width=
=3D"100%" border=3D"0" cellpadding=3D"0" cellspacing=3D"0"> <tr> <td class=
=3D"column column--1 scale stack" style=3D"width: 100%;" align=3D"center" v=
align=3D"top"> <table class=3D"footer" width=3D"100%" border=3D"0" cellpadd=
ing=3D"0" cellspacing=3D"0" style=3D"font-family: Verdana,Geneva,sans-serif=
; color: #5d5d5d; font-size: 12px;"> <tr> <td class=3D"footer_container" al=
ign=3D"center"> <table class=3D"footer-container" width=3D"100%" cellpaddin=
g=3D"0" cellspacing=3D"0" border=3D"0" style=3D"background-color: #ffffff; =
margin-left: auto; margin-right: auto; table-layout: auto !important;" bgco=
lor=3D"#ffffff">
<tr>
<td width=3D"100%" align=3D"center" valign=3D"top" style=3D"width: 100%;">
<div class=3D"footer-max-main-width" align=3D"center" style=3D"margin-left:=
auto; margin-right: auto; max-width: 100%;">
<table width=3D"100%" cellpadding=3D"0" cellspacing=3D"0" border=3D"0">
<tr>
<td class=3D"footer-layout" align=3D"center" valign=3D"top" style=3D"paddin=
g: 16px 0px;">
<table class=3D"footer-main-width" style=3D"width: 580px;" border=3D"0" cel=
lpadding=3D"0" cellspacing=3D"0">
<tr>
<td class=3D"footer-text" align=3D"center" valign=3D"top" style=3D"color: #=
5d5d5d; font-family: Verdana,Geneva,sans-serif; font-size: 12px; padding: 4=
px 0px;">
<span class=3D"footer-column">spamspam Loan Servicing<span class=3D"footer-=
mobile-hidden"> | </span></span><span class=3D"footer-column">4425 Ponce de=
Leon Blvd 5-251<span class=3D"footer-mobile-hidden">, </span></span><span =
class=3D"footer-column"></span><span class=3D"footer-column"></span><span c=
lass=3D"footer-column">Coral Gables, FL 33146-1837</span><span class=3D"foo=
ter-column"></span>
</td>
</tr>
<tr>
<td class=3D"footer-row" align=3D"center" valign=3D"top" style=3D"padding: =
10px 0px;">
<table cellpadding=3D"0" cellspacing=3D"0" border=3D"0">
<tr>
<td class=3D"footer-text" align=3D"center" valign=3D"top" style=3D"color: #=
5d5d5d; font-family: Verdana,Geneva,sans-serif; font-size: 12px; padding: 4=
px 0px;">
<a href=3D"https://visitor.constantcontact.com/do?p=3Dun&m=3D001g3dtlqhzM3v=
-44b1-be0e-f5a444cb0650" data-track=3D"false" style=3D"color: #5d5d5d;">Uns=
ubscribe somebody@gmail.com<span class=3D"partnerOptOut"></span></a>
<span class=3D"partnerOptOut"></span>
</td>
</tr>
<tr>
<td class=3D"footer-text" align=3D"center" valign=3D"top" style=3D"color: #=
5d5d5d; font-family: Verdana,Geneva,sans-serif; font-size: 12px; padding: 4=
px 0px;">
<a href=3D"https://visitor.constantcontact.com/do?p=3Doo&m=3D001g3dtlqhzM3v=
-44b1-be0e-f5a444cb0650" data-track=3D"false" style=3D"color: #5d5d5d;">Upd=
ate Profile</a> |
<a href=3D"https://spamspam.com/privacy-notice/" data-track=3D"false" style=
=3D"color: #5d5d5d;">Our Privacy Policy</a><span class=3D"footer-mobile-hid=
den"> |</span>
<a class=3D"footer-about-provider footer-mobile-stack footer-mobile-stack-p=
adding" href=3D"http://www.constantcontact.com/legal/about-constant-contact=
" data-track=3D"false" style=3D"color: #5d5d5d;">Constant Contact Data Noti=
ce</a>
</td>
</tr>
<tr>
<td class=3D"footer-text" align=3D"center" valign=3D"top" style=3D"color: #=
5d5d5d; font-family: Verdana,Geneva,sans-serif; font-size: 12px; padding: 4=
px 0px;">
Sent by
<a href=3D"mailto:marklake@spamspam.com" style=3D"color: #5d5d5d; text-deco=
ration: none;">marklake@spamspam.com</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class=3D"footer-text" align=3D"center" valign=3D"top" style=3D"color: #=
5d5d5d; font-family: Verdana,Geneva,sans-serif; font-size: 12px; padding: 4=
px 0px;">
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> =
</td> </tr> </table> </td> </tr> </table> </div> </body> </html>
------=_Part_75055660_144854819.1698672187348--
.
`
func TestSmtpBackend_Spam_Text(t *testing.T) {
email := spamEmail
s, c, _, scanner := newTestSMTPServer(t, func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/mytopic", r.URL.Path)
require.Equal(t, "Buying a home? You deserve the confidence of Pre-Approval", r.Header.Get("Title"))
actual := readAll(t, r.Body)
expected := "When you're buying a home, Pre-Approval gives you confidence you're in the right price range and shows sellers you mean business. xxxxxxxxx SELLING or BUYING? Call: 844-590-2275 Get Your Homebuying PRE-APPROVAL IN 24-HOURS* Get Pre-Approved When you're buying a home, Pre-Approval gives you confidence you're in the right price range and shows sellers you mean business. xxxxxxxxxGet Pre-Approved today! Click or Call to Get Pre-Approved 844-590-2275 Get Pre-Approved nmlsconsumeraccess.org/ *The 24 hour timeframe is for most approvals, however if additional information is needed or a request is on a holiday, the time for preapproval may be greater than 24 hours. This email is for informational purposes only and is not an offer, loan approval or loan commitment. Mortgage rates are subject to change without notice. Some terms and restrictions may apply to certain loan programs. Refinancing existing loans may result in total finance charges being higher over the life of the loan, reduction in payments may partially reflect a longer loan term. This information is provided as guidance and illustrative purposes only and does not constitute legal or financial advice. We are not liable or bound legally for any answers provided to any user for our process or position on an issue. This information may change from time to time and at any time without notification. The most current information will be updated periodically and posted in the online forum. spamspam Loan Servicing, LLC. NMLS#391521. nmlsconsumeraccess.org. You are receiving this information as a current loan customer with spamspam Loan Servicing, LLC. Not licensed for lending activities in any of the U.S. territories. Not authorized to originate loans in the State of New York. Licensed by the Dept. of Financial Protection and Innovation under the California Residential Mortgage .Lending Act #4131216. This email was sent to somebody@gmail.com Version 103023PCHPrAp9 xxxxxxxxx spamspam Loan Servicing | 4425 Ponce de Leon Blvd 5-251, Coral Gables, FL 33146-1837 Unsubscribe somebody@gmail.com Update Profile | Our Privacy Policy | Constant Contact Data Notice Sent by marklake@spamspam.com"
require.Equal(t, expected, actual)
})
defer s.Close()
defer c.Close()
writeAndReadUntilLine(t, email, c, scanner, "250 2.0.0 OK: queued")
}
func TestSmtpBackend_Spam_HTML(t *testing.T) {
email := strings.ReplaceAll(spamEmail, "text/plain", "text/not-plain-anymore") // We artificially force HTML parsing here
s, c, _, scanner := newTestSMTPServer(t, func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/mytopic", r.URL.Path)
require.Equal(t, "Buying a home? You deserve the confidence of Pre-Approval", r.Header.Get("Title"))
actual := readAll(t, r.Body)
expected := `When you&#39;re buying a home, Pre-Approval gives you confidence you&#39;re in the right price range and shows sellers you mean business.
` + "\u200a" + `
SELLING or BUYING?
Call: 844-590-2275
Get Your Homebuying
PRE-APPROVAL IN 24-HOURS *
Get Pre-Approved
When you&#39;re buying a home, Pre-Approval gives you confidence you&#39;re in the right price range and shows sellers you mean business.
` + "\ufeff" + `Get Pre-Approved today!
Click or Call to Get Pre-Approved
844-590-2275
Get Pre-Approved
nmlsconsumeraccess.org/
*The 24 hour timeframe is for most approvals, however if additional information is needed or a request is on a holiday, the time for preapproval may be greater than 24 hours.
This email is for informational purposes only and is not an offer, loan approval or loan commitment. Mortgage rates are subject to change without notice. Some terms and restrictions may apply to certain loan programs Refinancing existing loans may result in total finance charges being higher over the life of the loan, reduction in payments may partially reflect a longer loan term. This information is provided as guidance and illustrative purposes only and does not constitute legal or financial advice. We are not liable or bound legally for any answers provided to any user for our process or position on an issue. This information may change from time to time and at any time without notification. The most current information will be updated periodically and posted in the online forum.
spamspam Loan Servicing, LLC. NMLS#391521. nmlsconsumeraccess.org. You are receiving this information as a current loan customer with spamspam Loan Servicing, LLC. Not licensed for lending activities in any of the U.S. territories. Not authorized to originate loans in the State of New York. Licensed by the Dept. of Financial Protection and Innovation under the California Residential Mortgage .Lending Act #4131216.
This email was sent to somebody@gmail.com
Version 103023PCHPrAp9
` + "\ufeff" + `
spamspam Loan Servicing | 4425 Ponce de Leon Blvd 5-251 , Coral Gables, FL 33146-1837
Unsubscribe somebody@gmail.com
Update Profile |
Our Privacy Policy |
Constant Contact Data Notice
Sent by
marklake@spamspam.com`
require.Equal(t, expected, actual)
})
defer s.Close()
defer c.Close()
writeAndReadUntilLine(t, email, c, scanner, "250 2.0.0 OK: queued")
}
func TestSmtpBackend_HTMLOnly_FromDiskStation(t *testing.T) {
email := `EHLO example.com
MAIL FROM: synology@mydomain.me
RCPT TO: synology@mydomain.me
DATA
From: "=?UTF-8?B?Um9iYmll?=" <synology@mydomain.me>
To: <synology@mydomain.me>
Message-Id: <640e6f562895d.6c9584bcfa491ac9c546b480b32ffc1d@mydomain.me>
MIME-Version: 1.0
Subject: =?UTF-8?B?W1N5bm9sb2d5IE5BU10gVGVzdCBNZXNzYWdlIGZyb20gTGl0dHNfTkFT?=
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
Congratulations! You have successfully set up the email notification on Synology_NAS.<BR>For further system configurations, please visit http://192.168.1.28:5000/, http://172.16.60.5:5000/.<BR>(If you cannot connect to the server, please contact the administrator.)<BR><BR>From Synology_NAS<BR><BR><BR>
.
`
s, c, conf, scanner := newTestSMTPServer(t, func(w http.ResponseWriter, r *http.Request) {
require.Equal(t, "/synology", r.URL.Path)
require.Equal(t, "[Synology NAS] Test Message from Litts_NAS", r.Header.Get("Title"))
actual := readAll(t, r.Body)
expected := `Congratulations! You have successfully set up the email notification on Synology_NAS. For further system configurations, please visit http://192.168.1.28:5000/, http://172.16.60.5:5000/. (If you cannot connect to the server, please contact the administrator.) From Synology_NAS`
require.Equal(t, expected, actual)
})
conf.SMTPServerDomain = "mydomain.me"
conf.SMTPServerAddrPrefix = ""
defer s.Close()
defer c.Close()
writeAndReadUntilLine(t, email, c, scanner, "250 2.0.0 OK: queued")
}
func TestSmtpBackend_PlaintextWithToken(t *testing.T) {
email := `EHLO example.com
MAIL FROM: phil@example.com
@ -639,7 +1436,6 @@ func readUntilLine(t *testing.T, conn net.Conn, scanner *bufio.Scanner, expected
return
}
output += text + "\n"
//fmt.Println(text)
}
t.Fatalf("Expected line '%s' not found in output:\n%s", expectedLine, output)
}

View File

@ -5,8 +5,8 @@ import (
"sync"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
)
const (

View File

@ -69,7 +69,7 @@ func TestTopic_Subscribe_DuplicateID(t *testing.T) {
t.Parallel()
to := newTopic("mytopic")
// Fix random seed to force same number generation
//lint:ignore SA1019 Fix random seed to force same number generation
rand.Seed(1)
a := rand.Int()
to.subscribers[a] = &topicSubscriber{
@ -82,7 +82,7 @@ func TestTopic_Subscribe_DuplicateID(t *testing.T) {
return nil
}
// Force rand.Int to generate the same id once more
//lint:ignore SA1019 Force rand.Int to generate the same id once more
rand.Seed(1)
id := to.Subscribe(subFn, "b", func() {})
res := to.subscribers[id]

View File

@ -5,10 +5,10 @@ import (
"net/netip"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
)
// List of possible events

View File

@ -3,7 +3,7 @@ package server
import (
"context"
"fmt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"io"
"mime"
"net/http"

View File

@ -2,14 +2,14 @@ package server
import (
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/user"
"net/netip"
"sync"
"time"
"golang.org/x/time/rate"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
)
const (

View File

@ -3,7 +3,7 @@ package server
import (
"database/sql"
"errors"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"net/netip"
"time"

View File

@ -2,18 +2,13 @@ package test
import (
"fmt"
"heckel.io/ntfy/server"
"heckel.io/ntfy/v2/server"
"math/rand"
"net/http"
"path/filepath"
"testing"
"time"
)
func init() {
rand.Seed(time.Now().UnixMilli())
}
// StartServer starts a server.Server with a random port and waits for the server to be up
func StartServer(t *testing.T) (*server.Server, int) {
return StartServerWithConfig(t, server.NewConfig())

View File

@ -9,8 +9,8 @@ import (
"github.com/mattn/go-sqlite3"
"github.com/stripe/stripe-go/v74"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/log"
"heckel.io/ntfy/v2/util"
"net/netip"
"strings"
"sync"

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"net/netip"
"path/filepath"
"strings"

View File

@ -3,7 +3,7 @@ package user
import (
"errors"
"github.com/stripe/stripe-go/v74"
"heckel.io/ntfy/log"
"heckel.io/ntfy/v2/log"
"net/netip"
"regexp"
"strings"

View File

@ -2,7 +2,7 @@ package util_test
import (
"github.com/stretchr/testify/require"
"heckel.io/ntfy/util"
"heckel.io/ntfy/v2/util"
"math/rand"
"sync"
"testing"

730
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -39,5 +39,10 @@
"publish_dialog_attach_placeholder": "Atodi ffeil drwy URL, e.e. https://f-droid.org/F-Droid.apk",
"notifications_click_copy_url_button": "Copio linc",
"notifications_actions_open_url_title": "Ewch i {{url}}",
"publish_dialog_email_label": "Ebost"
"publish_dialog_email_label": "Ebost",
"signup_form_confirm_password": "Cadarnhau cyfrinair",
"signup_form_button_submit": "Cofrestru",
"common_back": "Yn ôl",
"common_copy_to_clipboard": "Copio i'r clipfwrdd",
"signup_already_have_account": "Gyda chyfrif yn barod? Mewngofnodi!"
}

View File

@ -0,0 +1,368 @@
{
"publish_dialog_message_placeholder": "Kirjoita viesti tähän",
"account_upgrade_dialog_tier_features_no_calls": "Ei puheluita",
"account_upgrade_dialog_billing_contact_email": "Laskutukseen liittyvissä kysymyksissä <Link>contact us</Link> suoraan.",
"account_tokens_dialog_title_create": "Luo käyttöoikeustunnus",
"prefs_reservations_dialog_title_edit": "Muokkaa varattua topikkia",
"account_basics_tier_interval_monthly": "Kuukausittain",
"publish_dialog_checkbox_publish_another": "Julkaise toinen",
"publish_dialog_details_examples_description": "Katso esimerkkejä ja yksityiskohtaisen kuvauksen kaikista lähetysominaisuuksista <docsLink>dokumentaatiosta</docsLink>.",
"account_basics_tier_canceled_subscription": "Tilauksesi peruutettiin ja se muutetaan maksuttomaksi tiliksi {{date}}.",
"priority_default": "oletus",
"prefs_notifications_min_priority_title": "Vähimmäisprioriteetti",
"account_upgrade_dialog_tier_features_calls_one": "{{calls}} päivittäisiä puheluja",
"account_upgrade_dialog_tier_current_label": "Nykyinen",
"action_bar_account": "Kirjautuminen",
"publish_dialog_filename_placeholder": "Liitetiedoston nimi",
"account_basics_password_dialog_current_password_incorrect": "Salasana virheellinen",
"account_tokens_table_token_header": "Token",
"prefs_notifications_delete_after_never": "Ei koskaan",
"prefs_users_description": "Lisää/poista käyttäjiä suojatuista topikeista täällä. Huomaa, että käyttäjätunnus ja salasana on tallennettu selaimen paikalliseen tallennustilaan.",
"account_basics_phone_numbers_dialog_number_label": "Puhelinnumero",
"subscribe_dialog_subscribe_description": "Aiheet eivät välttämättä ole salasanasuojattuja, joten valitse nimi, jota ei ole helposti arvatavissa. Kun olet tilannut, voit käyttää PUT/POST ilmoituksia.",
"action_bar_logo_alt": "ntfy logo",
"account_basics_password_dialog_button_submit": "Vaihda salasana",
"publish_dialog_emoji_picker_show": "Valitse emoji",
"account_basics_username_title": "Käyttäjätunnus",
"login_disabled": "Kirjautuminen poissa käytöstä",
"account_basics_phone_numbers_dialog_check_verification_button": "Vahvista koodi",
"account_upgrade_dialog_interval_yearly_discount_save_up_to": "säästä jopa {{discount}}%",
"account_tokens_dialog_label": "Etiketti, esim. Tutka-ilmoitukset",
"common_add": "Lisää",
"account_tokens_table_expires_header": "Vanhenee",
"account_upgrade_dialog_proration_info": "<strong>Osuus suhde</strong>: Kun päivität maksullisten pakettien välillä, hintaero <strong>veloitetaan välittömästi</strong>. Kun siirryt alemmalle tasolle, saldoa käytetään tulevien laskutuskausien maksamiseen.",
"prefs_reservations_dialog_access_label": "Oikeudet",
"account_usage_attachment_storage_title": "Liiteiden säilytys",
"prefs_users_dialog_username_label": "Username, esim pena",
"message_bar_error_publishing": "Virhe ilmoituksen julkaisemisessa",
"publish_dialog_chip_delay_label": "Viivästytä toimitusta",
"account_usage_messages_title": "Julkaistut viestit",
"notifications_attachment_open_button": "Avaa liite",
"emoji_picker_search_clear": "Tyhjennä haku",
"prefs_reservations_table_not_subscribed": "Ei tilattu",
"publish_dialog_topic_placeholder": "Topikin nimi, esim. erkin_hälyt",
"account_upgrade_dialog_tier_features_emails_other": "{{emails}} päivittäisiä emaileja",
"prefs_notifications_min_priority_max_only": "Vain maksimi prioriteetti",
"account_upgrade_dialog_tier_features_calls_other": "{{calls}} päivittäisiä puheluja",
"prefs_notifications_sound_description_some": "Ilmoitukset soittavat {{sound}} äänen saapuessaan",
"prefs_reservations_edit_button": "Muokkaa topikin oikeuksia",
"account_basics_phone_numbers_dialog_verify_button_sms": "Lähetä SMS",
"account_basics_tier_change_button": "Vaihda",
"account_tokens_dialog_expires_never": "Käyttöoikeus ei vanhene koskaan",
"subscribe_dialog_login_title": "Kirjautuminen vaaditaan",
"account_tokens_dialog_expires_x_days": "Tunnus vanhenee {{days}} päivän kuluttua",
"notifications_new_indicator": "Uusi ilmoitus",
"prefs_reservations_table_everyone_read_only": "Minä voin julkaista ja tilata, kaikki voivat tilata",
"prefs_reservations_table_everyone_deny_all": "Vain minä voin julkaista ja tilata",
"publish_dialog_chip_topic_label": "Vaihda topikkia",
"account_basics_phone_numbers_dialog_description": "Jotta voit käyttää puheluilmoitusominaisuutta, sinun on lisättävä ja vahvistettava vähintään yksi puhelinnumero. Vahvistus voidaan tehdä tekstiviestillä tai puhelimitse.",
"account_upgrade_dialog_tier_features_reservations_one": "{{reservations}} varatut topikit",
"publish_dialog_tags_placeholder": "Pilkuilla eroteltu luettelo tunnisteista, esim. varoitus, srv1-varmuuskopio",
"account_delete_title": "Poista tili",
"publish_dialog_attached_file_remove": "Poista liitetiedosto",
"nav_button_connecting": "yhdistää",
"account_delete_dialog_label": "Salasana",
"subscribe_dialog_login_button_login": "Kirjaudu",
"account_upgrade_dialog_tier_features_no_reservations": "Ei varattuja topikkeja",
"message_bar_type_message": "Kirjoita viesti tähän",
"publish_dialog_base_url_label": "Palvelun URL",
"signup_form_confirm_password": "Vahvista salasana",
"prefs_users_table_cannot_delete_or_edit": "Kirjautunutta käyttäjää ei voi poistaa tai muokata",
"account_basics_tier_admin_suffix_with_tier": "(mukana {{tier}} tier)",
"prefs_notifications_delete_after_three_hours_description": "Ilmoitukset poistetaan automaattisesti kolmen tunnin kuluttua",
"publish_dialog_chip_email_label": "Lähetä sähköpostiin",
"publish_dialog_attach_label": "Liitteen URL-osoite",
"signup_form_username": "Käyttäjätunnus",
"prefs_notifications_delete_after_three_hours": "Kolmen tunnin jälkeen",
"nav_button_muted": "Ilmoitukset mykistetty",
"action_bar_profile_settings": "Asetukset",
"signup_error_creation_limit_reached": "Tilin lisäämisraja saavutettu",
"notifications_attachment_open_title": "Siirry osoitteeseen {{url}}",
"prefs_notifications_min_priority_description_x_or_higher": "Näytä ilmoitukset, jos prioriteetti on {{number}} ({{name}}) tai suurempi",
"reservation_delete_dialog_description": "Varauksen poistaminen luopuu topikin omistajuudesta ja antaa muiden varata sen. Voit säilyttää tai poistaa olemassa olevia viestejä ja liitteitä.",
"subscribe_dialog_login_username_label": "Käyttäjätunnus, esim. pentti",
"subscribe_dialog_error_user_not_authorized": "Käyttäjää {{username}} ei ole valtuutettu",
"prefs_reservations_table_everyone_read_write": "Jokainen voi julkaista ja tilata",
"prefs_reservations_dialog_title_delete": "Poista topikin varaus",
"prefs_users_table": "Käyttäjä taulukko",
"prefs_reservations_table_topic_header": "Topikki",
"action_bar_toggle_mute": "Hiljennä/poista hiljennys",
"reservation_delete_dialog_submit_button": "Poista varaus",
"account_basics_title": "Tili",
"nav_button_documentation": "Käyttäjä oppaat",
"prefs_reservations_limit_reached": "Olet saavuttanut varattujen topikkien rajan.",
"account_upgrade_dialog_interval_monthly": "Kuukausittain",
"prefs_users_add_button": "Lisää käyttäjä",
"account_upgrade_dialog_tier_features_messages_other": "{{messages}} päivittäisiä viestejä",
"publish_dialog_delay_reset": "Poista viivästetty toimitus",
"account_basics_phone_numbers_no_phone_numbers_yet": "Ei puhelinnumeroita vielä",
"action_bar_toggle_action_menu": "Avaa/sulje toiminto valikko",
"subscribe_dialog_subscribe_button_generate_topic_name": "Luo nimi",
"notifications_list_item": "Ilmoitus",
"prefs_appearance_language_title": "Kieli",
"notifications_attachment_link_expired": "latauslinkki vanhentunut",
"subscribe_dialog_login_password_label": "Salasana",
"prefs_notifications_delete_after_one_day_description": "Ilmoitukset poistetaan automaattisesti yhden päivän kuluttua",
"subscribe_dialog_subscribe_button_subscribe": "Tilaa",
"account_tokens_table_never_expires": "Ei vanhene koskaan",
"account_tokens_delete_dialog_title": "Poista käyttöoikeustunnus",
"prefs_notifications_delete_after_one_month": "Kuukauden kuluttua",
"publish_dialog_chip_call_label": "Puhelu",
"account_basics_phone_numbers_dialog_title": "Lisää puhelinnumero",
"account_tokens_delete_dialog_description": "Ennen kuin poistat käyttöoikeustunnuksen, varmista, että mikään sovellus tai komentosarja ei käytä sitä aktiivisesti. <strong>Tätä toimintoa ei voi kumota</strong>.",
"nav_button_all_notifications": "Kaikki ilmoitukset",
"account_upgrade_dialog_button_cancel": "Peruuta",
"notifications_attachment_image": "Liitekuva",
"account_tokens_table_label_header": "Merkki",
"notifications_attachment_file_document": "muu asiakirja",
"publish_dialog_button_cancel": "Peruuta",
"account_upgrade_dialog_billing_contact_website": "Laskutukseen liittyvissä kysymyksissä käy <Link>website</Link>.",
"signup_form_button_submit": "Kirjaudu linkki",
"account_basics_username_admin_tooltip": "Olet pääkäyttäjä",
"prefs_notifications_delete_after_never_description": "Ilmoituksia eivät koskaan poisteta automaattisesti",
"account_delete_dialog_description": "Tämä poistaa pysyvästi tilisi, mukaan lukien kaikki palvelimelle tallennetut tiedot. Poistamisen jälkeen käyttäjätunnuksesi on poissa käytöstä 7 päivään. Jos todella haluat jatkaa, vahvista salasanasi alla olevaan kenttään.",
"publish_dialog_email_reset": "Poista sähköpostin edelleenlähetys",
"account_upgrade_dialog_tier_features_reservations_other": "{{reservations}} varatut topikit",
"account_usage_reservations_none": "Tälle tilille ei ole varattu topikkeja",
"prefs_notifications_sound_description_none": "Ilmoitukset eivät toista ääntä saapuessaan",
"account_tokens_description": "Käytä käyttjätunnuksia, kun julkaiset ja tilaat ntfy API:n kautta, jotta sinun ei tarvitse lähettää tilisi tunnistetietoja. Katso lisätietoja <Link>documentation</Link>.",
"common_back": "Takaisin",
"prefs_reservations_table": "Varattujen topikkien taulukko",
"emoji_picker_search_placeholder": "Etsi emoji",
"subscribe_dialog_subscribe_topic_placeholder": "Topikin nimi, esim. pentin_hälyt",
"account_upgrade_dialog_button_cancel_subscription": "Peruuta tilaus",
"notifications_attachment_file_audio": "äänitiedosto",
"account_upgrade_dialog_tier_features_emails_one": "{{emails}} päivittäisiä emaileja",
"action_bar_sign_up": "Kirjautuminen",
"account_upgrade_dialog_tier_features_attachment_file_size": "{{filesize}} tiedostokoko",
"notifications_mark_read": "Merkitse luetuksi",
"prefs_reservations_description": "Voit varata topikien nimiä henkilökohtaiseen käyttöön täältä. Aiheen varaaminen antaa sinulle topikin omistajuuden ja voit määrittää topikkiin liittyviä käyttöoikeuksia muille käyttäjille.",
"notifications_attachment_copy_url_title": "Kopioi liitteen URL-osoite leikepöydälle",
"account_usage_title": "Käytössä",
"account_basics_tier_upgrade_button": "Päivitä Pro versioon",
"prefs_users_description_no_sync": "Käyttäjiä ja salasanoja ei ole synkronoitu tiliisi.",
"account_tokens_dialog_title_edit": "Muokkaa käyttöoikeustunnusta",
"nav_button_publish_message": "Julkaisutiedot",
"prefs_users_table_base_url_header": "Palvelin URL",
"notifications_click_copy_url_title": "Kopioi linkin URL-osoite leikepöydälle",
"publish_dialog_attach_reset": "Poista liitteen URL-osoite",
"account_upgrade_dialog_tier_features_messages_one": "{{messages}} päivittäisiä viestejä",
"account_upgrade_dialog_reservations_warning_one": "Valittu taso sallii vähemmän varattuja topikeita kuin nykyinen tasosi. Ennen kuin muutat tasosi, <strong>poista vähintään yksi varaus</strong>. Voit poistaa varauksia <Link>Asetuksista</Link>.",
"common_copy_to_clipboard": "Kopioi leikkelepöydälle",
"alert_not_supported_description": "Selaimesi ei tue ilmoituksia.",
"subscribe_dialog_error_topic_already_reserved": "Topikki on jo varattu",
"message_bar_publish": "Julkaise viesti",
"alert_grant_description": "Myönnä selaimelle lupa näyttää työpöytäilmoituksia.",
"prefs_users_table_user_header": "Käyttäjä",
"error_boundary_stack_trace": "Pinon jälki",
"prefs_users_dialog_password_label": "Salasana",
"prefs_notifications_delete_after_one_week": "Viikon kuluttua",
"publish_dialog_priority_low": "Matala tärkeys",
"publish_dialog_priority_label": "Prioriteetti",
"prefs_reservations_delete_button": "Poista topikin oikeudet",
"account_basics_tier_admin_suffix_no_tier": "(no tier)",
"prefs_notifications_delete_after_one_week_description": "Ilmoitukset poistetaan automaattisesti viikon kuluttua",
"error_boundary_unsupported_indexeddb_description": "Ntfy-verkkosovellus tarvitsee IndexedDB:n toimiakseen, eikä selaimesi tue IndexedDB:tä yksityisessä selaustilassa.<br/><br/>Vaikka tämä on valitettavaa, ntfy-verkon käyttäminen ei myöskään ole kovin järkevää yksityisessä selaustilassa, koska kaikki on tallennettu selaimen tallennustilaan. Voit lukea siitä lisää <githubLink>tästä GitHub-numerosta</githubLink> tai puhua meille <discordLink>Discordissa</discordLink> tai <matrixLink>Matrixissa</matrixLink>.",
"subscribe_dialog_subscribe_button_cancel": "Peruuta",
"notifications_attachment_copy_url_button": "Kopioi URL",
"account_basics_tier_payment_overdue": "Maksusi on myöhässä. Päivitä maksutapasi, tai tilisi poistetaan pian.",
"publish_dialog_title_placeholder": "Ilmoituksen otsikko, esim. Levytilan hälytys",
"account_basics_tier_description": "Tilisi taso",
"account_basics_phone_numbers_description": "Puheluilmoituksia varten",
"prefs_reservations_dialog_title_add": "Varaa topikki",
"account_basics_tier_free": "Vapaa",
"account_upgrade_dialog_cancel_warning": "Tämä <strong>peruuttaa tilauksesi</strong> ja alentaa tilisi {{date}}. Tuona päivänä topikit sekä palvelimen välimuistissa olevat viestit <strong>poistetaan</strong>.",
"notifications_click_copy_url_button": "Kopioi linkki",
"account_basics_tier_admin": "Admin",
"subscribe_dialog_subscribe_title": "Tilaa topikki",
"nav_topics_title": "Tilatut topikit",
"prefs_notifications_sound_title": "Ilmoitusääni",
"prefs_notifications_min_priority_default_and_higher": "Oletusprioriteetti ja korkeammat",
"prefs_reservations_table_access_header": "Oikeudet",
"action_bar_show_menu": "Näytä menu",
"action_bar_settings": "Asetukset",
"notifications_copied_to_clipboard": "Kopioitu leikepöydälle",
"account_delete_dialog_button_cancel": "Peruuta",
"publish_dialog_delay_placeholder": "Toimituksen viivästyminen, esim. {{unixTimestamp}}, {{relativeTime}} tai \"{{naturalLanguage}}\" (vain englanti)",
"account_tokens_table_copied_to_clipboard": "Käyttöoikeustunnus kopioitu",
"alert_grant_title": "Ilmoitukset on poistettu käytöstä",
"account_tokens_dialog_expires_x_hours": "Tunnus vanhenee {{hours}} tunnin kuluttua",
"prefs_users_edit_button": "Muokkaa käyttäjää",
"account_upgrade_dialog_title": "Muuta tilitasoa",
"publish_dialog_chip_call_no_verified_numbers_tooltip": "Ei vahvistettuja puhelinnumeroita",
"priority_low": "matala",
"prefs_reservations_table_click_to_subscribe": "Tilaa napsauttamalla",
"account_basics_password_description": "Vaihda tilisi salasana",
"publish_dialog_call_label": "Puhelu",
"account_usage_calls_title": "Soitetut puhelut",
"error_boundary_description": "Näin ei selvästikään pitäisi tapahtua. Pahoittelut tästä.<br/>Jos sinulla on hetki aikaa, <githubLink>ilmoita tästä GitHubissa</githubLink> tai ilmoita meille <discordLink>Discordin</discordLink> tai <matrixLink>Matrix</matrixLink> kautta.",
"signup_form_toggle_password_visibility": "Vaihda salasanan näkyvyys",
"login_link_signup": "Kirjaudu linkki",
"publish_dialog_message_label": "Viesti",
"publish_dialog_attached_file_title": "Liitetiedosto:",
"priority_min": "min",
"action_bar_sign_in": "Kirjaudu sisään",
"action_bar_unsubscribe": "Peruuta tilaus",
"account_basics_tier_basic": "Perus",
"signup_title": "Lisää ntfy tili",
"prefs_notifications_min_priority_description_any": "Näytetään kaikki ilmoitukset tärkeydestä riippumatta",
"error_boundary_gathering_info": "Kerää lisätietoja…",
"publish_dialog_priority_max": "Max. prioriteetti",
"error_boundary_unsupported_indexeddb_title": "Yksityistä selaamista ei tueta",
"prefs_notifications_delete_after_one_day": "Yhden päivän jälkeen",
"error_boundary_title": "Voi ei, ntfy kaatui",
"action_bar_change_display_name": "Näyttönimen vaihtaminen",
"notifications_attachment_file_app": "Android-sovellustiedosto",
"alert_not_supported_context_description": "Ilmoituksia tuetaan vain HTTPS:n kautta. Tämä on <mdnLink>Ilmoitussovellusliittymän</mdnLink> rajoitus.",
"reservation_delete_dialog_action_keep_description": "Palvelimelle välimuistiin tallennetut viestit ja liitteet tulevat julkiseksi topikin nimen tietävälle henkilölle.",
"prefs_reservations_add_button": "Lisää varattu topik",
"prefs_reservations_title": "Varatut topikit",
"account_basics_phone_numbers_copied_to_clipboard": "Puhelinnumero kopioitu leikepöydälle",
"prefs_reservations_dialog_description": "Topikin varaaminen antaa sinulle aiheen omistajuuden ja voit määrittää aiheeseen liittyviä käyttöoikeuksia muille käyttäjille.",
"account_basics_tier_title": "Tilin tyyppi",
"account_usage_cannot_create_portal_session": "Laskutusportaalin avaaminen epäonnistui",
"account_tokens_delete_dialog_submit_button": "Poista tunnus pysyvästi",
"account_delete_description": "Poista tilisi pysyvästi",
"account_basics_phone_numbers_dialog_number_placeholder": "esim. +35812345678",
"account_basics_phone_numbers_dialog_code_placeholder": "esim. 123456",
"prefs_notifications_title": "Ilmoitukset",
"account_basics_tier_manage_billing_button": "Hallinnoi laskutusta",
"account_tokens_title": "Käyttöoikeudet",
"publish_dialog_email_label": "Email",
"account_basics_username_description": "Hei, se olet sinä ❤",
"prefs_reservations_dialog_topic_label": "Topik",
"account_basics_password_dialog_confirm_password_label": "Vahvista salasana",
"action_bar_reservation_edit": "Muokkaa varatopikkia",
"publish_dialog_base_url_placeholder": "Palvelun URL-osoite, esim. https://example.com",
"prefs_users_title": "Hallinnoi käyttäjiä",
"account_basics_tier_interval_yearly": "vuosittain",
"account_upgrade_dialog_tier_price_billed_monthly": "{{price}} Laskutetaan kuukausittain.",
"action_bar_clear_notifications": "Poista kaikki ilmoitukset",
"account_delete_dialog_button_submit": "Poista tili pysyvästi",
"account_basics_phone_numbers_dialog_channel_call": "Soitto",
"account_basics_password_title": "Salasana",
"account_basics_password_dialog_new_password_label": "Uusi salasana",
"nav_upgrade_banner_label": "Päivitä ntfy Prohon",
"account_tokens_dialog_expires_unchanged": "Jätä viimeinen käyttöpäivä ennalleen",
"publish_dialog_delay_label": "Viive",
"error_boundary_button_copy_stack_trace": "Kopioi pinon jälki",
"publish_dialog_button_send": "Lähetä",
"action_bar_reservation_delete": "Poista varatopikit",
"publish_dialog_button_cancel_sending": "Peruuta lähetys",
"account_tokens_dialog_title_delete": "Poista käyttöoikeustunnus",
"account_usage_of_limit": "limiitistä {{limit}}",
"publish_dialog_attach_placeholder": "Liitä tiedosto URL-osoitteen mukaan, esim. https://f-droid.org/F-Droid.apk",
"publish_dialog_email_placeholder": "Osoite, johon ilmoitus välitetään, esim. urpo@example.com",
"notifications_attachment_link_expires": "linkki vanhenee {{date}}",
"action_bar_send_test_notification": "Lähetä testi ilmoitus",
"reservation_delete_dialog_action_keep_title": "Säilytä välimuistissa olevat viestit ja liitteet",
"prefs_notifications_sound_no_sound": "Ei ääntä",
"account_upgrade_dialog_interval_yearly": "Vuosittain",
"publish_dialog_tags_label": "Tagit",
"signup_form_password": "Salasana",
"action_bar_reservation_limit_reached": "Varatopikien raja",
"account_upgrade_dialog_button_redirect_signup": "Kirjaudu nyt",
"publish_dialog_click_placeholder": "URL-osoite, joka avautuu, kun ilmoitusta napsautetaan",
"alert_not_supported_title": "Ilmoituksia ei tueta",
"account_tokens_dialog_button_cancel": "Peruuta",
"subscribe_dialog_error_user_anonymous": "Anonyymi",
"account_upgrade_dialog_tier_price_billed_yearly": "{{price}} laskutetaan vuosittain. Tallenna {{save}}.",
"prefs_notifications_min_priority_high_and_higher": "Korkea prioriteetti ja korkeammat",
"account_usage_basis_ip_description": "Tämän tilin käyttötilastot ja rajoitukset perustuvat IP-osoitteeseesi, joten ne voidaan jakaa muiden käyttäjien kanssa. Yllä esitetyt rajat ovat likimääräisiä perustuen olemassa oleviin rajoituksiin.",
"publish_dialog_priority_high": "Korkea prioriteetti",
"login_form_button_submit": "Kirjaudu",
"account_basics_password_dialog_title": "Vaihda salasana",
"priority_max": "max",
"notifications_attachment_file_image": "kuvatiedosto",
"account_usage_limits_reset_daily": "Käyttörajat nollataan päivittäin keskiyöllä (UTC)",
"account_usage_unlimited": "Rajoittamaton",
"prefs_users_delete_button": "Poista käyttäjä",
"publish_dialog_click_label": "Napsauta URL-osoitetta",
"prefs_notifications_min_priority_any": "Kaikki prioriteetit",
"account_tokens_dialog_expires_label": "Käyttöoikeustunnus vanhenee",
"publish_dialog_filename_label": "Tiedostonimi",
"publish_dialog_chip_attach_file_label": "Liitä paikallinen tiedosto",
"account_basics_phone_numbers_title": "Puhelinnumerot",
"prefs_notifications_delete_after_title": "Poista ilmoitukset",
"account_upgrade_dialog_interval_yearly_discount_save": "säästä {{discount}}%",
"signup_disabled": "Kirjautuminen estetty",
"publish_dialog_drop_file_here": "Pudota tiedosto tähän",
"prefs_users_dialog_title_edit": "Muokkaa käyttäjää",
"account_basics_password_dialog_current_password_label": "Nykyinen salasana",
"prefs_notifications_min_priority_low_and_higher": "Matala prioriteetti ja korkeammat",
"action_bar_profile_title": "Profiili",
"account_tokens_dialog_button_update": "Päivitä tunnus",
"account_upgrade_dialog_tier_features_attachment_total_size": "{{totalsize}} lopullinen tiedostokoko",
"publish_dialog_title_label": "Otsikko",
"prefs_reservations_table_everyone_write_only": "Minä voin julkaista ja tilata, kaikki voivat julkaista",
"prefs_appearance_title": "Näkymä",
"publish_dialog_topic_reset": "Resetoi topikki",
"account_tokens_table_cannot_delete_or_edit": "Nykyistä istuntotunnusta ei voi muokata tai poistaa",
"notifications_tags": "Tagit",
"prefs_notifications_sound_play": "Toista valittu ääni",
"account_tokens_table_last_access_header": "Viimeinen käyty",
"action_bar_profile_logout": "Kirjaudu ulos",
"publish_dialog_attached_file_filename_placeholder": "Liitetiedoston nimi",
"publish_dialog_priority_default": "Oletusprioriteetti",
"subscribe_dialog_subscribe_base_url_label": "Palvelimen URL",
"account_tokens_table_last_origin_tooltip": "Napsauta IP-osoitteesta {{ip}}, etsiäksesi",
"account_usage_reservations_title": "Varatut topikit",
"account_upgrade_dialog_tier_price_per_month": "Kuukausi",
"message_bar_show_dialog": "Näytä julkaisu dialogi",
"publish_dialog_chip_attach_url_label": "Liitä tiedosto URL-osoitteen mukaan",
"account_usage_calls_none": "Tällä tilillä ei voi soittaa puheluita",
"notifications_click_open_button": "Avaa linkki",
"account_tokens_table_current_session": "Nykyinen selainistunto",
"account_upgrade_dialog_button_pay_now": "Maksa nyt ja tilaa",
"nav_upgrade_banner_description": "Varaa aiheita, lisää viestejä ja sähköposteja sekä suurempia liitteitä",
"publish_dialog_call_reset": "Poista puhelu",
"publish_dialog_other_features": "Muut ominaisuudet:",
"subscribe_dialog_subscribe_use_another_label": "Käytä toista palvelinta",
"reservation_delete_dialog_action_delete_title": "Poista välimuistissa olevat viestit ja liitteet",
"signup_error_username_taken": "Käyttäjätunnus {{username}} on jo varattu",
"account_basics_phone_numbers_dialog_code_label": "Vahvistuskoodi",
"nav_button_subscribe": "Tilaa topik",
"publish_dialog_topic_label": "Topikin nimi",
"reservation_delete_dialog_action_delete_description": "Välimuistissa olevat viestit ja liitteet poistetaan pysyvästi. Tätä toimintoa ei voi kumota.",
"alert_grant_button": "Myönnä nyt",
"account_basics_tier_paid_until": "Tilaus maksettu {{date}} asti, ja se uusitaan automaattisesti",
"account_usage_attachment_storage_description": "{{tiedostokoko}} per tiedosto, poistettu {{expiry}} jälkeen",
"publish_dialog_chip_click_label": "Napsauta URL-osoitetta",
"prefs_notifications_delete_after_one_month_description": "Ilmoitukset poistetaan automaattisesti kuukauden kuluttua",
"common_cancel": "Peruuta",
"account_basics_phone_numbers_dialog_verify_button_call": "Soita minulle",
"signup_already_have_account": "Onko sinulla jo tili ? Kirjaudu sisään !",
"publish_dialog_call_item": "Soita puhelinnumeroon {{number}}",
"nav_button_account": "Tili",
"publish_dialog_click_reset": "Poista napsautettava URL-osoite",
"login_title": "Kirjaudu sisään ntfy-tilillesi",
"notifications_list": "Ilmoitusluettelo",
"common_save": "Tallenna",
"prefs_users_dialog_base_url_label": "Palvelin URL, esim. https://ntfy.sh",
"account_usage_emails_title": "Sähköpostit lähetetty",
"account_basics_phone_numbers_dialog_channel_sms": "SMS",
"action_bar_reservation_add": "Varalla oleva topikki",
"account_upgrade_dialog_tier_selected_label": "Valittu",
"account_upgrade_dialog_button_update_subscription": "Päivitä tilaus",
"notifications_attachment_file_video": "videotiedosto",
"priority_high": "korkea",
"notifications_priority_x": "Prioriteetti {{priority}}",
"account_delete_dialog_billing_warning": "Tilin poistaminen peruuttaa myös laskutustilauksesi välittömästi. Et voi enää käyttää laskutuksen hallintapaneelia.",
"prefs_notifications_min_priority_description_max": "Näytä ilmoitukset, jos prioriteetti on 5 (max)",
"subscribe_dialog_login_description": "Tämä Topikki on suojattu salasanalla. Anna käyttäjätunnus ja salasana.",
"account_upgrade_dialog_reservations_warning_other": "Valittu taso sallii vähemmän varattuja topikkeja kuin nykyinen tasosi. Ennen kuin muutat tasosi, <strong>poista vähintään {{count}} varausta</strong>. Voit poistaa varauksia <Link>Asetuksista</Link>.",
"prefs_users_dialog_title_add": "Lisää käyttäjä",
"account_tokens_dialog_button_create": "Luo tunnus",
"nav_button_settings": "Asetukset",
"publish_dialog_priority_min": "Min. etusijalla",
"account_tokens_table_create_token_button": "Luo käyttöoikeustunnus",
"notifications_delete": "Poista",
"notifications_actions_not_supported": "Toimintoa ei tueta verkkosovelluksessa",
"notifications_actions_open_url_title": "Siirry osoitteeseen {{url}}",
"notifications_none_for_any_title": "Et ole saanut ilmoituksia.",
"notifications_none_for_topic_description": "Jos haluat lähettää ilmoituksia tähän topikkiin, PUT tai POST topikin URL-osoitteeseen.",
"notifications_none_for_any_description": "Jos haluat lähettää ilmoituksia topikkiin, PUT tai POST topikin URL-osoitteeseen. Tässä on esimerkki yhden topikin käyttämisestä.",
"notifications_no_subscriptions_title": "Näyttää siltä, että sinulla ei ole vielä tilauksia.",
"notifications_none_for_topic_title": "Et ole vielä saanut ilmoituksia tästä topikista.",
"notifications_actions_http_request_title": "Lähetä HTTP {{method}} to {{url}}"
}

View File

@ -304,5 +304,8 @@
"account_usage_basis_ip_description": "Le statistiche di utilizzo e i limiti per questo account sono basati sul tuo indirizzo IP, quindi potrebbero essere in condivisione con altri utenti. I limiti mostrati sopra sono approssimazioni basate sui limiti esistenti.",
"account_usage_calls_none": "Questo account non può effettuare chiamate",
"account_delete_dialog_billing_warning": "Eliminando il tuo account perderai immediatamente il tuo abbonamento. Non potrai più accedere alla dashboard di fatturazione.",
"account_delete_dialog_label": "Password"
"account_delete_dialog_label": "Password",
"account_upgrade_dialog_tier_features_no_reservations": "Nessun argomento riservato",
"account_upgrade_dialog_tier_features_messages_one": "{{messages}} messaggi giornalieri",
"account_upgrade_dialog_reservations_warning_one": "Il livello selezionato consente meno argomenti riservati rispetto al livello corrente. Prima di cambiare il livello, <strong> si prega di eliminare almeno una prenotazione</strong>. È possibile rimuovere le prenotazioni nel <Link>Impostazioni</Link>."
}

View File

@ -192,7 +192,7 @@
"action_bar_reservation_add": "Reserve topic",
"action_bar_reservation_edit": "Change reservation",
"signup_disabled": "Registrar está desativado",
"signup_error_username_taken": "Usuário {{username}} já existe",
"signup_error_username_taken": "Usuário {{username}} já existe",
"signup_error_creation_limit_reached": "Limite de criação de contas atingido",
"action_bar_reservation_delete": "Remover reserva",
"action_bar_account": "Conta",

View File

@ -231,7 +231,7 @@
"prefs_reservations_dialog_title_delete": "Odstrániť rezervovanú tému",
"prefs_users_table": "Tabuľka používateľov",
"prefs_reservations_table_topic_header": "Téma",
"reservation_delete_dialog_submit_button": "Odstrániť rezerváciu",
"reservation_delete_dialog_submit_button": "Vymazať rezerváciu",
"prefs_reservations_limit_reached": "Dosiahli ste limit rezervovaných tém.",
"account_upgrade_dialog_interval_monthly": "Mesačne",
"prefs_users_add_button": "Pridať používateľa",

View File

@ -1,408 +1,407 @@
{
"action_bar_show_menu": "顯示選單",
"account_basics_password_description": "更改你的帳戶密碼",
"account_basics_password_dialog_button_submit": "更改密碼",
"account_basics_password_dialog_confirm_password_label": "確認密碼",
"account_basics_password_dialog_current_password_incorrect": "密碼錯誤",
"account_basics_password_dialog_current_password_label": "當前密碼",
"account_basics_password_dialog_new_password_label": "新密碼",
"account_basics_password_dialog_title": "更改密碼",
"account_basics_password_title": "密碼",
"account_basics_phone_numbers_copied_to_clipboard": "電話號碼已複製到剪貼板",
"account_basics_phone_numbers_description": "電話通知",
"account_basics_phone_numbers_dialog_channel_call": "撥打",
"account_basics_phone_numbers_dialog_channel_sms": "短信",
"account_basics_phone_numbers_dialog_check_verification_button": "確認碼",
"account_basics_phone_numbers_dialog_code_label": "驗證碼",
"account_basics_phone_numbers_dialog_code_placeholder": "例如123456",
"account_basics_phone_numbers_dialog_description": "要使用來電通知功能,你需要新增並驗證至少一個電話號碼。可以通過短信或電話驗證。",
"account_basics_phone_numbers_dialog_number_label": "電話號碼",
"account_basics_phone_numbers_dialog_number_placeholder": "例如:+1222333444",
"account_basics_phone_numbers_dialog_title": "新增電話號碼",
"account_basics_phone_numbers_dialog_verify_button_call": "撥打電話",
"account_basics_phone_numbers_dialog_verify_button_sms": "發送資訊",
"account_basics_phone_numbers_no_phone_numbers_yet": "無可執行的電話號碼",
"account_basics_phone_numbers_title": "電話號碼",
"account_basics_tier_admin_suffix_no_tier": "(無等級)",
"account_basics_tier_admin_suffix_with_tier": "(有 {{tier}} 等級)",
"account_basics_tier_admin": "管理員",
"account_basics_tier_basic": "基礎版",
"account_basics_tier_canceled_subscription": "你的訂閱已取消,並將在 {{date}} 降級為免費帳戶。",
"account_basics_tier_change_button": "改變",
"account_basics_tier_description": "你帳戶的權限級別",
"account_basics_tier_free": "免費",
"account_basics_tier_interval_monthly": "每月",
"account_basics_tier_interval_yearly": "每年",
"account_basics_tier_manage_billing_button": "管理計費",
"account_basics_tier_paid_until": "訂閱已支付至 {{date}},並將自動續訂",
"account_basics_tier_payment_overdue": "你的付款已逾期。請更新你的付款方式,否則你的帳戶將很快被降級。",
"account_basics_tier_title": "帳戶類型",
"account_basics_tier_upgrade_button": "升級到專業版",
"account_basics_title": "帳戶",
"account_basics_username_admin_tooltip": "你是管理員",
"account_basics_username_description": "嘿,那是你 ❤",
"account_basics_username_title": "用戶名",
"account_delete_description": "永久刪除你的帳戶",
"account_delete_dialog_billing_warning": "刪除你的帳戶也會立即取消你的計費訂閱。你將無法再訪問計費儀錶板。",
"account_delete_dialog_button_cancel": "取消",
"account_delete_dialog_button_submit": "永久刪除帳戶",
"account_delete_dialog_description": "這將永久刪除你的帳戶,包括存儲在伺服器上的所有數據。刪除後,你的用戶名將在 7 天內不可用。如果你真的想繼續,請在下面的框中使用你的密碼作確認。",
"account_delete_dialog_label": "密碼",
"account_delete_title": "刪除帳戶",
"account_tokens_delete_dialog_description": "在刪除訪問令牌之前,請確保沒有應用程序或腳本正在活躍使用它。 <strong>此操作無法撤銷</strong>。",
"account_tokens_delete_dialog_submit_button": "永久删除令牌",
"account_tokens_delete_dialog_title": "刪除訪問令牌",
"account_tokens_description": "通過 ntfy API 發布和訂閱時使用訪問令牌,因此你不必發送你的帳戶憑證。查看<Link>文檔</Link>以了解更多資訊。",
"account_tokens_dialog_button_cancel": "取消",
"account_tokens_dialog_button_create": "創建令牌",
"account_tokens_dialog_button_update": "更新令牌",
"account_tokens_dialog_expires_label": "訪問令牌過期於",
"account_tokens_dialog_expires_never": "令牌永不過期",
"account_tokens_dialog_expires_unchanged": "保持過期日期不變",
"account_tokens_dialog_expires_x_days": "令牌在 {{days}} 天後過期",
"account_tokens_dialog_expires_x_hours": "令牌在 {{hours}} 小時後過期",
"account_tokens_dialog_label": "標籤例如Radarr 通知",
"account_tokens_dialog_title_create": "創建訪問令牌",
"account_tokens_dialog_title_delete": "刪除訪問令牌",
"account_tokens_dialog_title_edit": "編輯訪問令牌",
"account_tokens_table_cannot_delete_or_edit": "無法編輯或刪除當前會話令牌",
"account_tokens_table_copied_to_clipboard": "已複製訪問令牌",
"account_tokens_table_create_token_button": "創建訪問令牌",
"account_tokens_table_current_session": "當前瀏覽器會話",
"account_tokens_table_expires_header": "過期",
"account_tokens_table_label_header": "標籤",
"account_tokens_table_last_access_header": "最後訪問",
"account_tokens_table_last_origin_tooltip": "於IP地址 {{ip}},點擊查找",
"account_tokens_table_never_expires": "永不過期",
"account_tokens_table_token_header": "令牌",
"account_tokens_title": "訪問令牌",
"account_upgrade_dialog_billing_contact_email": "有關賬單問題,請直接<Link>聯繫我們 </Link>。",
"account_upgrade_dialog_billing_contact_website": "有關賬單問題,請參考我們的<Link>網站 </Link>。",
"account_upgrade_dialog_button_cancel_subscription": "取消訂閱",
"account_upgrade_dialog_button_cancel": "取消",
"account_upgrade_dialog_button_pay_now": "立即付款並訂閱",
"account_upgrade_dialog_button_redirect_signup": "立即註冊",
"account_upgrade_dialog_button_update_subscription": "更新訂閱",
"account_upgrade_dialog_cancel_warning": "這將<strong>取消你的訂閱</strong>,並在 {{date}} 降級你的帳戶。在那一天,主題保留以及緩存在伺服器上的訊息<strong>將被刪除</strong>。",
"account_upgrade_dialog_interval_monthly": "每月",
"account_upgrade_dialog_interval_yearly_discount_save_up_to": "節省高達 {{discount}}%",
"account_upgrade_dialog_interval_yearly_discount_save": "節省 {{discount}}%",
"account_upgrade_dialog_interval_yearly": "每年",
"account_upgrade_dialog_proration_info": "<strong>按比例分配</strong>:在付費計劃之間升級時,差價將被<strong>立刻收取</strong>。在降級到較低級別時,餘額將被用於支付未來的賬單周期。",
"account_upgrade_dialog_reservations_warning_one": "所選等級允許的保留主題少於當前等級。在更改你的等級之前,<strong>請至少刪除 1 項保留</strong>。你可以在<Link>設置</Link>中刪除保留。",
"account_upgrade_dialog_reservations_warning_other": "所選等級允許的保留主題少於當前等級。在更改你的等級之前,<strong>請至少刪除 {{count}} 項保留</strong>。你可以在<Link>設置</Link>中刪除保留。",
"account_upgrade_dialog_tier_current_label": "當前",
"account_upgrade_dialog_tier_features_attachment_file_size": "每個文件 {{filesize}} ",
"account_upgrade_dialog_tier_features_attachment_total_size": "{{totalsize}} 總存儲空間",
"account_upgrade_dialog_tier_features_calls_one": "每日一通電話",
"account_upgrade_dialog_tier_features_calls_other": "每日{{calls}} 通電話",
"account_upgrade_dialog_tier_features_emails_one": "每日一封郵件",
"account_upgrade_dialog_tier_features_emails_other": "每日 {{emails}} 條郵件",
"account_upgrade_dialog_tier_features_messages_one": "每日一條訊息",
"account_upgrade_dialog_tier_features_messages_other": "每日 {{messages}} 條訊息",
"account_upgrade_dialog_tier_features_no_calls": "沒有電話",
"account_upgrade_dialog_tier_features_no_reservations": "無保留主題",
"account_upgrade_dialog_tier_features_reservations_one": "保留一條主題",
"account_upgrade_dialog_tier_features_reservations_other": "保留 {{reservations}} 條主題",
"account_upgrade_dialog_tier_price_billed_monthly": "{{price}} 每年。按月計費。",
"account_upgrade_dialog_tier_price_billed_yearly": "{{價格}} 按年計費。節省 {{save}}。",
"account_upgrade_dialog_tier_price_per_month": "月",
"account_upgrade_dialog_tier_selected_label": "已選",
"account_upgrade_dialog_title": "更改帳戶等級",
"account_usage_attachment_storage_description": "每個文件 {{filesize}},在 {{expiry}} 後刪除",
"account_usage_attachment_storage_title": "附件存儲",
"account_usage_basis_ip_description": "此帳戶的使用統計資訊和限制基於你的 IP 地址,因此可能會與其他用戶共享。上面顯示的限制是基於現有速率限制的近似值。",
"account_usage_calls_none": "此帳號無法撥打電話",
"account_usage_calls_title": "已撥打電話",
"account_usage_cannot_create_portal_session": "無法打開計費門戶",
"account_usage_emails_title": "已發送電子郵件",
"account_usage_limits_reset_daily": "使用限制每天午夜 (UTC) 重置",
"account_usage_messages_title": "已發布訊息",
"account_usage_of_limit": "{{limit}} 的",
"account_usage_reservations_none": "此帳戶沒有保留主題",
"account_usage_reservations_title": "保留主題",
"account_usage_title": "使用量",
"account_usage_unlimited": "無限",
"action_bar_account": "帳戶",
"action_bar_change_display_name": "更改顯示名稱",
"action_bar_clear_notifications": "清除所有通知",
"action_bar_logo_alt": "ntfy 標識",
"action_bar_mute_notifications": "靜音",
"action_bar_settings": "設定",
"action_bar_profile_logout": "登出",
"action_bar_profile_settings": "設定",
"action_bar_profile_title": "個人資料",
"action_bar_reservation_add": "保留主題",
"action_bar_reservation_delete": "移除保留",
"action_bar_reservation_edit": "更改保留",
"action_bar_reservation_limit_reached": "達到限制",
"action_bar_send_test_notification": "發送測試通知",
"action_bar_clear_notifications": "清除所有通知",
"action_bar_unsubscribe": "取消訂閱",
"action_bar_settings": "設定",
"action_bar_show_menu": "顯示選單",
"action_bar_sign_in": "登錄",
"action_bar_sign_up": "註冊",
"action_bar_toggle_action_menu": "開啟或關閉操作選單",
"action_bar_toggle_mute": "通知靜音/解除通知靜音",
"action_bar_unmute_notifications": "取消靜音",
"message_bar_type_message": "在此處輸入訊息",
"message_bar_show_dialog": "顯示發布對話框",
"message_bar_publish": "發布訊息",
"nav_topics_title": "訂閱主題",
"nav_button_all_notifications": "全部通知",
"nav_button_documentation": "文檔",
"nav_button_publish_message": "發布通知",
"nav_button_subscribe": "訂閱主題",
"nav_button_connecting": "正在連接",
"alert_notification_permission_required_title": "已禁用通知",
"alert_notification_permission_required_description": "授予瀏覽器顯示桌面通知的權限。",
"alert_notification_permission_required_button": "現在授予",
"alert_not_supported_title": "不支援通知",
"alert_not_supported_description": "你的瀏覽器不支援通知。",
"action_bar_unsubscribe": "取消訂閱",
"alert_notification_ios_install_required_description": "要接收通知,請在 iOS 上點擊共享,然後添加到主屏幕",
"alert_notification_ios_install_required_title": "需要安裝 iOS 應用程式",
"alert_notification_permission_denied_description": "你已禁用通知。要重新啟用通知,請在瀏覽器設置中啟用通知。",
"alert_notification_permission_denied_title": "已禁用通知",
"notifications_list": "通知列表",
"notifications_list_item": "通知",
"notifications_mark_read": "標記為已讀",
"notifications_copied_to_clipboard": "複製到剪貼板",
"notifications_tags": "標記",
"notifications_priority_x": "優先級 {{priority}}",
"notifications_new_indicator": "新通知",
"notifications_attachment_open_button": "打開附件",
"notifications_attachment_link_expires": "連結在 {{date}} 過期",
"notifications_attachment_link_expired": "下載連結已過期",
"notifications_attachment_file_image": "圖片文件",
"notifications_attachment_image": "附件圖片",
"notifications_attachment_file_video": "影片文件",
"notifications_attachment_file_audio": "聲音文件",
"notifications_attachment_file_app": "安卓應用程式",
"notifications_attachment_file_document": "其他文件",
"notifications_click_copy_url_title": "複製鏈結地址到剪貼板",
"notifications_click_copy_url_button": "複製鏈結",
"notifications_click_open_button": "打開鏈結",
"action_bar_toggle_mute": "通知靜音/解除通知靜音",
"nav_button_muted": "已暫停通知",
"notifications_actions_not_supported": "網頁應用程序不支援此操作",
"notifications_none_for_topic_title": "你尚未收到有關此主題的任何通知。",
"notifications_none_for_any_title": "你尚未收到任何通知。",
"notifications_none_for_any_description": "要向此主題發送通知,只需使用 PUT 或 POST 到主題鏈結即可。以下是使用你的主題的示例。",
"notifications_no_subscriptions_title": "看起來你還未有任何訂閱",
"notifications_example": "示例",
"notifications_more_details": "有關更多資訊,請查看<websiteLink>網站</websiteLink>或<docsLink>文檔</docsLink>。",
"notifications_loading": "正在加載通知……",
"publish_dialog_title_topic": "發布到 {{topic}}",
"publish_dialog_title_no_topic": "發布通知",
"publish_dialog_progress_uploading": "正在上傳……",
"publish_dialog_progress_uploading_detail": "正在上傳 {{loaded}}/{{total}} ({{percent}}%) ……",
"publish_dialog_message_published": "已發布通知",
"publish_dialog_attachment_limits_file_and_quota_reached": "超過 {{fileSizeLimit}} 文件限制和配額,剩餘 {{remainingBytes}}",
"publish_dialog_emoji_picker_show": "選擇表情符號",
"publish_dialog_priority_min": "最低優先級",
"publish_dialog_priority_low": "低優先級",
"publish_dialog_priority_default": "默認優先級",
"publish_dialog_priority_high": "高優先級",
"publish_dialog_priority_max": "最高優先級",
"publish_dialog_topic_label": "主題名稱",
"publish_dialog_topic_placeholder": "主題名稱,例如 phil_alerts",
"publish_dialog_topic_reset": "重置主題",
"publish_dialog_title_label": "主題",
"publish_dialog_message_label": "訊息",
"publish_dialog_message_placeholder": "在此輸入訊息",
"publish_dialog_tags_label": "標記",
"publish_dialog_priority_label": "優先級",
"publish_dialog_base_url_label": "服務鏈結地址",
"publish_dialog_base_url_placeholder": "服務鏈結地址,例如 https://example.com",
"publish_dialog_click_label": "點擊鏈結地址",
"publish_dialog_click_placeholder": "點擊通知時打開鏈結地址",
"publish_dialog_email_placeholder": "將通知轉發到的地址,例如 phil@example.com",
"publish_dialog_email_reset": "移除電子郵件轉發",
"publish_dialog_filename_label": "文件名",
"publish_dialog_filename_placeholder": "附件文件名",
"publish_dialog_delay_label": "延期",
"publish_dialog_other_features": "其它功能:",
"publish_dialog_attach_placeholder": "使用鏈結地址附加文件,例如 https://f-droid.org/F-Droid.apk",
"publish_dialog_delay_reset": "刪除延期投遞",
"publish_dialog_attach_reset": "移除附件鏈結地址",
"publish_dialog_chip_click_label": "點擊鏈結地址",
"publish_dialog_chip_email_label": "轉發郵件",
"publish_dialog_chip_attach_file_label": "本地文件附件",
"publish_dialog_chip_topic_label": "變更主題",
"publish_dialog_button_cancel_sending": "取消發送",
"publish_dialog_checkbox_publish_another": "發布另一個",
"publish_dialog_attached_file_title": "附件文件:",
"publish_dialog_attached_file_filename_placeholder": "附件文件名",
"publish_dialog_attached_file_remove": "刪除附件文件",
"publish_dialog_drop_file_here": "將文件拖拽至此",
"emoji_picker_search_placeholder": "查找表情符號",
"emoji_picker_search_clear": "清除搜索",
"subscribe_dialog_subscribe_title": "訂閱主題",
"publish_dialog_chip_delay_label": "延期投遞",
"publish_dialog_chip_attach_url_label": "鏈結附件地址",
"subscribe_dialog_subscribe_use_another_label": "使用其他伺服器",
"subscribe_dialog_subscribe_button_subscribe": "訂閱",
"subscribe_dialog_login_title": "請登錄",
"subscribe_dialog_login_description": "本主題受密碼保護,請輸入用戶名和密碼以訂閱。",
"subscribe_dialog_login_username_label": "用戶名,例如 phil",
"subscribe_dialog_login_password_label": "密碼",
"alert_notification_permission_required_button": "現在授予",
"alert_notification_permission_required_description": "授予瀏覽器顯示桌面通知的權限。",
"alert_notification_permission_required_title": "已禁用通知",
"alert_not_supported_context_description": "通知僅支援 HTTPS。這是 <mdnLink>Notifications API</mdnLink> 的限制。",
"alert_not_supported_description": "你的瀏覽器不支援通知。",
"alert_not_supported_title": "不支援通知",
"common_add": "新增",
"common_back": "返回",
"subscribe_dialog_login_button_login": "登入",
"subscribe_dialog_error_user_not_authorized": "未授權 {{username}} 使用者",
"subscribe_dialog_error_user_anonymous": "匿名",
"prefs_notifications_title": "通知",
"prefs_notifications_sound_title": "通知提示音",
"common_cancel": "取消",
"common_copy_to_clipboard": "複製到剪貼板",
"common_save": "保存",
"display_name_dialog_description": "為訂閱列表中顯示的主題設置一個替代名稱。這有助於更輕鬆地識別名稱複雜的主題。",
"display_name_dialog_placeholder": "顯示名稱",
"display_name_dialog_title": "更改顯示名稱",
"emoji_picker_search_clear": "清除搜索",
"emoji_picker_search_placeholder": "查找表情符號",
"error_boundary_button_copy_stack_trace": "複製堆疊追踪",
"error_boundary_button_reload_ntfy": "重新加載 ntfy",
"error_boundary_description": "這顯然不應該發生。對此非常抱歉。<br/>如果你有時間,請<githubLink>在GitHub</githubLink>上報告,或通過<discordLink>Discord</discordLink>或<matrixLink>Matrix</matrixLink>告訴我們。",
"error_boundary_gathering_info": "收集更多資訊……",
"error_boundary_stack_trace": "堆疊追踪",
"error_boundary_title": "天啊ntfy 崩潰了",
"error_boundary_unsupported_indexeddb_description": "Ntfy Web應用程式需要IndexedDB才能運行且你的瀏覽器在隱私瀏覽模式下不支援IndexedDB。<br/><br/>儘管這很不幸但在隱私瀏覽模式下使用ntfy Web應用程式也沒有多大意義因為所有東西都存儲在瀏覽器存儲中。你可以在<githubLink>本GitHub問題</githubLink>中閱讀有關它的更多資訊,或者在<discordLink>Discord</discordLink>或<matrixLink>Matrix</matrixLink>上與我們交談。",
"error_boundary_unsupported_indexeddb_title": "不支援隱私瀏覽",
"login_disabled": "登錄已禁用",
"login_form_button_submit": "登錄",
"login_link_signup": "註冊",
"login_title": "請登錄你的 ntfy 帳戶",
"message_bar_error_publishing": "發佈通知時出錯",
"message_bar_publish": "發布訊息",
"message_bar_show_dialog": "顯示發布對話框",
"message_bar_type_message": "在此處輸入訊息",
"nav_button_account": "帳戶",
"nav_button_all_notifications": "全部通知",
"nav_button_connecting": "正在連接",
"nav_button_documentation": "文檔",
"nav_button_muted": "已暫停通知",
"nav_button_publish_message": "發布通知",
"nav_button_settings": "設定",
"nav_button_subscribe": "訂閱主題",
"nav_topics_title": "訂閱主題",
"nav_upgrade_banner_description": "保留主題,更多訊息和郵件,以及更大的附件",
"nav_upgrade_banner_label": "升級到 ntfy Pro",
"notifications_actions_failed_notification": "通知失敗",
"notifications_actions_http_request_title": "發送 HTTP {{method}} 到 {{url}}",
"notifications_actions_not_supported": "網頁應用程序不支援此操作",
"notifications_actions_open_url_title": "轉到 {{url}}",
"notifications_attachment_copy_url_button": "複製連結地址",
"notifications_attachment_copy_url_title": "將附件中連結地址複製到剪貼板",
"notifications_attachment_file_app": "安卓應用程式",
"notifications_attachment_file_audio": "聲音文件",
"notifications_attachment_file_document": "其他文件",
"notifications_attachment_file_image": "圖片文件",
"notifications_attachment_file_video": "影片文件",
"notifications_attachment_image": "附件圖片",
"notifications_attachment_link_expired": "下載連結已過期",
"notifications_attachment_link_expires": "連結在 {{date}} 過期",
"notifications_attachment_open_button": "打開附件",
"notifications_attachment_open_title": "轉到 {{url}}",
"notifications_click_copy_url_button": "複製鏈結",
"notifications_click_copy_url_title": "複製鏈結地址到剪貼板",
"notifications_click_open_button": "打開鏈結",
"notifications_copied_to_clipboard": "複製到剪貼板",
"notifications_delete": "刪除",
"notifications_example": "示例",
"notifications_list_item": "通知",
"notifications_list": "通知列表",
"notifications_loading": "正在加載通知……",
"notifications_mark_read": "標記為已讀",
"notifications_more_details": "有關更多資訊,請查看<websiteLink>網站</websiteLink>或<docsLink>文檔</docsLink>。",
"notifications_new_indicator": "新通知",
"notifications_none_for_any_description": "要向此主題發送通知,只需使用 PUT 或 POST 到主題鏈結即可。以下是使用你的主題的示例。",
"notifications_none_for_any_title": "你尚未收到任何通知。",
"notifications_none_for_topic_description": "要向此主題發送通知,只需使用 PUT 或 POST 到主題連結即可。",
"notifications_none_for_topic_title": "你尚未收到有關此主題的任何通知。",
"notifications_no_subscriptions_description": "點擊 \"{{linktext}}\" 連結以建立或訂閱主題。之後,你可以使用 PUT 或 POST 發送訊息,你將在這裡收到通知。",
"notifications_no_subscriptions_title": "看起來你還未有任何訂閱",
"notifications_priority_x": "優先級 {{priority}}",
"notifications_tags": "標記",
"prefs_appearance_language_title": "語言",
"prefs_appearance_theme_dark": "黑暗模式",
"prefs_appearance_theme_light": "光亮模式",
"prefs_appearance_theme_system": "系統 (預設)",
"prefs_appearance_theme_title": "主題",
"prefs_appearance_title": "外觀",
"prefs_notifications_delete_after_never_description": "永不自動刪除通知",
"prefs_notifications_delete_after_never": "從不",
"prefs_notifications_delete_after_one_day_description": "一天後自動刪除通知",
"prefs_notifications_delete_after_one_day": "一天後",
"prefs_notifications_delete_after_one_month_description": "一個月後自動刪除通知",
"prefs_notifications_delete_after_one_month": "一個月後",
"prefs_notifications_delete_after_one_week_description": "一周後自動刪除通知",
"prefs_notifications_delete_after_one_week": "一周後",
"prefs_notifications_delete_after_three_hours_description": "三小時後自動刪除通知",
"prefs_notifications_delete_after_three_hours": "三小時後",
"prefs_notifications_delete_after_title": "刪除通知",
"prefs_notifications_min_priority_any": "任意優先級",
"prefs_notifications_min_priority_default_and_higher": "默認優先級或更高",
"prefs_notifications_min_priority_description_any": "顯示所有通知,無論優先級如何",
"prefs_notifications_min_priority_description_max": "僅顯示最高優先級的通知",
"prefs_notifications_min_priority_description_x_or_higher": "僅顯示優先級為{{number}}{{name}})或以上的通知",
"prefs_notifications_min_priority_high_and_higher": "高優先級或更高",
"prefs_notifications_min_priority_low_and_higher": "低優先級或更高",
"prefs_notifications_min_priority_max_only": "僅最高優先級",
"prefs_notifications_min_priority_title": "最低優先級",
"prefs_notifications_sound_description_none": "收到通知時不播放任何聲音",
"prefs_notifications_sound_description_some": "收到通知時播放 {{sound}} 聲音",
"prefs_notifications_sound_no_sound": "靜音",
"prefs_notifications_sound_play": "播放選中聲音",
"prefs_notifications_min_priority_title": "最低優先級",
"prefs_notifications_min_priority_description_x_or_higher": "僅顯示優先級為{{number}}{{name}})或以上的通知",
"prefs_notifications_min_priority_description_max": "僅顯示最高優先級的通知",
"prefs_notifications_min_priority_any": "任意優先級",
"prefs_notifications_min_priority_low_and_higher": "低優先級或更高",
"prefs_notifications_min_priority_default_and_higher": "默認優先級或更高",
"prefs_notifications_min_priority_high_and_higher": "高優先級或更高",
"prefs_notifications_min_priority_max_only": "僅最高優先級",
"prefs_notifications_delete_after_never": "從不",
"prefs_notifications_delete_after_one_month": "一個月後",
"prefs_notifications_delete_after_one_week": "一周後",
"prefs_notifications_delete_after_never_description": "永不自動刪除通知",
"prefs_notifications_delete_after_three_hours_description": "三小時後自動刪除通知",
"prefs_notifications_delete_after_one_day_description": "一天後自動刪除通知",
"prefs_notifications_delete_after_one_week_description": "一周後自動刪除通知",
"prefs_notifications_delete_after_one_month_description": "一個月後自動刪除通知",
"prefs_notifications_web_push_enabled_description": "即使網頁程式未有運街亦會收到通知 (via Web Push)",
"prefs_notifications_sound_title": "通知提示音",
"prefs_notifications_title": "通知",
"prefs_notifications_web_push_disabled_description": "當網頁程式在運行時將會收到通知 (透過 WebSocket)",
"prefs_notifications_web_push_enabled": "己為 {{server}} 啟用",
"prefs_notifications_web_push_disabled": "己暫用",
"prefs_notifications_web_push_enabled_description": "即使網頁程式未有運街亦會收到通知 (via Web Push)",
"prefs_notifications_web_push_enabled": "己為 {{server}} 啟用",
"prefs_notifications_web_push_title": "背景通知",
"prefs_users_title": "管理使用者",
"prefs_users_description": "在此處新增/刪除受保護主題的使用者。請注意,使用者名和密碼將存儲在瀏覽器的本地存儲中。",
"prefs_reservations_add_button": "新增保留主題",
"prefs_reservations_delete_button": "重置主題訪問",
"prefs_reservations_description": "你可以在此處保留主題名稱供個人使用。保留主題使你擁有該主題的所有權,並允許你為其他用戶定義對該主題的訪問權限。",
"prefs_reservations_dialog_access_label": "訪問",
"prefs_reservations_dialog_description": "保留主題使你擁有該主題的所有權,並允許你為其他用戶定義對該主題的訪問權限。",
"prefs_reservations_dialog_title_add": "保留主題",
"prefs_reservations_dialog_title_delete": "刪除主題保留",
"prefs_reservations_dialog_title_edit": "編輯保留主題",
"prefs_reservations_dialog_topic_label": "主題",
"prefs_reservations_edit_button": "編輯主題訪問",
"prefs_reservations_limit_reached": "你已達到保留主題限制。",
"prefs_reservations_table_access_header": "訪問",
"prefs_reservations_table_click_to_subscribe": "點擊以訂閱",
"prefs_reservations_table_everyone_deny_all": "只有我可以發佈和訂閱",
"prefs_reservations_table_everyone_read_only": "我可以發佈和訂閱,每個人都可以訂閱",
"prefs_reservations_table_everyone_read_write": "每個人都可以發佈和訂閱",
"prefs_reservations_table_everyone_write_only": "我可以發佈和訂閱,每個人都可以發佈",
"prefs_reservations_table_not_subscribed": "未訂閱",
"prefs_reservations_table_topic_header": "主題",
"prefs_reservations_table": "保留主題表格",
"prefs_reservations_title": "保留主題",
"prefs_users_add_button": "新增使用者",
"prefs_users_delete_button": "刪除用戶",
"prefs_users_description_no_sync": "用戶和密碼不會同步到你的賬戶。",
"prefs_users_description": "在此處新增/刪除受保護主題的使用者。請注意,使用者名和密碼將存儲在瀏覽器的本地存儲中。",
"prefs_users_dialog_base_url_label": "服務連結地址,例如 https://ntfy.sh",
"prefs_users_dialog_password_label": "密碼",
"prefs_users_dialog_title_add": "新增使用者",
"prefs_users_dialog_title_edit": "編輯使用者",
"prefs_users_dialog_username_label": "使用者名,例如 phil",
"prefs_users_dialog_password_label": "密碼",
"common_cancel": "取消",
"common_save": "保存",
"prefs_appearance_title": "外觀",
"prefs_appearance_language_title": "語言",
"prefs_appearance_theme_title": "主題",
"prefs_appearance_theme_system": "系統 (預設)",
"prefs_appearance_theme_dark": "黑暗模式",
"prefs_appearance_theme_light": "光亮模式",
"priority_min": "最低",
"priority_low": "低",
"prefs_users_edit_button": "編輯用戶",
"prefs_users_table_base_url_header": "服務連結地址",
"prefs_users_table_cannot_delete_or_edit": "無法刪除或編輯已登錄用戶",
"prefs_users_table_user_header": "用戶",
"prefs_users_table": "用戶表",
"prefs_users_title": "管理使用者",
"priority_default": "預設",
"priority_high": "高",
"priority_low": "低",
"priority_max": "最高",
"error_boundary_title": "天啊ntfy 崩潰了",
"prefs_users_table_base_url_header": "服務連結地址",
"prefs_users_dialog_base_url_label": "服務連結地址,例如 https://ntfy.sh",
"error_boundary_button_copy_stack_trace": "複製堆疊追踪",
"error_boundary_button_reload_ntfy": "重新加載 ntfy",
"error_boundary_stack_trace": "堆疊追踪",
"error_boundary_gathering_info": "收集更多資訊……",
"error_boundary_unsupported_indexeddb_title": "不支援隱私瀏覽",
"error_boundary_unsupported_indexeddb_description": "Ntfy Web應用程式需要IndexedDB才能運行且你的瀏覽器在隱私瀏覽模式下不支援IndexedDB。<br/><br/>儘管這很不幸但在隱私瀏覽模式下使用ntfy Web應用程式也沒有多大意義因為所有東西都存儲在瀏覽器存儲中。你可以在<githubLink>本GitHub問題</githubLink>中閱讀有關它的更多資訊,或者在<discordLink>Discord</discordLink>或<matrixLink>Matrix</matrixLink>上與我們交談。",
"message_bar_error_publishing": "發佈通知時出錯",
"nav_button_settings": "設定",
"notifications_delete": "刪除",
"notifications_attachment_copy_url_title": "將附件中連結地址複製到剪貼板",
"notifications_attachment_copy_url_button": "複製連結地址",
"notifications_attachment_open_title": "轉到 {{url}}",
"notifications_actions_http_request_title": "發送 HTTP {{method}} 到 {{url}}",
"notifications_actions_failed_notification": "通知失敗",
"notifications_actions_open_url_title": "轉到 {{url}}",
"notifications_none_for_topic_description": "要向此主題發送通知,只需使用 PUT 或 POST 到主題連結即可。",
"subscribe_dialog_subscribe_topic_placeholder": "主題名,例如 phil_alerts",
"notifications_no_subscriptions_description": "點擊 \"{{linktext}}\" 連結以建立或訂閱主題。之後,你可以使用 PUT 或 POST 發送訊息,你將在這裡收到通知。",
"publish_dialog_attachment_limits_file_reached": "超過 {{fileSizeLimit}} 文件限制",
"publish_dialog_title_placeholder": "主題標題,例如 磁碟空間警告",
"publish_dialog_email_label": "電子郵件",
"publish_dialog_button_send": "發送",
"publish_dialog_checkbox_markdown": "格式化為 Markdown",
"publish_dialog_attachment_limits_quota_reached": "超過配額,剩餘 {{remainingBytes}}",
"priority_min": "最低",
"publish_dialog_attached_file_filename_placeholder": "附件文件名",
"publish_dialog_attached_file_remove": "刪除附件文件",
"publish_dialog_attached_file_title": "附件文件:",
"publish_dialog_attach_label": "附件連結地址",
"publish_dialog_click_reset": "移除點擊連結地址",
"publish_dialog_attachment_limits_file_and_quota_reached": "超過 {{fileSizeLimit}} 文件限制和配額,剩餘 {{remainingBytes}}",
"publish_dialog_attachment_limits_file_reached": "超過 {{fileSizeLimit}} 文件限制",
"publish_dialog_attachment_limits_quota_reached": "超過配額,剩餘 {{remainingBytes}}",
"publish_dialog_attach_placeholder": "使用鏈結地址附加文件,例如 https://f-droid.org/F-Droid.apk",
"publish_dialog_attach_reset": "移除附件鏈結地址",
"publish_dialog_base_url_label": "服務鏈結地址",
"publish_dialog_base_url_placeholder": "服務鏈結地址,例如 https://example.com",
"publish_dialog_button_cancel_sending": "取消發送",
"publish_dialog_button_cancel": "取消",
"subscribe_dialog_subscribe_button_cancel": "取消",
"subscribe_dialog_subscribe_base_url_label": "服務地址地址",
"subscribe_dialog_subscribe_use_another_background_info": "當網頁程式未開啟, 將不會收到來自其他伺服器的通知",
"prefs_notifications_min_priority_description_any": "顯示所有通知,無論優先級如何",
"prefs_notifications_delete_after_title": "刪除通知",
"prefs_notifications_delete_after_three_hours": "三小時後",
"prefs_users_delete_button": "刪除用戶",
"prefs_users_table_user_header": "用戶",
"common_add": "新增",
"prefs_notifications_delete_after_one_day": "一天後",
"error_boundary_description": "這顯然不應該發生。對此非常抱歉。<br/>如果你有時間,請<githubLink>在GitHub</githubLink>上報告,或通過<discordLink>Discord</discordLink>或<matrixLink>Matrix</matrixLink>告訴我們。",
"prefs_users_table": "用戶表",
"prefs_users_edit_button": "編輯用戶",
"publish_dialog_tags_placeholder": "英文逗號分隔標記列表,例如 warning, srv1-backup",
"publish_dialog_details_examples_description": "有關所有發送功能的範例和詳細說明,請參閱<docsLink>文檔</docsLink>。",
"subscribe_dialog_subscribe_description": "主題可能不受密碼保護,因此請選擇一個不容易被猜中的名字。訂閱後,你可以使用 PUT/POST 通知。",
"publish_dialog_delay_placeholder": "延期投遞,例如 {{unixTimestamp}}、{{relativeTime}}或「{{naturalLanguage}}」(僅限英語)",
"account_usage_basis_ip_description": "此帳戶的使用統計資訊和限制基於你的 IP 地址,因此可能會與其他用戶共享。上面顯示的限制是基於現有速率限制的近似值。",
"account_usage_cannot_create_portal_session": "無法打開計費門戶",
"account_delete_title": "刪除帳戶",
"account_delete_description": "永久刪除你的帳戶",
"signup_error_username_taken": "用戶名 {{username}} 已被取用",
"signup_error_creation_limit_reached": "已達到帳戶創建限制",
"login_title": "請登錄你的 ntfy 帳戶",
"action_bar_change_display_name": "更改顯示名稱",
"action_bar_reservation_add": "保留主題",
"action_bar_reservation_delete": "移除保留",
"action_bar_reservation_limit_reached": "達到限制",
"action_bar_profile_title": "個人資料",
"action_bar_profile_settings": "設定",
"action_bar_profile_logout": "登出",
"action_bar_mute_notifications": "靜音",
"action_bar_sign_in": "登錄",
"action_bar_sign_up": "註冊",
"nav_button_account": "帳戶",
"nav_upgrade_banner_label": "升級到 ntfy Pro",
"nav_upgrade_banner_description": "保留主題,更多訊息和郵件,以及更大的附件",
"alert_not_supported_context_description": "通知僅支援 HTTPS。這是 <mdnLink>Notifications API</mdnLink> 的限制。",
"display_name_dialog_title": "更改顯示名稱",
"display_name_dialog_description": "為訂閱列表中顯示的主題設置一個替代名稱。這有助於更輕鬆地識別名稱複雜的主題。",
"display_name_dialog_placeholder": "顯示名稱",
"reserve_dialog_checkbox_label": "保留主題並配置訪問",
"subscribe_dialog_subscribe_button_generate_topic_name": "生成名稱",
"account_basics_username_description": "嘿,那是你 ❤",
"account_basics_password_description": "更改你的帳戶密碼",
"account_basics_password_dialog_title": "更改密碼",
"account_basics_password_dialog_current_password_label": "當前密碼",
"account_basics_password_dialog_new_password_label": "新密碼",
"account_basics_password_dialog_confirm_password_label": "確認密碼",
"account_basics_password_dialog_button_submit": "更改密碼",
"account_basics_password_dialog_current_password_incorrect": "密碼錯誤",
"account_usage_title": "使用量",
"account_usage_of_limit": "{{limit}} 的",
"account_usage_unlimited": "無限",
"account_usage_limits_reset_daily": "使用限制每天午夜 (UTC) 重置",
"account_basics_tier_title": "帳戶類型",
"account_basics_tier_description": "你帳戶的權限級別",
"account_basics_tier_admin": "管理員",
"account_basics_tier_admin_suffix_with_tier": "(有 {{tier}} 等級)",
"account_basics_tier_admin_suffix_no_tier": "(無等級)",
"account_basics_tier_basic": "基礎版",
"account_basics_tier_free": "免費",
"account_basics_tier_upgrade_button": "升級到專業版",
"account_basics_tier_change_button": "改變",
"account_basics_tier_paid_until": "訂閱已支付至 {{date}},並將自動續訂",
"account_basics_tier_manage_billing_button": "管理計費",
"account_usage_messages_title": "已發布訊息",
"account_usage_emails_title": "已發送電子郵件",
"account_usage_reservations_title": "保留主題",
"account_usage_reservations_none": "此帳戶沒有保留主題",
"account_usage_attachment_storage_title": "附件存儲",
"account_usage_attachment_storage_description": "每個文件 {{filesize}},在 {{expiry}} 後刪除",
"account_upgrade_dialog_button_pay_now": "立即付款並訂閱",
"account_upgrade_dialog_button_cancel_subscription": "取消訂閱",
"account_upgrade_dialog_button_update_subscription": "更新訂閱",
"account_tokens_dialog_title_create": "創建訪問令牌",
"account_tokens_dialog_title_edit": "編輯訪問令牌",
"account_tokens_dialog_title_delete": "刪除訪問令牌",
"account_tokens_dialog_button_cancel": "取消",
"account_tokens_dialog_expires_label": "訪問令牌過期於",
"account_tokens_dialog_expires_unchanged": "保持過期日期不變",
"account_tokens_dialog_expires_x_hours": "令牌在 {{hours}} 小時後過期",
"account_tokens_dialog_expires_x_days": "令牌在 {{days}} 天後過期",
"account_tokens_dialog_expires_never": "令牌永不過期",
"account_tokens_delete_dialog_title": "刪除訪問令牌",
"account_tokens_delete_dialog_description": "在刪除訪問令牌之前,請確保沒有應用程序或腳本正在活躍使用它。 <strong>此操作無法撤銷</strong>。",
"account_tokens_delete_dialog_submit_button": "永久删除令牌",
"prefs_users_description_no_sync": "用戶和密碼不會同步到你的賬戶。",
"prefs_users_table_cannot_delete_or_edit": "無法刪除或編輯已登錄用戶",
"prefs_reservations_title": "保留主題",
"prefs_reservations_description": "你可以在此處保留主題名稱供個人使用。保留主題使你擁有該主題的所有權,並允許你為其他用戶定義對該主題的訪問權限。",
"prefs_reservations_limit_reached": "你已達到保留主題限制。",
"prefs_reservations_add_button": "新增保留主題",
"prefs_reservations_edit_button": "編輯主題訪問",
"prefs_reservations_delete_button": "重置主題訪問",
"prefs_reservations_table": "保留主題表格",
"prefs_reservations_table_topic_header": "主題",
"prefs_reservations_table_access_header": "訪問",
"prefs_reservations_table_everyone_deny_all": "只有我可以發佈和訂閱",
"prefs_reservations_table_everyone_read_only": "我可以發佈和訂閱,每個人都可以訂閱",
"prefs_reservations_table_everyone_write_only": "我可以發佈和訂閱,每個人都可以發佈",
"prefs_reservations_table_everyone_read_write": "每個人都可以發佈和訂閱",
"prefs_reservations_table_not_subscribed": "未訂閱",
"prefs_reservations_table_click_to_subscribe": "點擊以訂閱",
"prefs_reservations_dialog_title_add": "保留主題",
"prefs_reservations_dialog_title_edit": "編輯保留主題",
"prefs_reservations_dialog_title_delete": "刪除主題保留",
"prefs_reservations_dialog_description": "保留主題使你擁有該主題的所有權,並允許你為其他用戶定義對該主題的訪問權限。",
"prefs_reservations_dialog_topic_label": "主題",
"prefs_reservations_dialog_access_label": "訪問",
"reservation_delete_dialog_description": "刪除保留會放棄對該主題的所有權,並允許其他人保留它。你可以保留或刪除現有郵件和附件。",
"reservation_delete_dialog_action_keep_title": "保留緩存的郵件和附件",
"reservation_delete_dialog_action_keep_description": "緩存在伺服器上的訊息和附件將對知道主題名稱的人公開可見。",
"reservation_delete_dialog_action_delete_title": "刪除緩存的郵件和附件",
"reservation_delete_dialog_action_delete_description": "緩存的郵件和附件將被永久刪除。此操作無法撤銷。",
"reservation_delete_dialog_submit_button": "刪除保留",
"account_delete_dialog_description": "這將永久刪除你的帳戶,包括存儲在伺服器上的所有數據。刪除後,你的用戶名將在 7 天內不可用。如果你真的想繼續,請在下面的框中使用你的密碼作確認。",
"account_delete_dialog_label": "密碼",
"account_delete_dialog_button_cancel": "取消",
"account_delete_dialog_button_submit": "永久刪除帳戶",
"account_delete_dialog_billing_warning": "刪除你的帳戶也會立即取消你的計費訂閱。你將無法再訪問計費儀錶板。",
"account_upgrade_dialog_title": "更改帳戶等級",
"account_upgrade_dialog_cancel_warning": "這將<strong>取消你的訂閱</strong>,並在 {{date}} 降級你的帳戶。在那一天,主題保留以及緩存在伺服器上的訊息<strong>將被刪除</strong>。",
"account_upgrade_dialog_proration_info": "<strong>按比例分配</strong>:在付費計劃之間升級時,差價將被<strong>立刻收取</strong>。在降級到較低級別時,餘額將被用於支付未來的賬單周期。",
"account_upgrade_dialog_reservations_warning_one": "所選等級允許的保留主題少於當前等級。在更改你的等級之前,<strong>請至少刪除 1 項保留</strong>。你可以在<Link>設置</Link>中刪除保留。",
"account_upgrade_dialog_reservations_warning_other": "所選等級允許的保留主題少於當前等級。在更改你的等級之前,<strong>請至少刪除 {{count}} 項保留</strong>。你可以在<Link>設置</Link>中刪除保留。",
"account_upgrade_dialog_tier_features_reservations_other": "保留 {{reservations}} 條主題",
"account_upgrade_dialog_tier_features_messages_other": "每日 {{messages}} 條訊息",
"account_upgrade_dialog_tier_features_emails_other": "每日 {{emails}} 條郵件",
"account_upgrade_dialog_tier_features_attachment_file_size": "每個文件 {{filesize}} ",
"signup_form_confirm_password": "確認密碼",
"signup_form_button_submit": "註冊",
"signup_form_toggle_password_visibility": "切換密碼可見性",
"signup_title": "創建一個 ntfy 帳戶",
"signup_form_username": "用戶名",
"signup_form_password": "密碼",
"signup_already_have_account": "已有帳戶?登錄!",
"signup_disabled": "註冊已禁用",
"login_form_button_submit": "登錄",
"login_link_signup": "註冊",
"login_disabled": "登錄已禁用",
"action_bar_account": "帳戶",
"action_bar_reservation_edit": "更改保留",
"subscribe_dialog_error_topic_already_reserved": "主題已保留",
"account_basics_title": "帳戶",
"account_basics_username_title": "用戶名",
"account_basics_username_admin_tooltip": "你是管理員",
"account_basics_password_title": "密碼",
"account_basics_tier_payment_overdue": "你的付款已逾期。請更新你的付款方式,否則你的帳戶將很快被降級。",
"account_basics_tier_canceled_subscription": "你的訂閱已取消,並將在 {{date}} 降級為免費帳戶。",
"account_upgrade_dialog_tier_features_attachment_total_size": "{{totalsize}} 總存儲空間",
"account_upgrade_dialog_tier_selected_label": "已選",
"account_upgrade_dialog_tier_current_label": "當前",
"account_upgrade_dialog_button_cancel": "取消",
"account_upgrade_dialog_button_redirect_signup": "立即註冊",
"account_tokens_title": "訪問令牌",
"account_tokens_description": "通過 ntfy API 發布和訂閱時使用訪問令牌,因此你不必發送你的帳戶憑證。查看<Link>文檔</Link>以了解更多資訊。",
"account_tokens_table_token_header": "令牌",
"account_tokens_table_label_header": "標籤",
"account_tokens_table_last_access_header": "最後訪問",
"account_tokens_table_expires_header": "過期",
"account_tokens_table_never_expires": "永不過期",
"account_tokens_table_current_session": "當前瀏覽器會話",
"common_copy_to_clipboard": "複製到剪貼板",
"account_tokens_table_copied_to_clipboard": "已複製訪問令牌",
"account_tokens_table_cannot_delete_or_edit": "無法編輯或刪除當前會話令牌",
"account_tokens_table_create_token_button": "創建訪問令牌",
"account_tokens_table_last_origin_tooltip": "於IP地址 {{ip}},點擊查找",
"account_tokens_dialog_label": "標籤例如Radarr 通知",
"account_tokens_dialog_button_create": "創建令牌",
"account_tokens_dialog_button_update": "更新令牌",
"account_basics_tier_interval_monthly": "每月",
"account_basics_tier_interval_yearly": "每年",
"account_upgrade_dialog_interval_monthly": "每月",
"account_upgrade_dialog_interval_yearly": "每年",
"account_upgrade_dialog_interval_yearly_discount_save": "節省 {{discount}}%",
"account_upgrade_dialog_interval_yearly_discount_save_up_to": "節省高達 {{discount}}%",
"account_upgrade_dialog_tier_features_no_reservations": "無保留主題",
"account_upgrade_dialog_tier_price_per_month": "月",
"account_upgrade_dialog_tier_price_billed_monthly": "{{price}} 每年。按月計費。",
"account_upgrade_dialog_tier_price_billed_yearly": "{{價格}} 按年計費。節省 {{save}}。",
"account_upgrade_dialog_billing_contact_email": "有關賬單問題,請直接<Link>聯繫我們 </Link>。",
"account_upgrade_dialog_billing_contact_website": "有關賬單問題,請參考我們的<Link>網站 </Link>。",
"publish_dialog_button_send": "發送",
"publish_dialog_call_item": "撥打電話 {{number}}",
"publish_dialog_call_label": "撥號",
"publish_dialog_call_reset": "清空撥號",
"publish_dialog_checkbox_markdown": "格式化為 Markdown",
"publish_dialog_checkbox_publish_another": "發布另一個",
"publish_dialog_chip_attach_file_label": "本地文件附件",
"publish_dialog_chip_attach_url_label": "鏈結附件地址",
"publish_dialog_chip_call_label": "撥號",
"publish_dialog_chip_call_no_verified_numbers_tooltip": "未驗證的電話號碼",
"account_basics_phone_numbers_title": "電話號碼",
"account_basics_phone_numbers_description": "電話通知",
"account_basics_phone_numbers_dialog_description": "要使用來電通知功能,你需要新增並驗證至少一個電話號碼。可以通過短信或電話驗證。",
"account_basics_phone_numbers_dialog_code_label": "驗證碼",
"account_basics_phone_numbers_dialog_code_placeholder": "例如123456",
"account_basics_phone_numbers_dialog_check_verification_button": "確認碼",
"account_basics_phone_numbers_dialog_channel_sms": "短信",
"account_basics_phone_numbers_dialog_channel_call": "撥打",
"publish_dialog_call_reset": "清空撥號",
"account_basics_phone_numbers_no_phone_numbers_yet": "無可執行的電話號碼",
"account_basics_phone_numbers_dialog_title": "新增電話號碼",
"account_basics_phone_numbers_copied_to_clipboard": "電話號碼已複製到剪貼板",
"account_basics_phone_numbers_dialog_number_label": "電話號碼",
"account_basics_phone_numbers_dialog_number_placeholder": "例如:+1222333444",
"account_usage_calls_title": "已撥打電話",
"account_usage_calls_none": "此帳號無法撥打電話",
"account_upgrade_dialog_tier_features_reservations_one": "保留一條主題",
"account_upgrade_dialog_tier_features_emails_one": "每日一封郵件",
"account_upgrade_dialog_tier_features_calls_one": "每日一通電話",
"account_basics_phone_numbers_dialog_verify_button_sms": "發送資訊",
"account_basics_phone_numbers_dialog_verify_button_call": "撥打電話",
"account_upgrade_dialog_tier_features_messages_one": "每日一條訊息",
"account_upgrade_dialog_tier_features_calls_other": "每日{{calls}} 通電話",
"account_upgrade_dialog_tier_features_no_calls": "沒有電話",
"web_push_subscription_expiring_title": "通知會被暫停",
"publish_dialog_chip_click_label": "點擊鏈結地址",
"publish_dialog_chip_delay_label": "延期投遞",
"publish_dialog_chip_email_label": "轉發郵件",
"publish_dialog_chip_topic_label": "變更主題",
"publish_dialog_click_label": "點擊鏈結地址",
"publish_dialog_click_placeholder": "點擊通知時打開鏈結地址",
"publish_dialog_click_reset": "移除點擊連結地址",
"publish_dialog_delay_label": "延期",
"publish_dialog_delay_placeholder": "延期投遞,例如 {{unixTimestamp}}、{{relativeTime}}或「{{naturalLanguage}}」(僅限英語)",
"publish_dialog_delay_reset": "刪除延期投遞",
"publish_dialog_details_examples_description": "有關所有發送功能的範例和詳細說明,請參閱<docsLink>文檔</docsLink>。",
"publish_dialog_drop_file_here": "將文件拖拽至此",
"publish_dialog_email_label": "電子郵件",
"publish_dialog_email_placeholder": "將通知轉發到的地址,例如 phil@example.com",
"publish_dialog_email_reset": "移除電子郵件轉發",
"publish_dialog_emoji_picker_show": "選擇表情符號",
"publish_dialog_filename_label": "文件名",
"publish_dialog_filename_placeholder": "附件文件名",
"publish_dialog_message_label": "訊息",
"publish_dialog_message_placeholder": "在此輸入訊息",
"publish_dialog_message_published": "已發布通知",
"publish_dialog_other_features": "其它功能:",
"publish_dialog_priority_default": "默認優先級",
"publish_dialog_priority_high": "高優先級",
"publish_dialog_priority_label": "優先級",
"publish_dialog_priority_low": "低優先級",
"publish_dialog_priority_max": "最高優先級",
"publish_dialog_priority_min": "最低優先級",
"publish_dialog_progress_uploading_detail": "正在上傳 {{loaded}}/{{total}} ({{percent}}%) ……",
"publish_dialog_progress_uploading": "正在上傳……",
"publish_dialog_tags_label": "標記",
"publish_dialog_tags_placeholder": "英文逗號分隔標記列表,例如 warning, srv1-backup",
"publish_dialog_title_label": "主題",
"publish_dialog_title_no_topic": "發布通知",
"publish_dialog_title_placeholder": "主題標題,例如 磁碟空間警告",
"publish_dialog_title_topic": "發布到 {{topic}}",
"publish_dialog_topic_label": "主題名稱",
"publish_dialog_topic_placeholder": "主題名稱,例如 phil_alerts",
"publish_dialog_topic_reset": "重置主題",
"reservation_delete_dialog_action_delete_description": "緩存的郵件和附件將被永久刪除。此操作無法撤銷。",
"reservation_delete_dialog_action_delete_title": "刪除緩存的郵件和附件",
"reservation_delete_dialog_action_keep_description": "緩存在伺服器上的訊息和附件將對知道主題名稱的人公開可見。",
"reservation_delete_dialog_action_keep_title": "保留緩存的郵件和附件",
"reservation_delete_dialog_description": "刪除保留會放棄對該主題的所有權,並允許其他人保留它。你可以保留或刪除現有郵件和附件。",
"reservation_delete_dialog_submit_button": "刪除保留",
"reserve_dialog_checkbox_label": "保留主題並配置訪問",
"signup_already_have_account": "已有帳戶?登錄!",
"signup_disabled": "註冊已禁用",
"signup_error_creation_limit_reached": "已達到帳戶創建限制",
"signup_error_username_taken": "用戶名 {{username}} 已被取用",
"signup_form_button_submit": "註冊",
"signup_form_confirm_password": "確認密碼",
"signup_form_password": "密碼",
"signup_form_toggle_password_visibility": "切換密碼可見性",
"signup_form_username": "用戶名",
"signup_title": "創建一個 ntfy 帳戶",
"subscribe_dialog_error_topic_already_reserved": "主題已保留",
"subscribe_dialog_error_user_anonymous": "匿名",
"subscribe_dialog_error_user_not_authorized": "未授權 {{username}} 使用者",
"subscribe_dialog_login_button_login": "登入",
"subscribe_dialog_login_description": "本主題受密碼保護,請輸入用戶名和密碼以訂閱。",
"subscribe_dialog_login_password_label": "密碼",
"subscribe_dialog_login_title": "請登錄",
"subscribe_dialog_login_username_label": "用戶名,例如 phil",
"subscribe_dialog_subscribe_base_url_label": "服務地址地址",
"subscribe_dialog_subscribe_button_cancel": "取消",
"subscribe_dialog_subscribe_button_generate_topic_name": "生成名稱",
"subscribe_dialog_subscribe_button_subscribe": "訂閱",
"subscribe_dialog_subscribe_description": "主題可能不受密碼保護,因此請選擇一個不容易被猜中的名字。訂閱後,你可以使用 PUT/POST 通知。",
"subscribe_dialog_subscribe_title": "訂閱主題",
"subscribe_dialog_subscribe_topic_placeholder": "主題名,例如 phil_alerts",
"subscribe_dialog_subscribe_use_another_background_info": "當網頁程式未開啟, 將不會收到來自其他伺服器的通知",
"subscribe_dialog_subscribe_use_another_label": "使用其他伺服器",
"web_push_subscription_expiring_body": "開啟ntfy以繼續接收通知",
"web_push_unknown_notification_title": "接收到不明通知",
"web_push_unknown_notification_body": "你可能需要開啟網頁來更新ntfy"
"web_push_subscription_expiring_title": "通知會被暫停",
"web_push_unknown_notification_body": "你可能需要開啟網頁來更新ntfy",
"web_push_unknown_notification_title": "接收到不明通知"
}

View File

@ -130,14 +130,20 @@ export const hashCode = (s) => {
return hash;
};
/**
* convert `i18n.language` style str (e.g.: `en_US`) to kebab-case (e.g.: `en-US`),
* which is expected by `<html lang>` and `Intl.DateTimeFormat`
*/
export const getKebabCaseLangStr = (language) => language.replace(/_/g, "-");
export const formatShortDateTime = (timestamp, language) =>
new Intl.DateTimeFormat(language, {
new Intl.DateTimeFormat(getKebabCaseLangStr(language), {
dateStyle: "short",
timeStyle: "short",
}).format(new Date(timestamp * 1000));
export const formatShortDate = (timestamp, language) =>
new Intl.DateTimeFormat(language, { dateStyle: "short" }).format(new Date(timestamp * 1000));
new Intl.DateTimeFormat(getKebabCaseLangStr(language), { dateStyle: "short" }).format(new Date(timestamp * 1000));
export const formatBytes = (bytes, decimals = 2) => {
if (bytes === 0) return "0 bytes";

View File

@ -11,7 +11,7 @@ import ActionBar from "./ActionBar";
import Preferences from "./Preferences";
import subscriptionManager from "../app/SubscriptionManager";
import userManager from "../app/UserManager";
import { expandUrl } from "../app/utils";
import { expandUrl, getKebabCaseLangStr } from "../app/utils";
import ErrorBoundary from "./ErrorBoundary";
import routes from "./routes";
import { useAccountListener, useBackgroundProcesses, useConnectionListeners, useWebPushTopics } from "./hooks";
@ -56,7 +56,7 @@ const App = () => {
);
useEffect(() => {
document.documentElement.setAttribute("lang", i18n.language);
document.documentElement.setAttribute("lang", getKebabCaseLangStr(i18n.language));
document.dir = languageDir;
}, [i18n.language, languageDir]);

View File

@ -544,6 +544,7 @@ const Language = () => {
"🇯🇵",
"🇷🇺",
"🇹🇷",
"🇫🇮",
]).slice(0, 3);
const showFlags = !navigator.userAgent.includes("Windows");
let title = t("prefs_appearance_language_title");
@ -588,6 +589,7 @@ const Language = () => {
<MenuItem value="pt_BR">Português (Brasil)</MenuItem>
<MenuItem value="pl">Polski</MenuItem>
<MenuItem value="ru">Русский</MenuItem>
<MenuItem value="fi">Suomi</MenuItem>
<MenuItem value="sv">Svenska</MenuItem>
<MenuItem value="tr">Türkçe</MenuItem>
</Select>