Allow pinning/unpinning other users posts

This commit is contained in:
jaina heartles 2024-02-27 14:57:27 -08:00
parent 401376d668
commit 1c50079f7b
2 changed files with 2 additions and 4 deletions

View File

@ -53,7 +53,6 @@ export class NotePiningService {
// Fetch pinee
const note = await this.notesRepository.findOneBy({
id: noteId,
userId: user.id,
});
if (note == null) {
@ -92,7 +91,6 @@ export class NotePiningService {
// Fetch unpinee
const note = await this.notesRepository.findOneBy({
id: noteId,
userId: user.id,
});
if (note == null) {

View File

@ -341,7 +341,7 @@ export function getNoteMenu(props: {
text: i18n.ts.muteThread,
action: () => toggleThreadMute(true),
}),
appearNote.userId === $i.id ? ($i.pinnedNoteIds ?? []).includes(appearNote.id) ? {
($i.pinnedNoteIds ?? []).includes(appearNote.id) ? {
icon: 'ph-push-pin ph-bold ph-lgned-off',
text: i18n.ts.unpin,
action: () => togglePin(false),
@ -349,7 +349,7 @@ export function getNoteMenu(props: {
icon: 'ph-push-pin ph-bold ph-lg',
text: i18n.ts.pin,
action: () => togglePin(true),
} : undefined,
},
{
type: 'parent' as const,
icon: 'ph-user ph-bold ph-lg',