Skip to content

Commit

Permalink
fix(server): fix forgotten isBin for 'data' callback
Browse files Browse the repository at this point in the history
  • Loading branch information
paralin committed Nov 11, 2016
1 parent f7b6e53 commit 970d84f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class Call {
this.callEventHandler('error')(error);
}
if (response) {
this.callEventHandler('data')(response);
this.callEventHandler('data', true)(response);
}
this.dispose();
}
Expand All @@ -125,6 +125,8 @@ export class Call {

private callEventHandler(eventId: string, isBin: boolean = false) {
return (data: any) => {
console.log(eventId);
console.log(isBin);
let callEvent: IGBCallEvent = {
service_id: this.clientServiceId,
call_id: this.clientId,
Expand All @@ -138,6 +140,7 @@ export class Call {
if (!callEvent.bin_data) {
delete callEvent.bin_data;
}
console.log(callEvent);
this.send({
call_event: callEvent,
});
Expand Down

0 comments on commit 970d84f

Please sign in to comment.