mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-29 12:48:57 +03:00
Support unofficial status.quote
This commit is contained in:
parent
4ca9a802e3
commit
a2d995ec07
1 changed files with 13 additions and 3 deletions
|
@ -187,9 +187,19 @@ export function saveStatus(status, instance, opts) {
|
|||
if (oldStatus?._pinned) status._pinned = oldStatus._pinned;
|
||||
// if (oldStatus?._filtered) status._filtered = oldStatus._filtered;
|
||||
states.statuses[key] = status;
|
||||
if (status.reblog) {
|
||||
const key = statusKey(status.reblog.id, instance);
|
||||
states.statuses[key] = status.reblog;
|
||||
if (status.reblog?.id) {
|
||||
const srKey = statusKey(status.reblog.id, instance);
|
||||
states.statuses[srKey] = status.reblog;
|
||||
}
|
||||
if (status.quote?.id) {
|
||||
const sKey = statusKey(status.quote.id, instance);
|
||||
states.statuses[sKey] = status.quote;
|
||||
states.statusQuotes[key] = [
|
||||
{
|
||||
id: status.quote.id,
|
||||
instance,
|
||||
},
|
||||
];
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue