diff --git a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs
index e19c23dfdf..c1f23afce4 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;
}
diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
index d1739cfc11..09c5354467 100644
--- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs
+++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs
@@ -118,6 +118,7 @@ namespace OpenSim.Services.HypergridService
return;
}
+ m_messageKey = cnf.GetString("MessageKey", String.Empty);
m_ForwardOfflineGroupMessages = cnf.GetBoolean("ForwardOfflineGroupMessages", false);
if (m_InGatekeeper)
@@ -282,7 +283,7 @@ namespace OpenSim.Services.HypergridService
if (reginfo != null)
{
- imresult = InstantMessageServiceConnector.SendInstantMessage(reginfo.ServerURI, im);
+ imresult = InstantMessageServiceConnector.SendInstantMessage(reginfo.ServerURI, im, m_messageKey);
}
else
{
@@ -373,4 +374,4 @@ namespace OpenSim.Services.HypergridService
return m_OfflineIMService.StoreMessage(im, out reason);
}
}
-}
\ No newline at end of file
+}