Skip to content

Commit c222e1e

Browse files
committed
more
1 parent 5f34fc0 commit c222e1e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

app/lib/methods/getRoles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function getRoles(): Promise<void> {
7676
// RC 0.70.0
7777
const result = await sdk.get('/v1/roles.list');
7878

79-
if (!result.success) {
79+
if (!result.roles) {
8080
return resolve();
8181
}
8282

app/lib/methods/getSingleMessage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { type IMessage } from '../../definitions';
1+
import { type IMessage } from '@rocket.chat/core-typings';
22
import { getSingleMessage as getSingleMessageService } from '../services/restApi';
33

44
const getSingleMessage = (messageId: string): Promise<IMessage> =>
55
new Promise(async (resolve, reject) => {
66
try {
77
const result = await getSingleMessageService(messageId);
8-
if (result.success) {
8+
if (result.message) {
99
return resolve(result.message);
1010
}
1111
return reject();

app/sagas/videoConf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function* initCall({ payload: { mic, cam, direct, rid } }: { payload: TCallProps
175175
if (isServer5OrNewer) {
176176
try {
177177
const videoConfResponse = yield* call(videoConferenceStart, rid);
178-
if (videoConfResponse.success) {
178+
if (videoConfResponse.data) {
179179
if (direct && videoConfResponse.data.type === 'direct') {
180180
yield call(callUser, { rid, uid: videoConfResponse.data.calleeId, callId: videoConfResponse.data.callId });
181181
} else {

app/views/ReadReceiptView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class ReadReceiptView extends React.Component<IReadReceiptViewProps, IReadReceip
8585

8686
try {
8787
const result = await getReadReceipts(this.messageId);
88-
if (result.success) {
88+
if (result.receipts) {
8989
this.setState({
9090
receipts: result.receipts,
9191
loading: false

app/views/RoomActionsView/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
198198
// If the previous users count changes, we will update it and the members count to the value from the room counter.
199199
if (this.prevUsersCount !== changes.usersCount) {
200200
const counters = await getRoomCounters(room.rid, room.t as any);
201-
if (counters.success) {
201+
if (counters.members) {
202202
if (this.mounted) {
203203
this.setState({ membersCount: counters.members });
204204
} else {
@@ -229,7 +229,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
229229
} else {
230230
try {
231231
const result = await getChannelInfo(room.rid);
232-
if (result.success) {
232+
if (result.channel) {
233233
// @ts-ignore
234234
this.setState({ room: { ...result.channel, rid: result.channel._id } });
235235
}
@@ -242,7 +242,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
242242
if (room && (await this.canViewMembers())) {
243243
try {
244244
const counters = await getRoomCounters(room.rid, room.t as any);
245-
if (counters.success) {
245+
if (counters.members) {
246246
await this.updateUsersCount(counters.members);
247247
this.setState({ joined: counters.joined, membersCount: counters.members });
248248
}

0 commit comments

Comments
 (0)