Bug 1217335 - Room context is no longer shown when loading the Loop standalone UI. r=Mardak
authorMark Banner <standard8@mozilla.com>
Thu, 22 Oct 2015 22:11:44 +0100
changeset 304251 045a0eb88d6aa83ea332d5ba01f83cca791ce13c
parent 304250 54f1ea8304351e6f5db86cec4ffce4739c094fc2
child 304252 85bd262e7094cfed408b3d36d2f9818355628fd2
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMardak
bugs1217335
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1217335 - Room context is no longer shown when loading the Loop standalone UI. r=Mardak
browser/components/loop/content/shared/js/activeRoomStore.js
browser/components/loop/content/shared/js/textChatStore.js
browser/components/loop/test/shared/activeRoomStore_test.js
browser/components/loop/test/shared/textChatStore_test.js
browser/components/loop/test/shared/textChatView_test.js
browser/components/loop/ui/ui-showcase.js
browser/components/loop/ui/ui-showcase.jsx
--- a/browser/components/loop/content/shared/js/activeRoomStore.js
+++ b/browser/components/loop/content/shared/js/activeRoomStore.js
@@ -548,18 +548,18 @@ loop.store.ActiveRoomStore = (function()
     /**
      * Handles room updates notified by the mozLoop rooms API.
      *
      * @param {String} eventName The name of the event
      * @param {Object} roomData  The new roomData.
      */
     _handleRoomUpdate: function(eventName, roomData) {
       this.dispatchAction(new sharedActions.UpdateRoomInfo({
-        urls: roomData.decryptedContext.urls,
-        description: roomData.decryptedContext.description,
+        roomContextUrls: roomData.decryptedContext.urls,
+        roomDescription: roomData.decryptedContext.description,
         participants: roomData.participants,
         roomName: roomData.decryptedContext.roomName,
         roomUrl: roomData.roomUrl
       }));
     },
 
     /**
      * Handles the deletion of a room, notified by the mozLoop rooms API.
--- a/browser/components/loop/content/shared/js/textChatStore.js
+++ b/browser/components/loop/content/shared/js/textChatStore.js
@@ -160,19 +160,20 @@ loop.store.TextChatStore = (function() {
       if (actionData.roomName) {
         this._appendTextChatMessage(CHAT_MESSAGE_TYPES.SPECIAL, {
           contentType: CHAT_CONTENT_TYPES.ROOM_NAME,
           message: actionData.roomName
         });
       }
 
       // Append the context if we have any.
-      if (("urls" in actionData) && actionData.urls && actionData.urls.length) {
+      if (("roomContextUrls" in actionData) && actionData.roomContextUrls &&
+          actionData.roomContextUrls.length) {
         // We only support the first url at the moment.
-        var urlData = actionData.urls[0];
+        var urlData = actionData.roomContextUrls[0];
 
         this._appendTextChatMessage(CHAT_MESSAGE_TYPES.SPECIAL, {
           contentType: CHAT_CONTENT_TYPES.CONTEXT,
           message: urlData.description,
           extraData: {
             location: urlData.location,
             thumbnail: urlData.thumbnail
           }
--- a/browser/components/loop/test/shared/activeRoomStore_test.js
+++ b/browser/components/loop/test/shared/activeRoomStore_test.js
@@ -2027,21 +2027,21 @@ describe("loop.store.ActiveRoomStore", f
           roomUrl: "original"
         };
 
         fakeMozLoop.rooms.on.callArgWith(1, "update", fakeRoomData);
 
         sinon.assert.calledOnce(dispatcher.dispatch);
         sinon.assert.calledWithExactly(dispatcher.dispatch,
           new sharedActions.UpdateRoomInfo({
-            description: "fakeDescription",
+            roomDescription: "fakeDescription",
             participants: undefined,
             roomName: fakeRoomData.decryptedContext.roomName,
             roomUrl: fakeRoomData.roomUrl,
-            urls: {
+            roomContextUrls: {
               fake: "url"
             }
           }));
       });
 
       it("should call close window", function() {
         var fakeRoomData = {
           decryptedContext: {
--- a/browser/components/loop/test/shared/textChatStore_test.js
+++ b/browser/components/loop/test/shared/textChatStore_test.js
@@ -168,17 +168,17 @@ describe("loop.store.TextChatStore", fun
         receivedTimestamp: undefined
       }]);
     });
 
     it("should add the context to the list", function() {
       store.updateRoomInfo(new sharedActions.UpdateRoomInfo({
         roomName: "Let's share!",
         roomUrl: "fake",
-        urls: [{
+        roomContextUrls: [{
           description: "A wonderful event",
           location: "http://wonderful.invalid",
           thumbnail: "fake"
         }]
       }));
 
       expect(store.getStoreState("messageList")).eql([
         {
@@ -200,17 +200,17 @@ describe("loop.store.TextChatStore", fun
           }
         }
       ]);
     });
 
     it("should not add more than one context message", function() {
       store.updateRoomInfo(new sharedActions.UpdateRoomInfo({
         roomUrl: "fake",
-        urls: [{
+        roomContextUrls: [{
           description: "A wonderful event",
           location: "http://wonderful.invalid",
           thumbnail: "fake"
         }]
       }));
 
       expect(store.getStoreState("messageList")).eql([{
         type: CHAT_MESSAGE_TYPES.SPECIAL,
@@ -221,17 +221,17 @@ describe("loop.store.TextChatStore", fun
         extraData: {
           location: "http://wonderful.invalid",
           thumbnail: "fake"
         }
       }]);
 
       store.updateRoomInfo(new sharedActions.UpdateRoomInfo({
         roomUrl: "fake",
-        urls: [{
+        roomContextUrls: [{
           description: "A wonderful event2",
           location: "http://wonderful.invalid2",
           thumbnail: "fake2"
         }]
       }));
 
       expect(store.getStoreState("messageList")).eql([{
         type: CHAT_MESSAGE_TYPES.SPECIAL,
--- a/browser/components/loop/test/shared/textChatView_test.js
+++ b/browser/components/loop/test/shared/textChatView_test.js
@@ -587,17 +587,17 @@ describe("loop.shared.views.TextChatView
     });
 
     it("should render a special entry for the context url", function() {
       view = mountTestComponent();
 
       store.updateRoomInfo(new sharedActions.UpdateRoomInfo({
         roomName: "A Very Long Conversation Name",
         roomUrl: "http://showcase",
-        urls: [{
+        roomContextUrls: [{
           description: "A wonderful page!",
           location: "http://wonderful.invalid"
           // use the fallback thumbnail
         }]
       }));
 
       var node = view.getDOMNode();
       expect(node.querySelector(".text-chat-entries")).to.not.eql(null);
--- a/browser/components/loop/ui/ui-showcase.js
+++ b/browser/components/loop/ui/ui-showcase.js
@@ -327,17 +327,17 @@
   var textChatStore = new loop.store.TextChatStore(dispatcher, {
     sdkDriver: mockSDK
   });
 
   // Update the text chat store with the room info.
   textChatStore.updateRoomInfo(new sharedActions.UpdateRoomInfo({
     roomName: "A Very Long Conversation Name",
     roomUrl: "http://showcase",
-    urls: [{
+    roomContextUrls: [{
       description: "A wonderful page!",
       location: "http://wonderful.invalid"
       // use the fallback thumbnail
     }]
   }));
 
   textChatStore.setStoreState({ textChatEnabled: true });
 
--- a/browser/components/loop/ui/ui-showcase.jsx
+++ b/browser/components/loop/ui/ui-showcase.jsx
@@ -327,17 +327,17 @@
   var textChatStore = new loop.store.TextChatStore(dispatcher, {
     sdkDriver: mockSDK
   });
 
   // Update the text chat store with the room info.
   textChatStore.updateRoomInfo(new sharedActions.UpdateRoomInfo({
     roomName: "A Very Long Conversation Name",
     roomUrl: "http://showcase",
-    urls: [{
+    roomContextUrls: [{
       description: "A wonderful page!",
       location: "http://wonderful.invalid"
       // use the fallback thumbnail
     }]
   }));
 
   textChatStore.setStoreState({ textChatEnabled: true });