差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 | 后一修订版 两侧同时换到之后的修订记录 | ||
start:400webimintegration:contact_management [2016/12/06 02:48] liulj [将好友移出黑名单] |
start:400webimintegration:contact_management [2016/12/08 03:21] liulj |
||
---|---|---|---|
行 11: | 行 11: | ||
/** [ | /** [ | ||
{ | { | ||
- | jid:"asemoemo#chatdemoui_test1@easemob.com", | + | jid:'asemoemo#chatdemoui_test1@easemob.com', |
- | name:"test1", | + | name:'test1', |
- | subscription: "both" | + | subscription: 'both' |
} | } | ||
] | ] | ||
行 64: | 行 64: | ||
var addFriends = function () { | var addFriends = function () { | ||
conn.subscribe({ | conn.subscribe({ | ||
- | to: "username", | + | to: 'username', |
// Demo里面接收方没有展现出来这个message,在status字段里面 | // Demo里面接收方没有展现出来这个message,在status字段里面 | ||
- | message: "加个好友呗!" | + | message: '加个好友呗!' |
}); | }); | ||
}; | }; | ||
行 93: | 行 93: | ||
/*同意添加好友操作的实现方法*/ | /*同意添加好友操作的实现方法*/ | ||
conn.subscribed({ | conn.subscribed({ | ||
- | to: "username", | + | to: 'username', |
- | message : "[resp:true]" | + | message : '[resp:true]' |
}); | }); | ||
conn.subscribe({//需要反向添加对方好友 | conn.subscribe({//需要反向添加对方好友 | ||
to: e.from, | to: e.from, | ||
- | message : "[resp:true]" | + | message : '[resp:true]' |
}); | }); | ||
} | } | ||
行 122: | 行 122: | ||
/*拒绝添加好友的方法处理*/ | /*拒绝添加好友的方法处理*/ | ||
conn.unsubscribed({ | conn.unsubscribed({ | ||
- | to: "username", | + | to: 'username', |
- | message : "rejectAddFriend" | + | message : 'rejectAddFriend' |
}); | }); | ||
} | } | ||
行 186: | 行 186: | ||
// user_1 | // user_1 | ||
asdfghj: { | asdfghj: { | ||
- | jid: "easemob-demo#chatdemoui_asdfghj@easemob.com", | + | jid: 'easemob-demo#chatdemoui_asdfghj@easemob.com', |
- | name: "asdfghj", | + | name: 'asdfghj', |
subscription: 'both', | subscription: 'both', | ||
order: 2, | order: 2, | ||
行 194: | 行 194: | ||
// user_2 | // user_2 | ||
wjy6: { | wjy6: { | ||
- | jid: "easemob-demo#chatdemoui_wjy6@easemob.com", | + | jid: 'easemob-demo#chatdemoui_wjy6@easemob.com', |
- | name: "wjy6", | + | name: 'wjy6', |
subscription: 'both', | subscription: 'both', | ||
order: 3, | order: 3, | ||
行 234: | 行 234: | ||
{ | { | ||
wjy6: { | wjy6: { | ||
- | jid: "easemob-demo#chatdemoui_mengyuanyuan01@easemob.com", | + | jid: 'easemob-demo#chatdemoui_mengyuanyuan01@easemob.com', |
- | name: "mengyuanyuan01", | + | name: 'mengyuanyuan01', |
- | order: "2", | + | order: '2', |
- | type: "jid" | + | type: 'jid' |
} | } | ||
}, | }, | ||
{ | { | ||
mengyuanyuan: { | mengyuanyuan: { | ||
- | jid: "easemob-demo#chatdemoui_wjy6@easemob.com", | + | jid: 'easemob-demo#chatdemoui_wjy6@easemob.com', |
- | name: "wjy6", | + | name: 'wjy6', |
- | order: "4", | + | order: '4', |
- | type: "jid", | + | type: 'jid', |
} | } | ||
} | } |