@ -468,6 +468,14 @@ define([
});
sframeChan.on('Q_CONTACTS_REMOVE_FRIEND', function (curvePublic, cb) {
messenger.removeFriend(curvePublic, function (e, info) {
cb({
error: e,
data: info,
sframeChan.on('Q_CONTACTS_OPEN_FRIEND_CHANNEL', function (curvePublic, cb) {
messenger.openFriendChannel(curvePublic, function (e) {
@ -66,6 +66,11 @@ define([], function () {
//cb({ error: err, data: data, });
};
messenger.removeFriend = function (curvePublic, cb) {
sFrameChan.query('Q_CONTACTS_REMOVE_FRIEND', curvePublic, function (err, data) {
cb(err || data.error, data.data);
messenger.openFriendChannel = function (curvePublic, cb) {
sFrameChan.query('Q_CONTACTS_OPEN_FRIEND_CHANNEL', curvePublic, function (err, data) {
cb(err || data.error);
@ -148,6 +148,7 @@ define({
'Q_CONTACTS_GET_FRIEND_LIST': true,
'Q_CONTACTS_GET_MY_INFO': true,
'Q_CONTACTS_GET_FRIEND_INFO': true,
'Q_CONTACTS_REMOVE_FRIEND': true,
'Q_CONTACTS_OPEN_FRIEND_CHANNEL': true,
'Q_CONTACTS_GET_STATUS': true,
'Q_CONTACTS_GET_MORE_HISTORY': true,
@ -318,10 +318,10 @@ define([
var removeFriend = function (curvePublic) {
messenger.removeFriend(curvePublic, function (e, removed) {
messenger.removeFriend(curvePublic, function (e /*, removed */) {
if (e) { return void console.error(e); }
find.inList(curvePublic).remove();
console.log(removed);
//console.log(removed);