Skip to content

Commit

Permalink
Merge pull request RocketChat#202 from assistify/help-request-api
Browse files Browse the repository at this point in the history
fixed help request api
  • Loading branch information
ThomasRoehl authored Feb 1, 2018
2 parents 0a26b70 + 7802f6c commit d8c6d46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ pm2.json
settings.json
build.sh
/public/livechat
.screenshots
.screenshots
3 changes: 2 additions & 1 deletion packages/assistify-help-request/server/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class HelpRequestApi {

return new HelpDiscussionCreatedResponse(
HelpRequestApi.getUrlForRoom(creationResult.room),
creationResult.room,
creationResult.members
);
}
Expand Down Expand Up @@ -129,7 +130,7 @@ export class HelpRequestApi {
let channel = {};
try {
Meteor.runAsUser(seekerUser._id, () => {
channel = Meteor.call('createRequest', `Assistify_${ HelpRequestApi.getNextAssistifyRoomCode() }`, '', providerUsers.map((user) => user.username), environment);
channel = Meteor.call('createRequest', `Assistify_${ HelpRequestApi.getNextAssistifyRoomCode() }`, '', '', providerUsers.map((user) => user.username), environment);
try {
if (message) {
RocketChat.sendMessage({
Expand Down
3 changes: 2 additions & 1 deletion packages/assistify-help-request/server/types.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Definition of value objects. No clue why export interface is not supported
export class HelpDiscussionCreatedResponse {
constructor(url, members) {
constructor(url, room, members) {
this.success = true;
this.url = url;
this.room = {'_id': room._id, 'name': room.name, 't': room.t, 'expertise': room.expertise, 'topic': room.topic, 'helpRequestId': room.helpRequestId};
this.members = members;
}
}

0 comments on commit d8c6d46

Please sign in to comment.