Fix the missing group bug AND make Voice Chat Invite better

This commit is contained in:
Lirusaito
2019-03-27 19:24:42 -04:00
parent 5272c48b7a
commit aac8382cf0
2 changed files with 8 additions and 33 deletions

View File

@@ -50,6 +50,7 @@
#include "llavatarnamecache.h" #include "llavatarnamecache.h"
#include "llfloaterchat.h" #include "llfloaterchat.h"
#include "llfloaterchatterbox.h" #include "llfloaterchatterbox.h"
#include "llgroupactions.h"
#include "llimpanel.h" #include "llimpanel.h"
#include "llmutelist.h" #include "llmutelist.h"
#include "llspeakers.h" #include "llspeakers.h"
@@ -792,43 +793,19 @@ void LLIMMgr::inviteToSession(
if ( !mPendingInvitations.has(session_id.asString()) ) if ( !mPendingInvitations.has(session_id.asString()) )
{ {
if (caller_name.empty()) LLSD args;
{ args["NAME"] = LLAvatarActions::getSLURL(caller_id);
gCacheName->get(caller_id, true, // voice args["GROUP"] = LLGroupActions::getSLURL(session_id);
boost::bind(&LLIMMgr::onInviteNameLookup, _1, _2, _3, payload));
}
else
{
LLSD args;
args["NAME"] = caller_name;
args["GROUP"] = session_name;
LLNotifications::instance().add(notify_box_type, LLNotifications::instance().add(notify_box_type,
args, args,
payload, payload,
&inviteUserResponse); &inviteUserResponse);
}
mPendingInvitations[session_id.asString()] = LLSD(); mPendingInvitations[session_id.asString()] = LLSD();
} }
} }
//static
void LLIMMgr::onInviteNameLookup(const LLUUID& id, const std::string& full_name, bool is_group, LLSD payload)
{
payload["caller_name"] = full_name;
payload["session_name"] = full_name;
LLSD args;
args["NAME"] = full_name;
LLNotifications::instance().add(
payload["notify_box_type"].asString(),
args,
payload,
&inviteUserResponse);
}
void LLIMMgr::setFloaterOpen(BOOL set_open) void LLIMMgr::setFloaterOpen(BOOL set_open)
{ {
if (set_open) if (set_open)

View File

@@ -211,8 +211,6 @@ private:
void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
static void onInviteNameLookup(const LLUUID& id, const std::string& full_name, bool is_group, LLSD payload);
private: private:
std::set<LLHandle<LLFloater> > mFloaters; std::set<LLHandle<LLFloater> > mFloaters;