Skip to content

Commit

Permalink
Merge pull request #12 from upwork/v2.1.2
Browse files Browse the repository at this point in the history
v2.1.2
  • Loading branch information
mnovozhylov authored Sep 18, 2020
2 parents 7d1aa2a + c232992 commit 3ea2933
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History

## 2.1.2
* Send Message to a Batch of Rooms API

## 2.1.1
* Add Room Messages API
* Sync-up routers with OAuth1 version
Expand Down
17 changes: 16 additions & 1 deletion lib/routers/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ exports.Messages.prototype.getRoomDetails = function(company, roomId, params, ca
/**
* Get messages from a specific room
*
* @method getRoomDetails
* @method getRoomMessages
* @param company {String} Company ID
* @param roomId {String} Room ID
* @param params {Hash} Parameters
Expand Down Expand Up @@ -157,6 +157,21 @@ exports.Messages.prototype.sendMessageToRoom = function(company, roomId, params,
this.api.client.post('messages/v3/' + company + '/rooms/' + roomId + '/stories', params, callback);
}

/**
* Send a message to a batch of rooms
*
* @method sendMessageToRooms
* @param company {String} Company ID
* @param params {Hash} Parameters
* @param callback {String} Callback function
* @async
*/
exports.Messages.prototype.sendMessageToRooms = function(company, params, callback) {
params = params || {};
debug('running request');
this.api.client.post('messages/v3/' + company + '/stories/batch', params, callback);
}

/**
* Update a room settings
*
Expand Down

0 comments on commit 3ea2933

Please sign in to comment.