feat: notifications through Apprise (v2.14.0)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
815aff5443
commit
0465ff924b
19 files changed
+659
-17
No files matched your search
@@ -1464,6 +1464,13 @@ def _fail(db, row, error: SyndicationError) -> None:
|
||||
f"Syndication {row['target']} for note {row['note_id']} failed "
|
||||
f"(attempt {attempts}{', giving up' if failed else ''}): {error}"
|
||||
)
|
||||
if failed: # ADR-074: tell the owner, once, when we give up
|
||||
from starpunk import notifications
|
||||
target = get_targets().get(row["target"])
|
||||
site = current_app.config["SITE_URL"].rstrip("/")
|
||||
notifications.problem(current_app.config, current_app.config["DATABASE_PATH"],
|
||||
f"Crosspost to {target.name if target else row['target']} failed",
|
||||
str(error)[:300], f"{site}/admin/edit/{row['note_id']}")
|
||||
|
||||
|
||||
def _target_title(url: Optional[str]) -> Optional[str]:
|
||||
|
||||
Reference in new issue
Block a user