diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index ac89f52..369d480 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -248,16 +248,22 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
248 | if (scene == null) | 248 | if (scene == null) |
249 | scene = m_SceneList[0]; | 249 | scene = m_SceneList[0]; |
250 | 250 | ||
251 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( | 251 | // Avination new code |
252 | "POST", m_RestURL+"/SaveMessage/?scope=" + | 252 | // SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
253 | scene.RegionInfo.ScopeID.ToString(), im); | 253 | // "POST", m_RestURL+"/SaveMessage/?scope=" + |
254 | // scene.RegionInfo.ScopeID.ToString(), im); | ||
255 | |||
256 | // current opensim and osgrid compatible | ||
257 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | ||
258 | "POST", m_RestURL+"/SaveMessage/", im, 10000); | ||
259 | // current opensim and osgrid compatible end | ||
254 | 260 | ||
255 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 261 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) |
256 | { | 262 | { |
257 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 263 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); |
258 | if (client == null) | 264 | if (client == null) |
259 | return; | 265 | return; |
260 | 266 | /* Avination new code | |
261 | if (reply.Message == String.Empty) | 267 | if (reply.Message == String.Empty) |
262 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); | 268 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
263 | 269 | ||
@@ -290,6 +296,16 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
290 | reply.Message, | 296 | reply.Message, |
291 | false, new Vector3())); | 297 | false, new Vector3())); |
292 | } | 298 | } |
299 | */ | ||
300 | // current opensim and osgrid compatible | ||
301 | client.SendInstantMessage(new GridInstantMessage( | ||
302 | null, new UUID(im.toAgentID), | ||
303 | "System", new UUID(im.fromAgentID), | ||
304 | (byte)InstantMessageDialog.MessageFromAgent, | ||
305 | "User is not logged in. "+ | ||
306 | (success ? "Message saved." : "Message not saved"), | ||
307 | false, new Vector3())); | ||
308 | // current opensim and osgrid compatible end | ||
293 | } | 309 | } |
294 | } | 310 | } |
295 | } | 311 | } |