mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
Activate the new Offline IM module code instead of the old code
As most have gone to OfflineMessaging V2, this change will not affect existing users but will benefit future grids.
This commit is contained in:
@@ -248,22 +248,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
if (scene == null)
|
||||
scene = m_SceneList[0];
|
||||
|
||||
// Avination new code
|
||||
// SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>(
|
||||
// "POST", m_RestURL+"/SaveMessage/?scope=" +
|
||||
// scene.RegionInfo.ScopeID.ToString(), im);
|
||||
|
||||
// current opensim and osgrid compatible
|
||||
bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
|
||||
"POST", m_RestURL+"/SaveMessage/", im, 10000);
|
||||
// current opensim and osgrid compatible end
|
||||
SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>(
|
||||
"POST", m_RestURL+"/SaveMessage/?scope=" +
|
||||
scene.RegionInfo.ScopeID.ToString(), im);
|
||||
|
||||
if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
|
||||
{
|
||||
IClientAPI client = FindClient(new UUID(im.fromAgentID));
|
||||
if (client == null)
|
||||
return;
|
||||
/* Avination new code
|
||||
|
||||
if (reply.Message == String.Empty)
|
||||
reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved");
|
||||
|
||||
@@ -296,16 +290,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
reply.Message,
|
||||
false, new Vector3()));
|
||||
}
|
||||
*/
|
||||
// current opensim and osgrid compatible
|
||||
client.SendInstantMessage(new GridInstantMessage(
|
||||
null, new UUID(im.toAgentID),
|
||||
"System", new UUID(im.fromAgentID),
|
||||
(byte)InstantMessageDialog.MessageFromAgent,
|
||||
"User is not logged in. "+
|
||||
(success ? "Message saved." : "Message not saved"),
|
||||
false, new Vector3()));
|
||||
// current opensim and osgrid compatible end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user