RocketChat / RocketChat/Rocket.Chat

[BUG] Typo in SipServerSession method name (`geContactUri` instead of `getContactUri`) in @rocket.chat/media-calls

Open Beginner friendly
#42,056 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

In PR #42020 (commit 67f2bda92e), a helper method was introduced in SipServerSession to generate a SIP contact URI:

// ee/packages/media-calls/src/sip/Session.ts:93
public geContactUri(contact: MediaCallContact): string {
    const sipExtension = contact.sipExtension || (contact.type === 'sip' && contact.id) || null;
    ...
} 

The method name has a typo: geContactUri instead of getContactUri (missing 't').

It is currently being referenced with this misspelled name in:

ee/packages/media-calls/src/sip/Session.ts:124
ee/packages/media-calls/src/sip/Session.ts:126
ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts:113

Steps to reproduce:

Got to :- ee/packages/media-calls/src/sip/Session.ts at line 93.
Note the declaration public geContactUri(...).

Expected behavior:

The method name should follow standard naming conventions and be spelled correctly as getContactUri.

Actual behavior:

The method is named geContactUri.

Additional context

How i am going to fix this issue
Rename geContactUri to getContactUri in Session.ts and OutgoingSipCall.ts.
Add unit tests in ee/packages/media-calls for getContactUri to verify contact URI resolution for different contact types (SIP extension, username, and user ID).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in ee/packages/media-calls/src/sip/Session.ts at the SipServerSession method declaration and its references around lines 124 and 126, then check ee/packages/media-calls/src/sip/providers/OutgoingSipCall.ts around line 113. Rename the misspelled method consistently and add unit tests in ee/packages/media-calls for SIP extension, username, and user ID contact resolution. Done means references use getContactUri and the tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
audio-video-rtc
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.