discourse/app
Isaac Janzen 28078d78e2
DEV: Make 'username' optional for bookmark notifications (#19851)
Data Explorer queries have a `user_id` assigned to each query created. DE Reports can be bookmarked for later reference. 

When creating the bookmark notification there was the possibility of a notification error being thrown (that made the notification menu inaccessible) due to a DE Query not having a owner (associated user_id). This can happen in a couple ways: 
- having a query created by a user that was then later deleted leaving the query without ownership
- having a TA create a query for a customer using a temporary account, that would then later be deleted leaving the query without ownership

Since there is a case that `bookmark.user` is not valid the PR makes the `bookmark.user.username` optional for a bookmark notification. As [tested](https://github.com/discourse/discourse/pull/19851/files#diff-5b5154de37f96988d551feff6f1dfe5ba804fbcbc1c33b5478dde02a447a634f) in the case a username is not present, we will still render the `content` of the notification minus the username. This creates a safe fallback when looking up non-valid users.
2023-01-12 12:22:11 -06:00
..
assets DEV: Make 'username' optional for bookmark notifications (#19851) 2023-01-12 12:22:11 -06:00
controllers FIX: Ruby 2 backward compatible plugin logout redirect (#19845) 2023-01-12 19:12:20 +08:00
helpers FEATURE: Show more context in Discourse topic oneboxes 2023-01-11 14:22:53 +01:00
jobs DEV: Fix threading error when running jobs immediately in system tests (#19811) 2023-01-10 13:41:25 +08:00
mailers DEV: Apply syntax_tree formatting to app/* 2023-01-09 14:14:59 +00:00
models DEV: Added notification type for 'discourse-circles' (#19834) 2023-01-12 14:07:42 -03:00
serializers FEATURE: Allow group owners promote more owners (#19768) 2023-01-11 16:43:18 +08:00
services DEV: Remove defunct TODOs (#19825) 2023-01-12 09:41:39 +10:00
views FEATURE: Show more context in Discourse topic oneboxes 2023-01-11 14:22:53 +01:00