Allow pinning/unpinning other users posts
This commit is contained in:
parent
401376d668
commit
1c50079f7b
2 changed files with 2 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue