Introduce a way to send the grid's message kay, if one is used
parent
22599fbf29
commit
eb55f7f2bc
|
@ -50,9 +50,9 @@ namespace OpenSim.Services.Connectors.InstantMessage
|
|||
/// <param name="url">URL we pull the data out of to send the request to</param>
|
||||
/// <param name="im">The Instant Message </param>
|
||||
/// <returns>Bool if the message was successfully delivered at the other side.</returns>
|
||||
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
|
|||
/// </summary>
|
||||
/// <param name="msg">The GridInstantMessage object</param>
|
||||
/// <returns>Hashtable containing the XMLRPC request</returns>
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue