----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/15420/ -----------------------------------------------------------
Review request for shindig. Bugs: SHINDIG-1951 https://issues.apache.org/jira/browse/SHINDIG-1951 Repository: shindig Description ------- Change API of MessageService#createMessage() to return the id of the message (as defined in http://opensocial.github.io/spec/2.5.1/Social-API-Server.xml#rfc.section.2.7.2), and implement this behavior in JsonDbOpensocialService. While there fix two bugs inside JsonDbOpensocialService#createMessage(): * enforce a message id to be defined on the message * properly access the message collection (matching the structures used in #getMessage() and canonicaldb.json) Diffs ----- trunk/java/social-api/src/main/java/org/apache/shindig/social/opensocial/spi/MessageService.java 1540645 trunk/java/social-api/src/main/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialService.java 1540645 trunk/java/social-api/src/test/java/org/apache/shindig/social/opensocial/service/MessageHandlerTest.java 1540645 trunk/java/social-api/src/test/java/org/apache/shindig/social/sample/spi/JsonDbOpensocialServiceTest.java 1540645 Diff: https://reviews.apache.org/r/15420/diff/ Testing ------- * Unit test * Curl usage: 1. curl -D - -X POST -H Content-Type:application/json --data-binary '{recipients:["jane.doe"],title:"Message",body:"Body",type:"email"}' http://localhost:8080/social/rest/messages/john.doe/publicMessage 2. curl -D - -X GET -H Content-type:application/json http://localhost:8080/social/rest/messages/jane.doe/publicMessage/(returned id from step 1) Thanks, Andreas Kohn