Merge branch 'develop' into develop_UrlInPinned
This commit is contained in:
commit
1d6e3aaac8
|
@ -16,7 +16,15 @@ import RoomTypeIcon from '../../containers/RoomTypeIcon';
|
|||
import SafeAreaView from '../../containers/SafeAreaView';
|
||||
import Status from '../../containers/Status';
|
||||
import StatusBar from '../../containers/StatusBar';
|
||||
import { IApplicationState, IBaseScreen, IRoom, ISubscription, IUser, TSubscriptionModel } from '../../definitions';
|
||||
import {
|
||||
IApplicationState,
|
||||
IBaseScreen,
|
||||
IRoom,
|
||||
ISubscription,
|
||||
IUser,
|
||||
SubscriptionType,
|
||||
TSubscriptionModel
|
||||
} from '../../definitions';
|
||||
import { withDimensions } from '../../dimensions';
|
||||
import I18n from '../../i18n';
|
||||
import database from '../../lib/database';
|
||||
|
@ -33,6 +41,7 @@ import styles from './styles';
|
|||
import { ERoomType } from '../../definitions/ERoomType';
|
||||
import { E2E_ROOM_TYPES, SWITCH_TRACK_COLOR, themes } from '../../lib/constants';
|
||||
import { compareServerVersion } from '../../lib/methods/helpers/compareServerVersion';
|
||||
import { getSubscriptionByRoomId } from '../../lib/database/services/Subscription';
|
||||
|
||||
interface IRoomActionsViewProps extends IBaseScreen<ChatsStackParamList, 'RoomActionsView'> {
|
||||
userId: string;
|
||||
|
@ -139,7 +148,15 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
|
|||
this.mounted = true;
|
||||
const { room, member } = this.state;
|
||||
if (room.rid) {
|
||||
if (!room.id && !this.isOmnichannelPreview) {
|
||||
if (!room.id) {
|
||||
if (room.t === SubscriptionType.OMNICHANNEL) {
|
||||
if (!this.isOmnichannelPreview) {
|
||||
const result = await getSubscriptionByRoomId(room.rid);
|
||||
if (result) {
|
||||
this.setState({ room: result });
|
||||
}
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
const result = await RocketChat.getChannelInfo(room.rid);
|
||||
if (result.success) {
|
||||
|
@ -150,6 +167,7 @@ class RoomActionsView extends React.Component<IRoomActionsViewProps, IRoomAction
|
|||
log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (room && room.t !== 'd' && this.canViewMembers()) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue