diff options
Merge branch 'master' into presence-refactor
This was a large, heavily conflicted merge and things MAY have got broken.
Please check!
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/InstantMessage')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index e48b078..fdfcd10 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs | |||
@@ -172,24 +172,27 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
172 | 172 | ||
173 | private void RetrieveInstantMessages(IClientAPI client) | 173 | private void RetrieveInstantMessages(IClientAPI client) |
174 | { | 174 | { |
175 | m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); | 175 | if (m_RestURL != "") |
176 | { | ||
177 | m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); | ||
176 | 178 | ||
177 | List<GridInstantMessage>msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>( | 179 | List<GridInstantMessage> msglist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridInstantMessage>>( |
178 | "POST", m_RestURL+"/RetrieveMessages/", client.AgentId); | 180 | "POST", m_RestURL + "/RetrieveMessages/", client.AgentId); |
179 | 181 | ||
180 | foreach (GridInstantMessage im in msglist) | 182 | foreach (GridInstantMessage im in msglist) |
181 | { | 183 | { |
182 | // client.SendInstantMessage(im); | 184 | // client.SendInstantMessage(im); |
183 | 185 | ||
184 | // Send through scene event manager so all modules get a chance | 186 | // Send through scene event manager so all modules get a chance |
185 | // to look at this message before it gets delivered. | 187 | // to look at this message before it gets delivered. |
186 | // | 188 | // |
187 | // Needed for proper state management for stored group | 189 | // Needed for proper state management for stored group |
188 | // invitations | 190 | // invitations |
189 | // | 191 | // |
190 | Scene s = FindScene(client.AgentId); | 192 | Scene s = FindScene(client.AgentId); |
191 | if (s != null) | 193 | if (s != null) |
192 | s.EventManager.TriggerIncomingInstantMessage(im); | 194 | s.EventManager.TriggerIncomingInstantMessage(im); |
195 | } | ||
193 | } | 196 | } |
194 | } | 197 | } |
195 | 198 | ||