respoke / respoke-sdk-android

Respoke SDK for Android
MIT License
53 stars 15 forks source link

Add group message history support #7

Closed chadxz closed 8 years ago

chadxz commented 8 years ago

This patch adds support for interacting with the Respoke group message history APIs and flagging a message to be persisted to history.

A new method join() has also been added to RespokeGroup to allow it to be joined when it is not currently joined. This was needed because when retrieving group message history prior to joining that group, there is no group in the client's group cache to associate the message with. When creating the group, it did not make sense to automatically subscribe the user to the group, so the group is created and added to the cache without subscribing to it in Respoke.

A new isJoined parameter has been added to the RespokeGroup constructor, and an overloaded version omitting the parameter has been put in place to maintain backward compability with the old API.

A new persist parameter has been added to RespokeEndpoint.sendMessage. This parameter allows a message to be flagged for inclusion in the message history for the group. At this time, this flag is only effective if the account being used to connect to Respoke has had the message history feature enabled. Respoke message history is currently an alpha quality feature.

Two new methods have been added to RespokeClient to allow retrieval of group message history.

chadxz commented 8 years ago

Ping @leedm777 @kenhunt @amattsmith @erinspice @samuelg @mbrooks @ruffrey @matt-jordan pls to review

chadxz commented 8 years ago

@samuelg thanks for your feedback, I think I addressed everything

samuelg commented 8 years ago

Looks good!