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, 4 insertions, 20 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index d1f6054..297346a 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -248,22 +248,16 @@ 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 | // Avination new code | 251 | SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( |
252 | // SendReply reply = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, SendReply>( | 252 | "POST", m_RestURL+"/SaveMessage/?scope=" + |
253 | // "POST", m_RestURL+"/SaveMessage/?scope=" + | 253 | scene.RegionInfo.ScopeID.ToString(), im); |
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 | ||
260 | 254 | ||
261 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 255 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) |
262 | { | 256 | { |
263 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 257 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); |
264 | if (client == null) | 258 | if (client == null) |
265 | return; | 259 | return; |
266 | /* Avination new code | 260 | |
267 | if (reply.Message == String.Empty) | 261 | if (reply.Message == String.Empty) |
268 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); | 262 | reply.Message = "User is not logged in. " + (reply.Success ? "Message saved." : "Message not saved"); |
269 | 263 | ||
@@ -296,16 +290,6 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
296 | reply.Message, | 290 | reply.Message, |
297 | false, new Vector3())); | 291 | false, new Vector3())); |
298 | } | 292 | } |
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 | ||
309 | } | 293 | } |
310 | } | 294 | } |
311 | } | 295 | } |