mute-renotes #189
Loading…
Reference in a new issue
No description provided.
Delete branch "mute-renotes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a button next to the button to mute users to mute their renotes.
Renotes are still visible in the profile of the user, and you still get notifications for posts of your own that the user renotes.
However, your timelines etc will no longer show their renotes.
This includes event streaming, and a fix to block event streaming (it's a tiny patch so I fixed it up while fixing up the mute-renote streaming - both are tested).
No changelog entry because the bulk of the patch already includes one, suggest ff-merge due to multiple authors.
@ -0,0 +2,4 @@
import { User } from '@/models/entities/user.js';
import { RenoteMutings } from '@/models/index.js';
export function generateMutedUserRenotesQueryForNotes(q: SelectQueryBuilder<any>, me: { id: User['id'] }): void {
I'm all for descriptive naming, but maybe this is overdoing it a bit? I think a bit shorter like
generateMutedRenotesQuery
would also be fine since renote implies that its from a user and for notes.@ -0,0 +46,4 @@
export default define(meta, paramDef, async (ps, user) => {
const muter = user;
// 自分自身
Missed a Japanese comment here.
Seems to work on my local dev setup.
Like @Johann150 mentioned in IRC, if there's a way to avoid doing a select to check if an item to be deleted exists before performing the delete, that would be better performance-wise. Otherwise, this looks good to me.
I think the single query would be a task for another refactor, this is just copying code from the status quo.