This reverts commit fa00ef92ef
.
This commit is contained in:
parent
ec97d8417f
commit
dfe9e4fccb
|
@ -436,16 +436,11 @@ class RoomActionsView extends React.Component {
|
||||||
const { navigation, leaveRoom } = this.props;
|
const { navigation, leaveRoom } = this.props;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const db = database.active;
|
const result = await RocketChat.teamListRoomsOfUser({ teamId: room.teamId, userId: room.u._id });
|
||||||
const subCollection = db.get('subscriptions');
|
|
||||||
const rooms = await subCollection.query(
|
|
||||||
Q.where('team_id', Q.eq(room.teamId)),
|
|
||||||
Q.where('team_main', Q.notEq(true))
|
|
||||||
);
|
|
||||||
|
|
||||||
if (rooms.length) {
|
if (result.rooms?.length) {
|
||||||
const teamChannels = rooms.map(r => ({
|
const teamChannels = result.rooms.map(r => ({
|
||||||
rid: r.id,
|
rid: r._id,
|
||||||
name: r.name,
|
name: r.name,
|
||||||
teamId: r.teamId,
|
teamId: r.teamId,
|
||||||
alert: r.isLastOwner
|
alert: r.isLastOwner
|
||||||
|
|
Loading…
Reference in New Issue