[Glitch] Allow clients to fetch notifications made while they were offline

Port cbf97c03bb to glitch-soc
This commit is contained in:
Thibaut Girka
2018-05-27 19:30:52 +02:00
committed by ThibG
parent 0ad3eedd4c
commit 4eba8c50c3
5 changed files with 82 additions and 113 deletions

View File

@@ -5,7 +5,7 @@ import {
expandHomeTimeline,
disconnectTimeline,
} from './timelines';
import { updateNotifications, refreshNotifications } from './notifications';
import { updateNotifications, expandNotifications } from './notifications';
import { getLocale } from 'mastodon/locales';
const { messages } = getLocale();
@@ -38,7 +38,7 @@ export function connectTimelineStream (timelineId, path, pollingRefresh = null)
function refreshHomeTimelineAndNotification (dispatch) {
dispatch(expandHomeTimeline());
dispatch(refreshNotifications());
dispatch(expandNotifications());
}
export const connectUserStream = () => connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification);