Skip to content
Snippets Groups Projects
Unverified Commit 547845bd authored by Diego Sampaio's avatar Diego Sampaio
Browse files

Merge branch 'release-6.2.0' into develop

parents c9af73f8 8fdb9513
No related branches found
No related tags found
No related merge requests found
FROM registry.access.redhat.com/ubi8/nodejs-12
ENV RC_VERSION 6.2.0-develop
ENV RC_VERSION 6.2.0-rc.1
MAINTAINER buildmaster@rocket.chat
......
......@@ -171,7 +171,7 @@ export const sendNoWrap = async ({
const eventResult = await Apps.triggerEvent('IPreEmailSent', { email });
Meteor.defer(() => Email.sendAsync(eventResult || email));
Meteor.defer(() => Email.sendAsync(eventResult || email).catch((e) => console.error(e)));
};
export const send = async ({
......
{
"version": "6.2.0-develop"
"version": "6.2.0-rc.1"
}
......@@ -38,7 +38,7 @@ export const getNewUpdates = async () => {
headers,
});
const { data } = await response.json();
const data = await response.json();
check(
data,
......
......@@ -35,7 +35,7 @@ const appsNotifyAppRequests = async function _appsNotifyAppRequests() {
const pendingSentUrl = `${baseUrl}/v1/app-request/sent/pending`;
const result = await fetch(pendingSentUrl, options);
const data = (await result.json()).data?.data;
const { data } = await result.json();
const filtered = installedApps.filter((app) => data.indexOf(app.getID()) !== -1);
for await (const app of filtered) {
......
......@@ -86,10 +86,11 @@ const appsUpdateMarketplaceInfo = async function _appsUpdateMarketplaceInfo() {
try {
const response = await fetch(fullUrl, options);
const result = await response.json();
if (Array.isArray(result.data)) {
data = result.data;
if (Array.isArray(result)) {
data = result;
}
} catch (err) {
Apps.debugLog(err);
......
import { TAPi18n } from 'meteor/rocketchat:tap-i18n';
import type { AppRequest, IUser, Pagination } from '@rocket.chat/core-typings';
import { API } from '../../../../app/api/server';
import { getWorkspaceAccessToken } from '../../../../app/cloud/server';
import { sendDirectMessageToUsers } from '../../../../server/lib/sendDirectMessageToUsers';
import { fetch } from '../../../../server/lib/http/fetch';
......@@ -60,8 +59,7 @@ export const appRequestNotififyForUsers = async (
const data = await response.json();
const appRequests = API.v1.success({ data });
const { total } = appRequests.body.data.data.meta;
const { total } = data.meta;
if (total === undefined || total === 0) {
return [];
......@@ -73,11 +71,7 @@ export const appRequestNotififyForUsers = async (
const learnMore = `${workspaceUrl}marketplace/explore/info/${appId}`;
// Notify first batch
requestsCollection.push(
Promise.resolve(appRequests.body.data.data.data)
.then((response) => notifyBatchOfUsers(appName, learnMore, response))
.catch(notifyBatchOfUsersError),
);
requestsCollection.push(notifyBatchOfUsers(appName, learnMore, data.data).catch(notifyBatchOfUsersError));
// Batch requests
// eslint-disable-next-line @typescript-eslint/no-unused-vars
......@@ -89,9 +83,9 @@ export const appRequestNotififyForUsers = async (
{ headers },
);
const data = await request.json();
const { data } = await request.json();
requestsCollection.push(notifyBatchOfUsers(appName, learnMore, data.data.data));
requestsCollection.push(notifyBatchOfUsers(appName, learnMore, data));
}
const finalResult = await Promise.all(requestsCollection);
......
{
"name": "@rocket.chat/meteor",
"description": "The Ultimate Open Source WebChat Platform",
"version": "6.2.0-develop",
"version": "6.2.0-rc.1",
"private": true,
"author": {
"name": "Rocket.Chat",
......
......@@ -123,9 +123,8 @@ export class Mobex implements ISMSProvider {
`${currentAddress}/send?username=${currentUsername}&password=${currentPassword}&to=${strippedTo}&from=${currentFrom}&content=${message}`,
);
const json = await response.json();
if (response.ok) {
result.resultMsg = json;
result.resultMsg = await response.text();
result.isSuccess = true;
} else {
result.resultMsg = `Could not able to send SMS. Code: ${response.status}`;
......@@ -173,7 +172,7 @@ export class Mobex implements ISMSProvider {
result.isSuccess = response.ok;
result.resultMsg = 'Success';
result.response = await response.json();
result.response = await response.text();
} catch (err) {
result.resultMsg = `Error while sending SMS with Mobex. Detail: ${err}`;
SystemLogger.error({ msg: 'Error while sending SMS with Mobex', err });
......
{
"name": "rocket.chat",
"version": "6.2.0-develop",
"version": "6.2.0-rc.1",
"description": "Rocket.Chat Monorepo",
"main": "index.js",
"private": true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment