-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(voip): migrate iOS accept/reject from DDP to REST #7124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0a19388
feat(voip): add MediaCallsAnswerRequest for REST accept/reject
diegolmello f48c448
feat(voip): migrate accept() and reject() from DDP to REST
diegolmello 9167fa4
feat(voip): remove dead buildMediaCallAnswerParams after REST migration
diegolmello 4b43763
fix(voip): guard against nil API in accept/reject on iOS
diegolmello ba637f8
fix(voip): add missing RNCallKeep.endCall on user hangup before answer
diegolmello d9233e7
fix(voip): add missing RNCallKeep.endCall on user hangup before answer
diegolmello ff477fd
Merge branch 'refactor.ddp-ios' of github.com:RocketChat/Rocket.Chat.…
diegolmello 65b3789
fix(voip): remove duplicate MediaCallsAnswerRequest.swift and add to …
diegolmello 4d13bbb
xcode
diegolmello da0b23d
merge: resolve conflicts with feat.voip-lib-new (PR 7124)
diegolmello 8d13809
Merge branch 'feat.voip-lib-new' into refactor.ddp-ios
diegolmello 92045ec
Fix build
diegolmello aa9a875
feat(voip): enhance VoIP handling with deep link normalization and RE…
diegolmello aec707d
feat(deepLinking): add normalizeDeepLinkingServerHost function and tests
diegolmello 11571bf
chore(voip): address PR review slop in REST state signals refactor
diegolmello e2e8f8a
test(voip): mock store.getState in MediaCallEvents tests for host gate
diegolmello 70f6239
fix(voip): drop unused async on host-gate test (require-await lint)
diegolmello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // | ||
| // MediaCallsAnswerRequest.swift | ||
| // RocketChat | ||
| // | ||
| // Created by Diego Mello on 4/10/26. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| struct MediaCallsAnswerRequest: Request { | ||
| typealias ResponseType = MediaCallsAnswerResponse | ||
|
|
||
| let callId: String | ||
| let contractId: String | ||
| let answer: String | ||
| let supportedFeatures: [String]? | ||
|
|
||
| let method: HTTPMethod = .post | ||
| let path = "/api/v1/media-calls.answer" | ||
|
|
||
| init(callId: String, contractId: String, answer: String, supportedFeatures: [String]? = nil) { | ||
| self.callId = callId | ||
| self.contractId = contractId | ||
| self.answer = answer | ||
| self.supportedFeatures = supportedFeatures | ||
| } | ||
|
|
||
| func body() -> Data? { | ||
| var dict: [String: Any] = [ | ||
| "callId": callId, | ||
| "contractId": contractId, | ||
| "answer": answer | ||
| ] | ||
| if let features = supportedFeatures { | ||
| dict["supportedFeatures"] = features | ||
| } | ||
| return try? JSONSerialization.data(withJSONObject: dict) | ||
| } | ||
| } | ||
|
|
||
| struct MediaCallsAnswerResponse: Response { | ||
| let success: Bool | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.