Re: [opensource-dev] Review Request: STORM-1795 Ad-hoc messages are received even when "Only friends and groups can call or IM me"

2012-01-23 Thread Oz Linden

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/536/#review1151
---



indra/newview/llimview.cpp


Couldn't this all be folded into the 'if' without the flag variable as:

if (  !LLMuteList::getInstance()->isMuted(other_participant_id, 
LLMute::flagTextChat)
&& ! (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && 
(LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL))

(that probably won't format well)



- Oz Linden


On Jan. 20, 2012, 11:29 a.m., Jonathan Yap wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/536/
> ---
> 
> (Updated Jan. 20, 2012, 11:29 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Description
> ---
> 
> With avatar A: check on Preferences->Privacy->Only friends and groups can 
> call or IM me
> 
> Get together with:
> Avatar B (not a friend of A)
> Avatar C (a friend of A)
> 
> Using avatar B establish an ad-hoc chat with A and C and write a message
> 
> Observed result: Avatar A and C receive the message
> Expected result: Only avatar C receives the message
> 
> 
> This addresses bug STORM-1795.
> http://jira.secondlife.com/browse/STORM-1795
> 
> 
> Diffs
> -
> 
>   doc/contributions.txt 4982ab91ef6a 
>   indra/newview/llimview.cpp 4982ab91ef6a 
> 
> Diff: http://codereview.secondlife.com/r/536/diff/diff
> 
> 
> Testing
> ---
> 
> See test plan in jira
> 
> 
> Thanks,
> 
> Jonathan Yap
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Review Request: STORM-1795 Ad-hoc messages are received even when "Only friends and groups can call or IM me"

2012-01-23 Thread Jonathan Yap


> On Jan. 23, 2012, 8:52 a.m., Oz Linden wrote:
> > indra/newview/llimview.cpp, lines 2462-2470
> > 
> >
> > Couldn't this all be folded into the 'if' without the flag variable as:
> > 
> > if (  !LLMuteList::getInstance()->isMuted(other_participant_id, 
> > LLMute::flagTextChat)
> > && ! (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && 
> > (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL))
> > 
> > (that probably won't format well)
> >

There are two issues:
1) Clarity of code for future programmers (I think having the flag variable 
helps here)

2) Does your folded-in solution work properly for all 4 cases of VoiceCalls 
true/false and friend/not-friend?  Am I having a dumb moment or does the case 
of VoiceCalls=false and is-friend=false not work properly here (!(false && 
false)) = false, when it should be true?


- Jonathan


---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/536/#review1151
---


On Jan. 20, 2012, 11:29 a.m., Jonathan Yap wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/536/
> ---
> 
> (Updated Jan. 20, 2012, 11:29 a.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Description
> ---
> 
> With avatar A: check on Preferences->Privacy->Only friends and groups can 
> call or IM me
> 
> Get together with:
> Avatar B (not a friend of A)
> Avatar C (a friend of A)
> 
> Using avatar B establish an ad-hoc chat with A and C and write a message
> 
> Observed result: Avatar A and C receive the message
> Expected result: Only avatar C receives the message
> 
> 
> This addresses bug STORM-1795.
> http://jira.secondlife.com/browse/STORM-1795
> 
> 
> Diffs
> -
> 
>   doc/contributions.txt 4982ab91ef6a 
>   indra/newview/llimview.cpp 4982ab91ef6a 
> 
> Diff: http://codereview.secondlife.com/r/536/diff/diff
> 
> 
> Testing
> ---
> 
> See test plan in jira
> 
> 
> Thanks,
> 
> Jonathan Yap
> 
>

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Review Request: STORM-1795 Ad-hoc messages are received even when "Only friends and groups can call or IM me"

2012-01-23 Thread Jonathan Yap

---
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/536/
---

(Updated Jan. 23, 2012, 2:45 p.m.)


Review request for Viewer.


Changes
---

Slight reformatting/logic change.  I think this is a good compromise between my 
too-wordy multi-line if statement and Oz's compact everything into one if 
statement approach.  This is readable and doesn't waste space.


Description
---

With avatar A: check on Preferences->Privacy->Only friends and groups can call 
or IM me

Get together with:
Avatar B (not a friend of A)
Avatar C (a friend of A)

Using avatar B establish an ad-hoc chat with A and C and write a message

Observed result: Avatar A and C receive the message
Expected result: Only avatar C receives the message


This addresses bug STORM-1795.
http://jira.secondlife.com/browse/STORM-1795


Diffs (updated)
-

  doc/contributions.txt 4982ab91ef6a 
  indra/newview/llimview.cpp 4982ab91ef6a 

Diff: http://codereview.secondlife.com/r/536/diff/diff


Testing
---

See test plan in jira


Thanks,

Jonathan Yap

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges