Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #245 from mozilla-services/1094838-userMac-consist…
Browse files Browse the repository at this point in the history
…ency

Bug 1094838 — Be consistent on the userMac usage.
  • Loading branch information
Natim committed Nov 16, 2014
2 parents fc6eced + 2ba80be commit 43e9eae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion loop/config.js
Expand Up @@ -193,7 +193,7 @@ var conf = convict({
fakeTokBoxURL: {
doc: "URL where to Mock TokBox calls",
format: String,
default: "http://httpbin.org/deny"
default: "https://call.stage.mozaws.net/"
},
tokBox: {
apiUrl: {
Expand Down
6 changes: 3 additions & 3 deletions loop/routes/rooms.js
Expand Up @@ -71,7 +71,7 @@ module.exports = function (apiRouter, conf, logError, storage, auth,
* Update room data and emit an event if needed so the owner is aware.
*
* @param roomToken The roomToken
* @param userIdHmac The roomOwnerHmac
* @param roomOwnerHmac The roomOwnerHmac
* @param callback The action to do next
**/
function emitRoomEvent(roomToken, roomOwnerHmac, callback) {
Expand Down Expand Up @@ -151,7 +151,7 @@ module.exports = function (apiRouter, conf, logError, storage, auth,
participants = participants.map(function(participant) {
participant.owner = (participant.userIdHmac === roomStorageData.roomOwnerHmac);
delete participant.hawkIdHmac;
delete participant.userIdHmac;
delete participant.userMac;
delete participant.clientMaxSize;
return participant;
});
Expand Down Expand Up @@ -337,7 +337,7 @@ module.exports = function (apiRouter, conf, logError, storage, auth,
id: uuid.v4(),
displayName: req.body.displayName,
clientMaxSize: requestMaxSize,
userIdHmac: req.user,
userMac: req.user,
account: account
}, ttl, function(err) {
if (res.serverError(err)) return;
Expand Down
2 changes: 1 addition & 1 deletion test/rooms_test.js
Expand Up @@ -1353,7 +1353,7 @@ describe("/rooms", function() {
expect(participant.account).to.eql('alexis@notmyidea.org');
expect(participant.displayName).to.eql('Alexis');
expect(participant.id).to.not.eql(undefined);
expect(participant.userIdHmac).to.eql(undefined);
expect(participant.userMac).to.eql(undefined);
expect(participant.hawkIdHmac).to.eql(undefined);

delete res.body[0].participants;
Expand Down

0 comments on commit 43e9eae

Please sign in to comment.