mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 17:35:53 +08:00
IM
This commit is contained in:
42
im/src/im-server/event/revoke.js
Normal file
42
im/src/im-server/event/revoke.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import Base from './base'
|
||||
import store from '@/store'
|
||||
|
||||
/**
|
||||
* 好友邀请消息处理
|
||||
*/
|
||||
class Revoke extends Base {
|
||||
/**
|
||||
* @var resource 资源
|
||||
*/
|
||||
resource
|
||||
|
||||
/**
|
||||
* 初始化构造方法
|
||||
*
|
||||
* @param {Object} resource Socket消息
|
||||
*/
|
||||
constructor(resource) {
|
||||
super()
|
||||
|
||||
this.resource = resource
|
||||
}
|
||||
|
||||
handle() {
|
||||
if (
|
||||
!this.isTalk(
|
||||
this.resource.talk_type,
|
||||
this.resource.receiver_id,
|
||||
this.resource.sender_id
|
||||
)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
|
||||
store.commit('UPDATE_DIALOGUE', {
|
||||
id: this.resource.record_id,
|
||||
is_revoke: 1,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default Revoke
|
||||
Reference in New Issue
Block a user