Skip to content

Commit

Permalink
specify hanamode preference when invoking notes/create
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Aug 15, 2024
1 parent b37f1f5 commit d253d62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ async function post(ev?: MouseEvent) {
visibility: visibility.value,
visibleUserIds: visibility.value === 'specified' ? visibleUsers.value.map(u => u.id) : undefined,
reactionAcceptance: reactionAcceptance.value,
isNoteInHanaMode: $i.isInHanaMode,
};

if (withHashtags.value && hashtags.value && hashtags.value.trim() !== '') {
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/pages/reversi/game.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function start(_game: Misskey.entities.ReversiGameDetailed) {
misskeyApi('notes/create', {
text: `${i18n.ts._reversi.iStartedAGame}\n${url}/reversi/g/${props.gameId}`,
visibility: 'home',
isNoteInHanaMode: $i?.isInHanaMode ?? undefined,
});
}

Expand Down
3 changes: 3 additions & 0 deletions packages/frontend/src/scripts/get-note-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ export function getRenoteMenu(props: {
misskeyApi('notes/create', {
renoteId: appearNote.id,
channelId: appearNote.channelId,
isNoteInHanaMode: $i?.isInHanaMode ?? undefined,
}).then(() => {
os.toast(i18n.ts.renoted);
});
Expand Down Expand Up @@ -589,6 +590,7 @@ export function getRenoteMenu(props: {
localOnly,
visibility,
renoteId: appearNote.id,
isNoteInHanaMode: $i?.isInHanaMode ?? undefined,
}).then(() => {
os.toast(i18n.ts.renoted);
});
Expand Down Expand Up @@ -630,6 +632,7 @@ export function getRenoteMenu(props: {
misskeyApi('notes/create', {
renoteId: appearNote.id,
channelId: channel.id,
isNoteInHanaMode: $i?.isInHanaMode ?? undefined,
}).then(() => {
os.toast(i18n.tsx.renotedToX({ name: channel.name }));
});
Expand Down

0 comments on commit d253d62

Please sign in to comment.