Unverified Commit b90cf9e4 authored by Djorkaeff Alexandre's avatar Djorkaeff Alexandre Committed by GitHub
Browse files

[NEW] Omnichannel Beta (#1674)

parent ba37bb19
......@@ -32,6 +32,8 @@ const RoomTypeIcon = React.memo(({
return <Image source={{ uri: 'hashtag' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
} if (type === 'd') {
return <CustomIcon name='at' size={13} style={[styles.style, styles.discussion, { color }]} />;
} if (type === 'l') {
return <CustomIcon name='livechat' size={13} style={[styles.style, styles.discussion, { color }]} />;
}
return <Image source={{ uri: 'lock' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
});
......
......@@ -949,7 +949,7 @@ const RocketChat = {
},
roomTypeToApiType(t) {
const types = {
c: 'channels', d: 'im', p: 'groups'
c: 'channels', d: 'im', p: 'groups', l: 'channels'
};
return types[t];
},
......
......@@ -14,9 +14,12 @@ export const onNotification = (notification) => {
} = EJSON.parse(data.ejson);
const types = {
c: 'channel', d: 'direct', p: 'group'
c: 'channel', d: 'direct', p: 'group', l: 'channels'
};
const roomName = type === 'd' ? sender.username : name;
let roomName = type === 'd' ? sender.username : name;
if (type === 'l') {
roomName = sender.name;
}
const params = {
host,
......
......@@ -13,7 +13,7 @@ import EventEmitter from '../utils/events';
import { appStart } from '../actions';
const roomTypes = {
channel: 'c', direct: 'd', group: 'p'
channel: 'c', direct: 'd', group: 'p', channels: 'l'
};
const handleInviteLink = function* handleInviteLink({ params, requireLogin = false }) {
......
......@@ -349,7 +349,10 @@ class RoomActionsView extends React.Component {
renderItem: this.renderItem
});
}
} else if (t === 'l') {
sections[2].data = [notificationsAction];
}
return sections;
}
......
......@@ -117,7 +117,7 @@ class RoomInfoView extends React.Component {
}
}
const permissions = await RocketChat.hasPermission([PERMISSION_EDIT_ROOM], room.rid);
if (permissions[PERMISSION_EDIT_ROOM] && !room.prid) {
if (permissions[PERMISSION_EDIT_ROOM] && !room.prid && this.t !== 'l') {
navigation.setParams({ showEdit: true });
}
}
......
......@@ -40,6 +40,8 @@ const Icon = React.memo(({ type, status, theme }) => {
icon = 'thread';
} else if (type === 'c') {
icon = 'hashtag';
} else if (type === 'l') {
icon = 'livechat';
} else {
icon = 'lock';
}
......
......@@ -380,8 +380,7 @@ class RoomsListView extends React.Component {
.get('subscriptions')
.query(
Q.where('archived', false),
Q.where('open', true),
Q.where('t', Q.notEq('l'))
Q.where('open', true)
)
.observeWithColumns(['room_updated_at', 'unread', 'alert', 'user_mentions', 'f', 't']);
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "livechat.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "livechat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "livechat@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment