implement list of contacts and CRUD contacts API route
Change-Id: I749d25c8b1ef6205e5d888bb517c43233bc9215b
diff --git a/JamiDaemon.js b/JamiDaemon.js
index f25f743..7f92f38 100755
--- a/JamiDaemon.js
+++ b/JamiDaemon.js
@@ -251,6 +251,11 @@
JamiDaemon.mapToJs(this.dring.getAccountDetails(accountId)),
JamiDaemon.mapToJs(this.dring.getVolatileAccountDetails(accountId))
)
+
+ account.contacts = JamiDaemon.vectMapToJs(
+ this.dring.getContacts(accountId)
+ );
+
JamiDaemon.vectToJs(this.dring.getConversations(accountId)).forEach(conversationId => {
const members = JamiDaemon.vectMapToJs(this.dring.getConversationMembers(accountId, conversationId))
members.forEach(member => {
@@ -399,6 +404,20 @@
return details
}
+ removeContact(accountId, contactId){
+ //bool ban false
+ this.dring.removeContact(accountId, contactId, false);
+ }
+
+ blockContact(accountId, contactId){
+ //bool ban true
+ this.dring.removeContact(accountId, contactId, true);
+ }
+
+ getContactDetails(accountId, contactId){
+ return JamiDaemon.mapToJs(this.dring.getContactDetails(accountId, contactId))
+ }
+
getDefaultModerators(accountId) {
const account = this.getAccount(accountId)
if (!account) {