aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-10-28 23:10:54 +0200
committerMelanie2011-10-28 23:10:54 +0200
commit175d74e68c72be653f6c05241e3400168f7297a9 (patch)
tree69673fd72204fd48274beb37e215a1e95db8cba2 /OpenSim/Region
parentReduce severity and remove duplication if a common log message regarding (diff)
downloadopensim-SC_OLD-175d74e68c72be653f6c05241e3400168f7297a9.zip
opensim-SC_OLD-175d74e68c72be653f6c05241e3400168f7297a9.tar.gz
opensim-SC_OLD-175d74e68c72be653f6c05241e3400168f7297a9.tar.bz2
opensim-SC_OLD-175d74e68c72be653f6c05241e3400168f7297a9.tar.xz
Fix the offline message module to revert core changes and restore avn
specific behavior
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs46
1 files changed, 28 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
index 3373bd5..5ab604f 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs
@@ -208,26 +208,36 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
208 208
209 private void UndeliveredMessage(GridInstantMessage im) 209 private void UndeliveredMessage(GridInstantMessage im)
210 { 210 {
211 if ((im.offline != 0) 211 if (im.dialog != (byte)InstantMessageDialog.MessageFromObject &&
212 && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) 212 im.dialog != (byte)InstantMessageDialog.MessageFromAgent &&
213 im.dialog != (byte)InstantMessageDialog.GroupNotice &&
214 im.dialog != (byte)InstantMessageDialog.GroupInvitation &&
215 im.dialog != (byte)InstantMessageDialog.InventoryOffered)
213 { 216 {
214 bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( 217 return;
215 "POST", m_RestURL + "/SaveMessage/", im); 218 }
216 219
217 if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) 220 Scene scene = FindScene(new UUID(im.fromAgentID));
218 { 221 if (scene == null)
219 IClientAPI client = FindClient(new UUID(im.fromAgentID)); 222 scene = m_SceneList[0];
220 if (client == null) 223
221 return; 224 bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>(
222 225 "POST", m_RestURL+"/SaveMessage/?scope=" +
223 client.SendInstantMessage(new GridInstantMessage( 226 scene.RegionInfo.ScopeID.ToString(), im);
224 null, new UUID(im.toAgentID), 227
225 "System", new UUID(im.fromAgentID), 228 if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent)
226 (byte)InstantMessageDialog.MessageFromAgent, 229 {
227 "User is not logged in. " + 230 IClientAPI client = FindClient(new UUID(im.fromAgentID));
228 (success ? "Message saved." : "Message not saved"), 231 if (client == null)
229 false, new Vector3())); 232 return;
230 } 233
234 client.SendInstantMessage(new GridInstantMessage(
235 null, new UUID(im.toAgentID),
236 "System", new UUID(im.fromAgentID),
237 (byte)InstantMessageDialog.MessageFromAgent,
238 "User is not logged in. "+
239 (success ? "Message saved." : "Message not saved"),
240 false, new Vector3()));
231 } 241 }
232 } 242 }
233 } 243 }