Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/api/server/v1/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function createChannelValidator(params) {

function createChannel(userId, params) {
const readOnly = typeof params.readOnly !== 'undefined' ? params.readOnly : false;
const id = Meteor.runAsUser(userId, () => Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields));
const id = Meteor.runAsUser(userId, () => Meteor.call('createChannel', params.name, params.members ? params.members : [], readOnly, params.customFields, params.extraData));

return {
channel: findChannelByIdOrName({ params: { roomId: id.rid }, userId: this.userId }),
Expand Down
6 changes: 5 additions & 1 deletion app/api/server/v1/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,16 @@ API.v1.addRoute('groups.create', { authRequired: true }, {
if (this.bodyParams.customFields && !(typeof this.bodyParams.customFields === 'object')) {
return API.v1.failure('Body param "customFields" must be an object if provided');
}
if (this.bodyParams.extraData && !(typeof this.bodyParams.extraData === 'object')) {
return API.v1.failure('Body param "extraData" must be an object if provided');
}

const readOnly = typeof this.bodyParams.readOnly !== 'undefined' ? this.bodyParams.readOnly : false;

let id;

Meteor.runAsUser(this.userId, () => {
id = Meteor.call('createPrivateGroup', this.bodyParams.name, this.bodyParams.members ? this.bodyParams.members : [], readOnly, this.bodyParams.customFields);
id = Meteor.call('createPrivateGroup', this.bodyParams.name, this.bodyParams.members ? this.bodyParams.members : [], readOnly, this.bodyParams.customFields, this.bodyParams.extraData);
});

return API.v1.success({
Expand Down
1 change: 0 additions & 1 deletion app/lib/server/functions/createRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export const createRoom = function(type, name, owner, members = [], readOnly, ex
if (type === 'c') {
callbacks.run('beforeCreateChannel', owner, room);
}

room = Rooms.createWithFullRoomData(room);

for (const username of members) {
Expand Down
2 changes: 0 additions & 2 deletions app/ui/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import './views/404/roomNotFound.html';
import './views/404/invalidSecretURL.html';
import './views/404/invalidInvite.html';
import './views/app/burger.html';
import './views/app/createChannel.html';
import './views/app/editStatus.html';
import './views/app/editStatus.css';
import './views/app/home.html';
Expand All @@ -28,7 +27,6 @@ import './views/app/photoswipe.html';
import './views/cmsPage';
import './views/404/roomNotFound';
import './views/app/burger';
import './views/app/createChannel';
import './views/app/CreateDirectMessage';
import './views/app/editStatus';
import './views/app/home';
Expand Down
217 changes: 0 additions & 217 deletions app/ui/client/views/app/createChannel.html

This file was deleted.

Loading