summaryrefslogtreecommitdiff
path: root/indra/newview/llimprocessing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimprocessing.cpp')
-rw-r--r--indra/newview/llimprocessing.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 491671c46f..e76b3d118e 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -814,10 +814,11 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
LLSD payload;
payload["transaction_id"] = session_id;
- payload["group_id"] = from_id;
+ payload["group_id"] = from_group ? from_id : aux_id;
payload["name"] = name;
payload["message"] = message;
payload["fee"] = membership_fee;
+ payload["use_offline_cap"] = session_id.isNull() && (offline == IM_OFFLINE);
LLSD args;
args["MESSAGE"] = message;
@@ -1459,8 +1460,12 @@ void LLIMProcessing::requestOfflineMessages()
// Auto-accepted inventory items may require the avatar object
// to build a correct name. Likewise, inventory offers from
// muted avatars require the mute list to properly mute.
- if (cap_url.empty())
+ if (cap_url.empty()
+ || gAgent.getRegionCapability("AcceptFriendship").empty()
+ || gAgent.getRegionCapability("AcceptGroupInvite").empty())
{
+ // Offline messages capability provides no session/transaction ids for message AcceptFriendship and IM_GROUP_INVITATION to work
+ // So make sure we have the caps before using it.
requestOfflineMessagesLegacy();
}
else
@@ -1561,7 +1566,7 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url)
message_data["to_agent_id"].asUUID(),
IM_OFFLINE,
(EInstantMessage)message_data["dialog"].asInteger(),
- LLUUID::null, // session id, fix this for friendship offers to work
+ LLUUID::null, // session id, since there is none we can only use frienship/group invite caps
message_data["timestamp"].asInteger(),
message_data["from_agent_name"].asString(),
message_data["message"].asString(),