SkygearChatPubsub
SkygearChatPubsub is a class for dsipatching the message from user_channel to the coorrect handler according to the event type and registeration
Constructor Summary
Public Constructor | ||
public |
constructor(container: *) |
Member Summary
Public Members | ||
public |
allTypingHandler: *[] |
|
public |
messageHandler: *[] |
|
public |
pubsub: * |
|
public |
typingHandler: {} |
|
public |
userChannel: * |
Method Summary
Public Methods | ||
public |
dispatch(payload: *) |
|
public |
dispatchTyping(data: *) |
|
public |
dispatchUpdate(data: *) |
|
public |
getUserChannel(): * |
|
public |
sendTyping(conversation: *, state: *) |
|
public |
subscribeAllTyping(handler: *) |
|
public |
subscribeDispatch(channel: *) |
|
public |
subscribeMessage(handler: *) |
|
public |
subscribeTyping(conversation: *, handler: *) |
|
public |
unsubscribeMessage(handler: *) |
|
public |
unsubscribeTyping(conversation: *, handler: *) |
Public Constructors
public constructor(container: *) source
Params:
Name | Type | Attribute | Description |
container | * |
Public Members
public allTypingHandler: *[] source
public messageHandler: *[] source
public pubsub: * source
public typingHandler: {} source
public userChannel: * source
Public Methods
public dispatch(payload: *) source
Params:
Name | Type | Attribute | Description |
payload | * |
public dispatchTyping(data: *) source
Params:
Name | Type | Attribute | Description |
data | * |
public dispatchUpdate(data: *) source
Params:
Name | Type | Attribute | Description |
data | * |
public sendTyping(conversation: *, state: *) source
Params:
Name | Type | Attribute | Description |
conversation | * | ||
state | * |
public subscribeAllTyping(handler: *) source
Params:
Name | Type | Attribute | Description |
handler | * |
public subscribeDispatch(channel: *) source
Params:
Name | Type | Attribute | Description |
channel | * |
public subscribeMessage(handler: *) source
Params:
Name | Type | Attribute | Description |
handler | * |
public subscribeTyping(conversation: *, handler: *) source
Params:
Name | Type | Attribute | Description |
conversation | * | ||
handler | * |
public unsubscribeMessage(handler: *) source
Params:
Name | Type | Attribute | Description |
handler | * |
public unsubscribeTyping(conversation: *, handler: *) source
Params:
Name | Type | Attribute | Description |
conversation | * | ||
handler | * |