aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs')
-rw-r--r--OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
index 6158abc..13b0e7e 100644
--- a/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
+++ b/OpenSim/Addons/OfflineIM/Remote/OfflineIMServiceRobustConnector.cs
@@ -102,6 +102,8 @@ namespace OpenSim.OfflineIM
102 return HandleGet(request); 102 return HandleGet(request);
103 case "STORE": 103 case "STORE":
104 return HandleStore(request); 104 return HandleStore(request);
105 case "DELETE":
106 return HandleDelete(request);
105 } 107 }
106 m_log.DebugFormat("[OFFLINE IM HANDLER]: unknown method request: {0}", method); 108 m_log.DebugFormat("[OFFLINE IM HANDLER]: unknown method request: {0}", method);
107 } 109 }
@@ -158,6 +160,21 @@ namespace OpenSim.OfflineIM
158 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 160 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
159 } 161 }
160 162
163 byte[] HandleDelete(Dictionary<string, object> request)
164 {
165 if (!request.ContainsKey("UserID"))
166 {
167 return FailureResult();
168 }
169 else
170 {
171 UUID userID = new UUID(request["UserID"].ToString());
172 m_OfflineIMService.DeleteMessages(userID);
173
174 return SuccessResult();
175 }
176 }
177
161 #region Helpers 178 #region Helpers
162 179
163 private void NullResult(Dictionary<string, object> result, string reason) 180 private void NullResult(Dictionary<string, object> result, string reason)