diff --git a/app/lib/methods/getRooms.js b/app/lib/methods/getRooms.js deleted file mode 100644 index 5004beda0..000000000 --- a/app/lib/methods/getRooms.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function (updatedSince) { - // subscriptions.get: Since RC 0.60.0 - // rooms.get: Since RC 0.62.0 - if (updatedSince) { - updatedSince = updatedSince.toISOString(); - return Promise.all([this.sdk.get('subscriptions.get', { updatedSince }), this.sdk.get('rooms.get', { updatedSince })]); - } - return Promise.all([this.sdk.get('subscriptions.get'), this.sdk.get('rooms.get')]); -} diff --git a/app/lib/methods/getRooms.ts b/app/lib/methods/getRooms.ts new file mode 100644 index 000000000..e4f369975 --- /dev/null +++ b/app/lib/methods/getRooms.ts @@ -0,0 +1,15 @@ +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 + // @ts-ignore + return Promise.all([sdk.get('subscriptions.get', { updatedDate }), sdk.get('rooms.get', { updatedDate })]); + } + // TODO: missing definitions from server + // @ts-ignore + return Promise.all([sdk.get('subscriptions.get'), sdk.get('rooms.get')]); +}