[RLVa] f9f8dbe23ec3 ported

- internal : reviewed @startim for CHUI (SL-3.5)
    -> fixed : "Start Conference Chat" on a selection of multiple calling cards opens an IM session
    -> fixed : actions that would result in an IM window opening shouldn't be blocked if the session is already open
    -> added : RlvActions class to mimick LLAvatarActions and lowering the rlvhandler.h include dependency
This commit is contained in:
Inusaito Sayori
2014-01-27 13:54:13 -05:00
parent 42bf70849c
commit 6a3ee5fac4
11 changed files with 150 additions and 47 deletions

View File

@@ -49,6 +49,10 @@
#include "lltrans.h"
#include "llvoavatarself.h"
#include "llnotifications.h"
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
#include "rlvactions.h"
#include "rlvcommon.h"
// [/RLVa:KB]
extern LLUUID gAgentID;
@@ -455,6 +459,10 @@ class LLBeginIMSession : public inventory_panel_listener_t
LLDynamicArray<LLUUID> members;
EInstantMessage type = IM_SESSION_CONFERENCE_START;
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
bool fRlvCanStartIM = true;
// [/RLVa:KB]
for (std::set<LLUUID>::const_iterator iter = selected_items.begin(); iter != selected_items.end(); iter++)
{
@@ -493,6 +501,9 @@ class LLBeginIMSession : public inventory_panel_listener_t
id = item_array.get(i)->getCreatorUUID();
if(at.isBuddyOnline(id))
{
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
fRlvCanStartIM &= RlvActions::canStartIM(id);
// [RLVa:KB]
members.put(id);
}
}
@@ -515,6 +526,9 @@ class LLBeginIMSession : public inventory_panel_listener_t
if(at.isBuddyOnline(id))
{
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
fRlvCanStartIM &= RlvActions::canStartIM(id);
// [RLVa:KB]
members.put(id);
}
}
@@ -526,6 +540,15 @@ class LLBeginIMSession : public inventory_panel_listener_t
// the session_id is randomly generated UUID which will be replaced later
// with a server side generated number
// [RLVa:KB] - Checked: 2013-05-08 (RLVa-1.4.9)
if (!fRlvCanStartIM)
{
make_ui_sound("UISndIvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTCONF);
return true;
}
// [/RLVa:KB]
if (name.empty())
{
name = llformat("Session %d", session_num++);