Skip to content

Commit

Permalink
Merge pull request #5 from luanyata/dev
Browse files Browse the repository at this point in the history
🐛 (Eventos) Correcao da atribuicao handleWsState
  • Loading branch information
luanyata authored Mar 31, 2020
2 parents 23e2ef5 + 3b40603 commit 13e335c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/config/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { Context } = require('../models')
const { Events } = require('../events')
const { InboundEvents, OutboundEvents } = require('../state-call')
const { CallState,WSState } = require('../enums')
const { CallState, WSState } = require('../enums')
const { WsException } = require('../ws-exceptions')

let HandleVerto = null
Expand Down Expand Up @@ -74,7 +74,7 @@ const onDialogState = d => {
HOLD,
HANGUP,
DESTROY,
} = CallState,WSS
} = CallState

if (!Context.currentCall) {
Context.currentCall = d
Expand Down Expand Up @@ -189,9 +189,8 @@ const eventVerto = (
OutboundEvents,
dialog = null
) => {
direction === CallState,WSS.INBOUND
? InboundEvents(dialog)
: OutboundEvents(dialog)
direction === CallState,
WSS.INBOUND ? InboundEvents(dialog) : OutboundEvents(dialog)
}

const Config = {
Expand Down
2 changes: 1 addition & 1 deletion src/events/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { EventEmitter } = require('events')

const Events = {
handleWsState = new EventEmitter(),
handleWsState: new EventEmitter(),
handleVerto: new EventEmitter(),
}

Expand Down

0 comments on commit 13e335c

Please sign in to comment.