mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +01:00
Don't return
This commit is contained in:
parent
26d445af7d
commit
ff35c458c3
1 changed files with 22 additions and 23 deletions
|
@ -178,30 +178,29 @@ export function groupContext(items, instance) {
|
||||||
|
|
||||||
if (item.inReplyToId && item.inReplyToAccountId !== item.account.id) {
|
if (item.inReplyToId && item.inReplyToAccountId !== item.account.id) {
|
||||||
const sKey = statusKey(item.id, instance);
|
const sKey = statusKey(item.id, instance);
|
||||||
if (states.statusReply[sKey]) {
|
if (!states.statusReply[sKey]) {
|
||||||
return;
|
// If it's a reply and not a thread
|
||||||
|
queueMicrotask(async () => {
|
||||||
|
try {
|
||||||
|
const { masto } = api({ instance });
|
||||||
|
// const replyToStatus = await masto.v1.statuses
|
||||||
|
// .$select(item.inReplyToId)
|
||||||
|
// .fetch();
|
||||||
|
const replyToStatus = await fetchStatus(item.inReplyToId, masto);
|
||||||
|
saveStatus(replyToStatus, instance, {
|
||||||
|
skipThreading: true,
|
||||||
|
skipUnfurling: true,
|
||||||
|
});
|
||||||
|
states.statusReply[sKey] = {
|
||||||
|
id: replyToStatus.id,
|
||||||
|
instance,
|
||||||
|
};
|
||||||
|
} catch (e) {
|
||||||
|
// Silently fail
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// If it's a reply and not a thread
|
|
||||||
queueMicrotask(async () => {
|
|
||||||
try {
|
|
||||||
const { masto } = api({ instance });
|
|
||||||
// const replyToStatus = await masto.v1.statuses
|
|
||||||
// .$select(item.inReplyToId)
|
|
||||||
// .fetch();
|
|
||||||
const replyToStatus = await fetchStatus(item.inReplyToId, masto);
|
|
||||||
saveStatus(replyToStatus, instance, {
|
|
||||||
skipThreading: true,
|
|
||||||
skipUnfurling: true,
|
|
||||||
});
|
|
||||||
states.statusReply[sKey] = {
|
|
||||||
id: replyToStatus.id,
|
|
||||||
instance,
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
// Silently fail
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
newItems.push(item);
|
newItems.push(item);
|
||||||
|
|
Loading…
Reference in a new issue