Skip to content

Commit

Permalink
fix(resources/calls): fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Jun 5, 2021
1 parent 3446de4 commit 44a0d94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion resources/server/calls/calls.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { callLogger } from './calls.utils';

onNet(CallEvents.INITIALIZE_CALL, (receivingNumber: string) => {
const src = getSource();
CallService.handleInititializeCall(src, receivingNumber).catch((e) =>
CallService.handleInitializeCall(src, receivingNumber).catch((e) =>
callLogger.error(
`Error occured in intialize (${receivingNumber}) call event, Error: ${e.message}`,
),
Expand Down
5 changes: 2 additions & 3 deletions resources/server/calls/calls.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import CallsDB, { CallsRepo } from './calls.db';
import { v4 as uuidv4 } from 'uuid';
import PlayerService from '../players/player.service';
import { callLogger } from './calls.utils';
import { ContactEvents } from '../../../typings/contact';

class CallsService {
private callMap: Collection<string, CallHistoryItem>;
Expand All @@ -30,7 +29,7 @@ class CallsService {
return obj;
}

async handleInititializeCall(src: number, receivingNumber: string): Promise<void> {
async handleInitializeCall(src: number, receivingNumber: string): Promise<void> {
// Create initial call data
const transmittingPlayer = PlayerService.getPlayer(src);
const transmitterNumber = transmittingPlayer.getPhoneNumber();
Expand Down Expand Up @@ -172,7 +171,7 @@ class CallsService {
emitNet(CallEvents.SEND_HANGUP_ANIM, currentCall.transmitterSource);
}

await this.callsDB.updateCall(currentCall, true, endCallTimeUnix);
await this.callsDB.updateCall(currentCall, true, endCallTimeUnix);

// Clear from memory
this.callMap.delete(transmitterNumber);
Expand Down

0 comments on commit 44a0d94

Please sign in to comment.