Closed Bug 1101494 Opened 10 years ago Closed 10 years ago

Guest mode doesn't work for rooms on a fresh profile (or if you haven't copied a url for 30 days)

Categories

(Hello (Loop) :: Client, defect, P1)

defect

Tracking

(firefox34 unaffected, firefox35? verified, firefox36 verified)

VERIFIED FIXED
mozilla36
Iteration:
36.3
Tracking Status
firefox34 --- unaffected
firefox35 ? verified
firefox36 --- verified
backlog Fx35+

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files, 2 obsolete files)

STR:

1) Start up Firefox with a fresh profile
2) Try and create a room

-> It fails, no error message is displayed.

It will fail for any user that is using Loop in guest mode and haven't copied a call url in the last 30 days.
This fixes joining a room in guest mode by using the guest string if we're not logged in.
Attachment #8525379 - Flags: review?(mdeboer)
Comment on attachment 8525379 [details] [diff] [review]
[checked in] Fix joining a room in guest mode

Review of attachment 8525379 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with comments addressed.

::: browser/components/loop/LoopRooms.jsm
@@ +5,5 @@
>  
>  const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
>  
>  Cu.import("resource://gre/modules/XPCOMUtils.jsm");
> +Cu.import("resource://gre/modules/Services.jsm");

I *think* this belongs to a different patch...

@@ +332,5 @@
> +    if (MozLoopService.userProfile && MozLoopService.userProfile.email) {
> +      displayName = MozLoopService.userProfile.email;
> +    } else {
> +      let stringBundle =
> +        Services.strings.createBundle('chrome://browser/locale/loop/loop.properties');

Can you make this a global lazyGetter called 'gLoopBundle'? Oh, and double quotes are the preferred taste around these parts ;)

::: browser/components/loop/test/xpcshell/test_looprooms.js
@@ +340,5 @@
> +add_task(function* test_joinRoomGuest() {
> +  // We need these set up for getting the email address.
> +  let roomToken = "_nxD4V4FflQ";
> +  let joinedData = yield LoopRooms.promise("join", roomToken);
> +  Assert.equal(joinedData.action, "join");

We also forgot to do `clearUserPref` for the test below... can you add that, please?
Attachment #8525379 - Flags: review?(mdeboer) → review+
This is a tidied up patch of what I worked on with Mike earlier. Just have to finish fixing up the unit tests.
What branches does this affect?
Flags: needinfo?(standard8)
This was introduced with the new Rooms code.  We will want to uplift this to Fx35, but Beta (Fx34) is unaffected.
Flags: needinfo?(standard8)
[Tracking Requested - why for this release]: needed for Firefox Hello 35
backlog: --- → Fx35?
(In reply to Mike de Boer [:mikedeboer] from comment #2)
> >  Cu.import("resource://gre/modules/XPCOMUtils.jsm");
> > +Cu.import("resource://gre/modules/Services.jsm");
> 
> I *think* this belongs to a different patch...

I'm landing this one first, and we need it for the Services.strings part addition ;-)
Attachment #8525379 - Attachment description: Fix joining a room in guest mode → [checked in] Fix joining a room in guest mode
Comment on attachment 8525607 [details] [diff] [review]
Guest mode doesn't work for rooms on a fresh profile - handle late guest registration, and keep track of when rooms are created to know if to automatically register or not.

r=me on the interdiff
Attachment #8525607 - Flags: review?(MattN+bmo) → review+
Comment on attachment 8525607 [details] [diff] [review]
Guest mode doesn't work for rooms on a fresh profile - handle late guest registration, and keep track of when rooms are created to know if to automatically register or not.

Review of attachment 8525607 [details] [diff] [review]:
-----------------------------------------------------------------

\o/
Try run might be wise, before we land this ;)
Pushed:

https://hg.mozilla.org/integration/fx-team/rev/ef7bfca8a59f

Maire & Randell are going to watch this.
Priority: -- → P1
backlog: Fx35? → Fx35+
Iteration: --- → 36.3
Keywords: leave-open
Target Milestone: --- → mozilla36
https://hg.mozilla.org/mozilla-central/rev/ef7bfca8a59f
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment on attachment 8525379 [details] [diff] [review]
[checked in] Fix joining a room in guest mode

Approval Request Comment
[Feature/regressing bug #]: N/A
Mus-have fix for Rooms code for 35
[Describe test coverage new/current, TBPL]: on m-c, tested manually
[Risks and why]: low risk
[String/UUID change made/needed]: none
Attachment #8525379 - Flags: approval-mozilla-aurora?
Comment on attachment 8525607 [details] [diff] [review]
Guest mode doesn't work for rooms on a fresh profile - handle late guest registration, and keep track of when rooms are created to know if to automatically register or not.

Approval Request Comment
[Feature/regressing bug #]: N/A
Mus-have fix for Rooms code for 35
[Describe test coverage new/current, TBPL]: on m-c, tested manually
[Risks and why]: low risk
[String/UUID change made/needed]: none
Attachment #8525607 - Flags: approval-mozilla-aurora?
Attachment #8525379 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8525607 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Flags: qe-verify+
Flags: in-moztrap?
Verified fixed 36.0a2 (2014-12-17), 35b4 Win 7
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.