Send alerts about incoming calls

This commit is contained in:
Tulir Asokan
2019-05-30 17:00:36 +03:00
parent 1c009b96fe
commit a9fd97932b
4 changed files with 127 additions and 8 deletions

View File

@ -35,6 +35,7 @@ const (
MessageProps JSONMessageType = "Props"
MessageCmd JSONMessageType = "Cmd"
MessageChat JSONMessageType = "Chat"
MessageCall JSONMessageType = "Call"
)
func (ext *ExtendedConn) HandleError(error) {}
@ -85,6 +86,8 @@ func (ext *ExtendedConn) HandleJsonMessage(message string) {
ext.handleMessageCommand(msg[1])
case MessageChat:
ext.handleMessageChatUpdate(msg[1])
case MessageCall:
ext.handleMessageCall(msg[1])
default:
for _, handler := range ext.handlers {
ujmHandler, ok := handler.(UnhandledJSONMessageHandler)