|
@@ -102,6 +102,8 @@ namespace OpenSim.OfflineIM
|
|
return HandleGet(request);
|
|
return HandleGet(request);
|
|
case "STORE":
|
|
case "STORE":
|
|
return HandleStore(request);
|
|
return HandleStore(request);
|
|
|
|
+ case "DELETE":
|
|
|
|
+ return HandleDelete(request);
|
|
}
|
|
}
|
|
m_log.DebugFormat("[OFFLINE IM HANDLER]: unknown method request: {0}", method);
|
|
m_log.DebugFormat("[OFFLINE IM HANDLER]: unknown method request: {0}", method);
|
|
}
|
|
}
|
|
@@ -158,6 +160,21 @@ namespace OpenSim.OfflineIM
|
|
return Util.UTF8NoBomEncoding.GetBytes(xmlString);
|
|
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
|
|
#region Helpers
|
|
|
|
|
|
private void NullResult(Dictionary<string, object> result, string reason)
|
|
private void NullResult(Dictionary<string, object> result, string reason)
|