diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 8d055d4..de25048 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -201,26 +201,42 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
201 | 201 | ||
202 | private void UndeliveredMessage(GridInstantMessage im) | 202 | private void UndeliveredMessage(GridInstantMessage im) |
203 | { | 203 | { |
204 | if ((im.offline != 0) | 204 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && |
205 | && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) | 205 | im.dialog != (byte)InstantMessageDialog.MessageFromAgent && |
206 | im.dialog != (byte)InstantMessageDialog.GroupNotice && | ||
207 | im.dialog != (byte)InstantMessageDialog.GroupInvitation && | ||
208 | im.dialog != (byte)InstantMessageDialog.InventoryOffered) | ||
206 | { | 209 | { |
207 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( | 210 | return; |
208 | "POST", m_RestURL+"/SaveMessage/", im); | 211 | } |
209 | 212 | ||
210 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | 213 | if (!m_ForwardOfflineGroupMessages) |
211 | { | 214 | { |
212 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | 215 | if (im.dialog == (byte)InstantMessageDialog.GroupNotice || |
213 | if (client == null) | 216 | im.dialog != (byte)InstantMessageDialog.GroupInvitation) |
214 | return; | 217 | return; |
215 | 218 | } | |
216 | client.SendInstantMessage(new GridInstantMessage( | 219 | |
217 | null, new UUID(im.toAgentID), | 220 | Scene scene = FindScene(new UUID(im.fromAgentID)); |
218 | "System", new UUID(im.fromAgentID), | 221 | if (scene == null) |
219 | (byte)InstantMessageDialog.MessageFromAgent, | 222 | scene = m_SceneList[0]; |
220 | "User is not logged in. "+ | 223 | |
221 | (success ? "Message saved." : "Message not saved"), | 224 | bool success = SynchronousRestObjectRequester.MakeRequest<GridInstantMessage, bool>( |
222 | false, new Vector3())); | 225 | "POST", m_RestURL+"/SaveMessage/", im); |
223 | } | 226 | |
227 | if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) | ||
228 | { | ||
229 | IClientAPI client = FindClient(new UUID(im.fromAgentID)); | ||
230 | if (client == null) | ||
231 | return; | ||
232 | |||
233 | client.SendInstantMessage(new GridInstantMessage( | ||
234 | null, new UUID(im.toAgentID), | ||
235 | "System", new UUID(im.fromAgentID), | ||
236 | (byte)InstantMessageDialog.MessageFromAgent, | ||
237 | "User is not logged in. "+ | ||
238 | (success ? "Message saved." : "Message not saved"), | ||
239 | false, new Vector3())); | ||
224 | } | 240 | } |
225 | } | 241 | } |
226 | } | 242 | } |