Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sf-nathan-park committed Aug 16, 2019
1 parent dc4e9b2 commit 9fa379a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ You can set global options for operational configurations. Here is the list of t
| Option | Type | Description |
| :------------------------------- | :------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| messageCollectionCapacity | Integer | Limit the number of messages in a collection. If set, collection holds that number of messages in memory and invokes `remove` event for the messages trimmed out. (default: 1,000, minimum: 200) |
| messageResendPolicy | MessageResendPolicy | The policy to resend messages that failed to be sent. 1) `'NONE'` does not save failed messages into cache and just removes the failed message from view. 2) `'MANUAL'` saves failed messages into cache but doesn't resend them automatically. 3) `'AUTOMATIC'` saves failed messages and also resend them when sync resumes or the failed messages are fetched from cache. (default: `'NONE'`) |
| messageResendPolicy | MessageResendPolicy | The policy to resend messages that failed to be sent. 1) `NONE` does not save failed messages into cache and just removes the failed message from view. 2) `MANUAL` saves failed messages into cache but doesn't resend them automatically. 3) `AUTOMATIC` saves failed messages and also resend them when sync resumes or the failed messages are fetched from cache. (default: `NONE`) |
| automaticMessageResendRetryCount | Integer | Set the retry count of automatic resend. Once the number of failures in resending message reaches to it, the message remains as failed message and not going to get resent again. Only available when `messageResentPolicy` is set to `AUTOMATIC`. (default: `SendBirdSyncManager.Options.INFINITE`) |
| maxFailedMessageCountPerChannel | Integer | Set the maximum number of failed messages allowed in a channel. If the number of failed messages exceeds the count, the oldest failed message would get trimmed out. (default: `SendBirdSyncManager.Options.INFINITE`) |
| failedMessageRetentionDays | Integer | Set the number of days to retain failed messages. Failed messages which pass the retention period since its creation will be removed automatically. (default: `7`) |
Expand Down Expand Up @@ -185,8 +185,8 @@ Regarding on sending a message, `MessageCollection` manages it along with the re

| State | Description |
| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PENDING | The message returned by calling `sendUserMessage()` or `sendFileMessage()`. This message is waiting for the response to fix the final state of the message - `'failed'` or `'succeeded'`. Pending message is not stored in cache. |
| FAILED | The message failed to be sent and fallen to the callback with error. It would be sent again automatically if the `MessageResendPolicy` is set to `'AUTOMATIC'`. Otherwise, you can send it again via `resendUserMessage()` in SendBird SDK manually. |
| PENDING | The message returned by calling `sendUserMessage()` or `sendFileMessage()`. This message is waiting for the response to fix the final state of the message - `FAILED` or `SUCCEEDED`. Pending message is not stored in cache. |
| FAILED | The message failed to be sent and fallen to the callback with error. It would be sent again automatically if the `MessageResendPolicy` is set to `AUTOMATIC`. Otherwise, you can send it again via `resendUserMessage()` in SendBird SDK manually. |
| SUCCEEDED | The message successfully sent. |

> Note: If `sendUserMessage()` fails due to invalid parameter, it doesn't yield a failed message but `null` instead, which means it'd not be queued for automatic resend.
Expand Down Expand Up @@ -230,6 +230,7 @@ MessageCollectionHandler messageCollectionHandler = new MessageCollectionHandler
break;
}
}

@Override
public void onNewMessage(MessageCollection collection, BaseMessage message) {
}
Expand Down

0 comments on commit 9fa379a

Please sign in to comment.