06/18 Fix notification issues
This commit is contained in:
@@ -727,21 +727,22 @@ def create():
|
||||
db.session.commit()
|
||||
|
||||
# ── Notify via matrix (issue_created) ────────────────────────
|
||||
# No exclude_user_ids: the creator should also receive the in-app
|
||||
# confirmation so they see it in their notification feed.
|
||||
facility = issue.resolved_facility
|
||||
if facility:
|
||||
notify_by_matrix(
|
||||
event_type = 'issue_created',
|
||||
title = f'New Issue #{issue.id} at {facility.name}',
|
||||
body = (
|
||||
event_type = 'issue_created',
|
||||
title = f'New Issue #{issue.id} at {facility.name}',
|
||||
body = (
|
||||
f'A new {issue.severity.title()}-severity issue has been logged '
|
||||
f'at {facility.name}. '
|
||||
f'Description: {issue.description[:120]}'
|
||||
f'{"…" if len(issue.description) > 120 else ""}'
|
||||
),
|
||||
link = url_for('issues.view', issue_id=issue.id),
|
||||
issue_id = issue.id,
|
||||
facility_id = facility.id,
|
||||
exclude_user_ids = {current_user.id},
|
||||
link = url_for('issues.view', issue_id=issue.id),
|
||||
issue_id = issue.id,
|
||||
facility_id = facility.id,
|
||||
)
|
||||
db.session.commit()
|
||||
flash('Issue created.', 'success')
|
||||
|
||||
Reference in New Issue
Block a user