Skip to content

Commit

Permalink
Propagate topic value of the expertise (RocketChat#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyokrm authored and mrsimpson committed Apr 19, 2018
1 parent 57e6674 commit 10e6378
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class CreateRequestFromExpertise extends CreateRequestBase {
this._members = CreateRequestFromExpertise.getExperts(this._expertise);
}
const roomCreateResult = RocketChat.createRoom('r', this.name, Meteor.user() && Meteor.user().username, this._members, false, {expertise: this._expertise});
if (this._requestTitle) {
if (this._expertise) {
RocketChat.saveRoomTopic(roomCreateResult.rid, this._expertise, Meteor.user());
}
this._createNotifications(roomCreateResult.rid, this._members.concat([Meteor.user().username]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ export class CreateRequestFromRoomId extends CreateRequestBase {
if (parentRoom.t === 'e') {
parentRoom.usernames.concat([Meteor.user().username]);
}
if (parentRoom.name) {
RocketChat.saveRoomTopic(roomCreateResult.rid, parentRoom.name, Meteor.user());
}
// Invoke create notifications
this._createNotifications(roomCreateResult.rid, parentRoom.usernames);
// Instance of newly created room.
Expand Down

0 comments on commit 10e6378

Please sign in to comment.