mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
fix indent
This commit is contained in:
parent
d0a074ac89
commit
c9874f72b1
1 changed files with 22 additions and 22 deletions
|
@ -162,31 +162,31 @@ onDeactivated(() => {
|
|||
});
|
||||
|
||||
async function fetchNote() {
|
||||
if (!props.showAsQuote) return;
|
||||
if (!activityPub.value) return;
|
||||
if (theNote.value) return;
|
||||
if (fetchingTheNote.value) return;
|
||||
if (!props.showAsQuote) return;
|
||||
if (!activityPub.value) return;
|
||||
if (theNote.value) return;
|
||||
if (fetchingTheNote.value) return;
|
||||
|
||||
fetchingTheNote.value = true;
|
||||
try {
|
||||
const response = await misskeyApi('ap/show', { uri: activityPub.value });
|
||||
if (response.type !== 'Note') return;
|
||||
const theNoteId = response['object'].id;
|
||||
if (theNoteId && props.skipNoteIds && props.skipNoteIds.includes(theNoteId)) {
|
||||
hidePreview.value = true;
|
||||
return;
|
||||
}
|
||||
theNote.value = response['object'];
|
||||
fetchingTheNote.value = false;
|
||||
} catch (err) {
|
||||
if (_DEV_) {
|
||||
console.error(`failed to extract note for preview of ${activityPub.value}`, err);
|
||||
}
|
||||
activityPub.value = null;
|
||||
fetchingTheNote.value = false;
|
||||
theNote.value = null;
|
||||
fetchingTheNote.value = true;
|
||||
try {
|
||||
const response = await misskeyApi('ap/show', { uri: activityPub.value });
|
||||
if (response.type !== 'Note') return;
|
||||
const theNoteId = response['object'].id;
|
||||
if (theNoteId && props.skipNoteIds && props.skipNoteIds.includes(theNoteId)) {
|
||||
hidePreview.value = true;
|
||||
return;
|
||||
}
|
||||
theNote.value = response['object'];
|
||||
fetchingTheNote.value = false;
|
||||
} catch (err) {
|
||||
if (_DEV_) {
|
||||
console.error(`failed to extract note for preview of ${activityPub.value}`, err);
|
||||
}
|
||||
activityPub.value = null;
|
||||
fetchingTheNote.value = false;
|
||||
theNote.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
const requestUrl = new URL(props.url);
|
||||
if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url');
|
||||
|
|
Loading…
Add table
Reference in a new issue