summaryrefslogtreecommitdiff
path: root/indra/newview/llimprocessing.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2020-06-15 15:29:04 -0400
committerOz Linden <oz@lindenlab.com>2020-06-15 15:29:04 -0400
commit86009f885efc796850d3e5b612c896a9d737fb86 (patch)
tree404923800dbc6d09ea72b10de0c7f4bb103d1e62 /indra/newview/llimprocessing.cpp
parent17598f936bb6b099f21fc32aa80b68258cdfd0b9 (diff)
parent1702a65665879d0c68df4c6b4fdb60f815ab7abb (diff)
SL-10297: merge up to master at 6.4.3
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r--indra/newview/llimprocessing.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index e3705e82b9..6da7bbe263 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -29,6 +29,7 @@
#include "llimprocessing.h"
#include "llagent.h"
+#include "llappviewer.h"
#include "llavatarnamecache.h"
#include "llfirstuse.h"
#include "llfloaterreg.h"
@@ -61,6 +62,8 @@
#pragma warning (disable:4702)
#endif
+extern void on_new_message(const LLSD& msg);
+
// Strip out "Resident" for display, but only if the message came from a user
// (rather than a script)
static std::string clean_name_from_im(const std::string& name, EInstantMessage type)
@@ -1027,6 +1030,14 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args);
+ if (message != "")
+ {
+ LLSD msg_notify;
+ msg_notify["session_id"] = LLUUID();
+ msg_notify["from_id"] = chat.mFromID;
+ msg_notify["source_type"] = chat.mSourceType;
+ on_new_message(msg_notify);
+ }
}
@@ -1474,6 +1485,7 @@ void LLIMProcessing::requestOfflineMessages()
static BOOL requested = FALSE;
if (!requested
&& gMessageSystem
+ && !gDisconnected
&& LLMuteList::getInstance()->isLoaded()
&& isAgentAvatarValid()
&& gAgent.getRegion()
@@ -1557,11 +1569,17 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
return;
}
+ if (gAgent.getRegion() == NULL)
+ {
+ LL_WARNS("Messaging") << "Region null while attempting to load messages." << LL_ENDL;
+ return;
+ }
+
LL_INFOS("Messaging") << "Processing offline messages." << LL_ENDL;
std::vector<U8> data;
S32 binary_bucket_size = 0;
- LLHost sender = gAgent.getRegion()->getHost();
+ LLHost sender = gAgent.getRegionHost();
LLSD::array_iterator i = messages.beginArray();
LLSD::array_iterator iEnd = messages.endArray();