|
@@ -102,6 +102,8 @@ namespace OpenSim.OfflineIM
|
|
|
return HandleGet(request);
|
|
|
case "STORE":
|
|
|
return HandleStore(request);
|
|
|
+ case "DELETE":
|
|
|
+ return HandleDelete(request);
|
|
|
}
|
|
|
m_log.DebugFormat("[OFFLINE IM HANDLER]: unknown method request: {0}", method);
|
|
|
}
|
|
@@ -158,6 +160,21 @@ namespace OpenSim.OfflineIM
|
|
|
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
|
|
|
}
|
|
|
|
|
|
+ byte[] HandleDelete(Dictionary<string, object> request)
|
|
|
+ {
|
|
|
+ if (!request.ContainsKey("UserID"))
|
|
|
+ {
|
|
|
+ return FailureResult();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ UUID userID = new UUID(request["UserID"].ToString());
|
|
|
+ m_OfflineIMService.DeleteMessages(userID);
|
|
|
+
|
|
|
+ return SuccessResult();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
#region Helpers
|
|
|
|
|
|
private void NullResult(Dictionary<string, object> result, string reason)
|