message.delete();
}
public static void edit(Long id, JsonObject body) {
User current = getCurrentUser();
InboxMessage message = InboxMessage.getReceived(id, current);
//Message msgJSON = gson().fromJson(body, Message.class);
if(message==null) notFound();
//if(message.id != msgJSON.id) notFound();
//if(message.to.id.longValue() != current.id.longValue()) forbidden();
// Copy updateable properties from the JSON object to the original.
message.readed = body.get("readed").getAsBoolean();
message.update();
response.status = StatusCode.OK;
Map map = new HashMap();
map.put("id", message.id);
String url = Router.reverse("api.Subscribers.get", map).url;// GET /clients/1541
response.setHeader("location", url);