2022-02-16 14:48:15 +00:00
|
|
|
import sdk from '../rocketchat/services/sdk';
|
|
|
|
|
|
|
|
export default function (updatedSince: Date) {
|
|
|
|
// subscriptions.get: Since RC 0.60.0
|
|
|
|
// rooms.get: Since RC 0.62.0
|
|
|
|
if (updatedSince) {
|
|
|
|
const updatedDate = updatedSince.toISOString();
|
|
|
|
// TODO: missing definitions from server
|
2022-02-18 21:49:46 +00:00
|
|
|
return Promise.all([
|
|
|
|
// @ts-ignore
|
|
|
|
sdk.get('subscriptions.get', { updatedSince: updatedDate }),
|
|
|
|
// @ts-ignore
|
|
|
|
sdk.get('rooms.get', { updatedSince: updatedDate })
|
|
|
|
]);
|
2022-02-16 14:48:15 +00:00
|
|
|
}
|
|
|
|
// TODO: missing definitions from server
|
|
|
|
// @ts-ignore
|
|
|
|
return Promise.all([sdk.get('subscriptions.get'), sdk.get('rooms.get')]);
|
|
|
|
}
|