=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java 2014-10-01 08:39:12 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/MessageConversationController.java 2014-10-01 09:58:24 +0000 @@ -274,14 +274,14 @@ // Mark conversations read //-------------------------------------------------------------------------- - @RequestMapping( value = "/read", method = RequestMethod.PUT, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) + @RequestMapping( value = "/read", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) public @ResponseBody RootNode markMessageConversationsRead( @RequestParam( value = "user", required = false ) String userUid, @RequestBody String[] uids, HttpServletResponse response ) { RootNode responseNode = new RootNode( "response" ); User currentUser = currentUserService.getCurrentUser(); - User user = userUid != null ? userService.getUser( userUid ) : currentUserService.getCurrentUser(); + User user = userUid != null ? userService.getUser( userUid ) : currentUser; if( user == null ) { @@ -325,7 +325,7 @@ // Mark conversations unread //-------------------------------------------------------------------------- - @RequestMapping( value = "/unread", method = RequestMethod.PUT, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) + @RequestMapping( value = "/unread", method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_XML_VALUE } ) public @ResponseBody RootNode markMessageConversationsUnread( @RequestParam( value = "user", required = false ) String userUid, @RequestBody String[] uids, HttpServletResponse response ) { === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js 2014-09-22 13:49:28 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/message.js 2014-10-01 09:58:24 +0000 @@ -24,7 +24,7 @@ $.ajax( { - url: "../../api/messageConversations?" + $.param( { mc: messages }, true ), + url: "../api/messageConversations?" + $.param( { mc: messages }, true ), contentType: "application/json", dataType: "json", type: "DELETE", @@ -53,8 +53,8 @@ $.ajax( { - url: "../../api/messageConversations/read", - type: "PUT", + url: "../api/messageConversations/read", + type: "POST", data: JSON.stringify( messages ), contentType: "application/json", dataType: "json", @@ -78,8 +78,8 @@ $.ajax( { - url: "../../api/messageConversations/unread", - type: "PUT", + url: "../api/messageConversations/unread", + type: "POST", data: JSON.stringify( messages ), contentType: "application/json", dataType: "json",