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.
getGroupHistories allows the user to retrieve history for multiple
groups simultaneously. By default the maximum number of messages is set
to 1, but the maxMessages parameter may be specified to retrieve more
messages from the history for each group specified. When multiple
messages are pulled from the history, the messages are ordered by
timestamp in reverse-chronological order.
getGroupHistory allows the user to retrieve history for a single
group. By default the maximum number of messages is set to 50, but the
maxMessages parameter may be specified to retrieve more messages from
the history. The messages are ordered by timestamp in
reverse-chronological order.
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.
getGroupHistories
allows the user to retrieve history for multiple groups simultaneously. By default the maximum number of messages is set to 1, but themaxMessages
parameter may be specified to retrieve more messages from the history for each group specified. When multiple messages are pulled from the history, the messages are ordered by timestamp in reverse-chronological order.getGroupHistory
allows the user to retrieve history for a single group. By default the maximum number of messages is set to 50, but themaxMessages
parameter may be specified to retrieve more messages from the history. The messages are ordered by timestamp in reverse-chronological order.