[PLT-6707] /header [text] slash command: Edit the channel header (#6566)

* add /header slash command

* update websocket

* updater per review
Этот коммит содержится в:
Carlos Tadeu Panato Junior
2017-06-29 14:06:17 +02:00
коммит произвёл Joram Wilander
родитель 520cedea16
Коммит 976030ea25
8 изменённых файлов: 141 добавлений и 8 удалений

Просмотреть файл

@@ -212,6 +212,14 @@ export function showDeletePostModal(post, commentCount = 0) {
});
}
export function showChannelHeaderUpdateModal(channel) {
AppDispatcher.handleViewAction({
type: ActionTypes.TOGGLE_CHANNEL_HEADER_UPDATE_MODAL,
value: true,
channel
});
}
export function showGetPostLinkModal(post) {
AppDispatcher.handleViewAction({
type: ActionTypes.TOGGLE_GET_POST_LINK_MODAL,

Просмотреть файл

@@ -229,6 +229,11 @@ function handleEvent(msg) {
}
}
function handleChannelUpdatedEvent(msg) {
const channel = JSON.parse(msg.data.channel);
dispatch({type: ChannelTypes.RECEIVED_CHANNEL, data: channel});
}
function handleNewPostEvent(msg) {
const post = JSON.parse(msg.data.post);
handleNewPost(post, msg);
@@ -341,11 +346,6 @@ function handleUserRemovedEvent(msg) {
}
}
function handleChannelUpdatedEvent(msg) {
const channel = JSON.parse(msg.data.channel);
dispatch({type: ChannelTypes.RECEIVED_CHANNEL, data: channel});
}
function handleUserUpdatedEvent(msg) {
const user = msg.data.user;
if (UserStore.getCurrentId() !== user.id) {