From bf604c85c66dd3bed06e3103cdf210ede02c151f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 24 Jul 2016 15:17:25 +0100 Subject: add missing IM parameter ( needs fix where it is really relevant ) --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 8 ++------ .../CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 7 +++++-- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6dd2ffd..68fe8d9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -953,7 +953,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Send an instant message to this client /// // - // Don't remove transaction ID! Groups and item gives need to set it! public void SendInstantMessage(GridInstantMessage im) { if (((Scene)(m_scene)).Permissions.CanInstantMessage(new UUID(im.fromAgentID), new UUID(im.toAgentID))) @@ -962,14 +961,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP = (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage); msg.AgentData.AgentID = new UUID(im.fromAgentID); - msg.AgentData.SessionID = UUID.Zero; + msg.AgentData.SessionID = new UUID(im.imSessionID); msg.MessageBlock.FromAgentName = Util.StringToBytes256(im.fromAgentName); msg.MessageBlock.Dialog = im.dialog; msg.MessageBlock.FromGroup = im.fromGroup; - if (im.imSessionID == UUID.Zero.Guid) - msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID); - else - msg.MessageBlock.ID = new UUID(im.imSessionID); + msg.MessageBlock.ID = new UUID(im.ID); msg.MessageBlock.Offline = im.offline; msg.MessageBlock.ParentEstateID = im.ParentEstateID; msg.MessageBlock.Position = im.Position; diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 6958905..1366103 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -216,6 +216,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage UUID fromAgentID = UUID.Zero; UUID toAgentID = UUID.Zero; UUID imSessionID = UUID.Zero; + UUID imID = UUID.Zero; uint timestamp = 0; string fromAgentName = ""; string message = ""; @@ -232,7 +233,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage float pos_z = 0; //m_log.Info("Processing IM"); - Hashtable requestData = (Hashtable)request.Params[0]; // Check if it's got all the data if (requestData.ContainsKey("from_agent_id") @@ -263,6 +263,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage UUID.TryParse((string)requestData["to_agent_id"], out toAgentID); UUID.TryParse((string)requestData["im_session_id"], out imSessionID); UUID.TryParse((string)requestData["region_id"], out RegionID); + UUID.TryParse((string)requestData["id"], out imID); try { @@ -390,6 +391,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage gim.ParentEstateID = ParentEstateID; gim.Position = Position; gim.binaryBucket = binaryBucket; + gim.ID = imID.Guid; // Trigger the Instant message in the scene. @@ -508,7 +510,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage UUID toAgentID = new UUID(im.toAgentID); PresenceInfo upd = null; - UUID regionID; bool lookupAgent = false; lock (m_UserRegionMap) @@ -701,6 +702,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage gim["from_agent_session"] = UUID.Zero.ToString(); gim["to_agent_id"] = msg.toAgentID.ToString(); gim["im_session_id"] = msg.imSessionID.ToString(); + if(msg.ID != Guid.Empty) + gim["id"] = msg.ID.ToString(); gim["timestamp"] = msg.timestamp.ToString(); gim["from_agent_name"] = msg.fromAgentName; gim["message"] = msg.message; -- cgit v1.1