From eb55f7f2bc3afb2477974e5417e48b8f8ee6cc65 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 6 Oct 2019 23:24:41 +0100 Subject: Introduce a way to send the grid's message kay, if one is used --- .../Connectors/InstantMessage/InstantMessageServiceConnector.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs index e19c23d..c1f23af 100644 --- a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs +++ b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs @@ -50,9 +50,9 @@ namespace OpenSim.Services.Connectors.InstantMessage /// URL we pull the data out of to send the request to /// The Instant Message /// Bool if the message was successfully delivered at the other side. - public static bool SendInstantMessage(string url, GridInstantMessage im) + public static bool SendInstantMessage(string url, GridInstantMessage im, string messageKey) { - Hashtable xmlrpcdata = ConvertGridInstantMessageToXMLRPC(im); + Hashtable xmlrpcdata = ConvertGridInstantMessageToXMLRPC(im, messageKey); xmlrpcdata["region_handle"] = 0; ArrayList SendParams = new ArrayList(); @@ -97,7 +97,7 @@ namespace OpenSim.Services.Connectors.InstantMessage /// /// The GridInstantMessage object /// Hashtable containing the XMLRPC request - protected static Hashtable ConvertGridInstantMessageToXMLRPC(GridInstantMessage msg) + protected static Hashtable ConvertGridInstantMessageToXMLRPC(GridInstantMessage msg, string messageKey) { Hashtable gim = new Hashtable(); gim["from_agent_id"] = msg.fromAgentID.ToString(); @@ -125,6 +125,9 @@ namespace OpenSim.Services.Connectors.InstantMessage gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket, Base64FormattingOptions.None); gim["region_id"] = new UUID(msg.RegionID).ToString(); + if (messageKey != String.Empty) + gim["message_key"] = messageKey; + return gim; } -- cgit v1.1