mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
Use sinceId for new checks
This commit is contained in:
parent
353c911232
commit
808d56432e
1 changed files with 4 additions and 0 deletions
|
@ -121,11 +121,15 @@ function startVisibility() {
|
|||
// Buffer for WS reconnect
|
||||
(async () => {
|
||||
try {
|
||||
const firstStatusID = states.home[0]?.id;
|
||||
const firstNotificationID = states.notifications[0]?.id;
|
||||
const fetchHome = masto.v1.timelines.listHome({
|
||||
limit: 1,
|
||||
...(firstStatusID && { sinceId: firstStatusID }),
|
||||
});
|
||||
const fetchNotifications = masto.v1.notifications.list({
|
||||
limit: 1,
|
||||
...(firstNotificationID && { sinceId: firstNotificationID }),
|
||||
});
|
||||
|
||||
const newStatuses = await fetchHome;
|
||||
|
|
Loading…
Reference in a new issue