Adding ability to filter by notification creator.#6359
Conversation
dessalines
commented
Feb 24, 2026
- This makes a private message chat view possible, as well as showing all notifs from a certain person.
- Fixes Lemmy 1.0: Way to get private messages from a specific user #6310
- This makes a private message chat view possible, as well as showing all notifs from a certain person. - Fixes #6310
| if let Some(creator_id) = self.creator_id { | ||
| query = query.filter(notification::creator_id.eq(creator_id)); | ||
| } | ||
|
|
There was a problem hiding this comment.
In ModlogView hide_mod_name() you also need to set creator_id: None.
There was a problem hiding this comment.
That's already handled in the map_to_enum function. The hide_mod_name function takes in the boolean and sets the moderator to None.
There was a problem hiding this comment.
Yes it sets the moderator to None, but right now you can get the moderator's PersonId from creator_id. So that also needs to be set None.
There was a problem hiding this comment.
Still missing the change here: https://github.com/LemmyNet/lemmy/blob/main/crates/db_views/modlog/src/impls.rs#L189
There was a problem hiding this comment.
That wasn't the place to do it (that function only returns Moderator, which was being set to None).
The only other place creator_id exists, is in notification.creator_id, and I think I got that now in the recent commit.
| pub fn new_post( | ||
| post_id: PostId, | ||
| recipient_id: PersonId, | ||
| creator_id: PersonId, |
There was a problem hiding this comment.
Easier to pass in &Post here then you can get both IDs out of it.
There was a problem hiding this comment.
Same below for new_comment and new_mod_action.