merge: Make pleaseLoginContext attempt to use stored remote url/uris first before falling back to local url (!942)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/942 Closes #993 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: dakkar <dakkar@thenautilus.net>
This commit is contained in:
commit
835e6112ac
6 changed files with 6 additions and 6 deletions
|
@ -348,7 +348,7 @@ const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.anima
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const mergedCW = computed(() => computeMergedCw(appearNote.value));
|
const mergedCW = computed(() => computeMergedCw(appearNote.value));
|
||||||
|
|
|
@ -371,7 +371,7 @@ let renoting = false;
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
|
|
|
@ -154,7 +154,7 @@ const isRenote = (
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
||||||
|
|
|
@ -352,7 +352,7 @@ const renoteTooltip = computeRenoteTooltip(renoted);
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/* Overload FunctionにLintが対応していないのでコメントアウト
|
/* Overload FunctionにLintが対応していないのでコメントアウト
|
||||||
|
|
|
@ -377,7 +377,7 @@ let renoting = false;
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
|
|
|
@ -168,7 +168,7 @@ const isRenote = (
|
||||||
|
|
||||||
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
const pleaseLoginContext = computed<OpenOnRemoteOptions>(() => ({
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
url: `https://${host}/notes/${appearNote.value.id}`,
|
url: appearNote.value.url ?? appearNote.value.uri ?? `https://${host}/notes/${appearNote.value.id}`,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
async function addReplyTo(replyNote: Misskey.entities.Note) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue