Closed andhikayuana closed 7 years ago
Merging #23 into develop will not change coverage. The diff coverage is
0%
.
@@ Coverage Diff @@
## develop #23 +/- ##
======================================
Coverage 0% 0%
======================================
Files 119 119
Lines 9425 9454 +29
Branches 972 978 +6
======================================
- Misses 9425 9454 +29
Impacted Files | Coverage Δ | |
---|---|---|
...ain/java/com/qiscus/sdk/data/remote/QiscusApi.java | 0% <0%> (ø) |
:arrow_up: |
...va/com/qiscus/sdk/data/remote/QiscusApiParser.java | 0% <0%> (ø) |
:arrow_up: |
...om/qiscus/sdk/data/local/QiscusDataBaseHelper.java | 0% <0%> (ø) |
:arrow_up: |
...va/com/qiscus/sdk/data/remote/QiscusPusherApi.java | 0% <0%> (ø) |
:arrow_up: |
...va/com/qiscus/sdk/data/model/QiscusChatConfig.java | 0% <0%> (ø) |
:arrow_up: |
.../java/com/qiscus/sdk/data/model/QiscusComment.java | 0% <0%> (ø) |
:arrow_up: |
.../main/java/com/qiscus/sdk/data/local/QiscusDb.java | 0% <0%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update fbd7632...c67ac21. Read the comment docs.
using extras :
import com.qiscus.sdk.Qiscus;
import org.json.JSONException;
import org.json.JSONObject;
/** intercept **/
Qiscus.getChatConfig()
.setCommentSendingInterceptor(qiscusComment -> {
qiscusComment.setExtras(extras());
return qiscusComment;
});
/** generate extras **/
private JSONObject extras() {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("id", 123);
jsonObject.put("name", "yuana");
} catch (JSONException e) {
e.printStackTrace();
}
return jsonObject;
}
you can intercept comment before send to server like this :