-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Description - Temporary fix for metadata, should be changed to only use metadata from RTC Engine after https://linear.app/swmansion/issue/FCE-834 is merged ## Motivation and Context - Mobile app was sending wrong metadata. ## How has this been tested? - Run and tested Android + iOS ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) ## Checklist: - [ ] My code follows the code style of this project. - [x] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly.
- Loading branch information
1 parent
99f080d
commit a3e7f00
Showing
7 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains 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 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 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
20 changes: 20 additions & 0 deletions
20
packages/ios-client/Sources/FishjamClient/utils/types.swift
This file contains 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 |
---|---|---|
@@ -1,3 +1,23 @@ | ||
public typealias Metadata = AnyJson | ||
public typealias Payload = AnyJson | ||
public typealias SerializedMediaEvent = String | ||
|
||
extension [String: Any] { | ||
public func toMetadata() -> Metadata { | ||
var res: Metadata = .init() | ||
self.forEach { entry in | ||
res[entry.key] = entry.value | ||
} | ||
return res | ||
} | ||
} | ||
|
||
extension AnyJson { | ||
public func toDict() -> [String: Any] { | ||
var res: [String: Any] = [:] | ||
self.keys.forEach { key in | ||
res[key] = self[key] | ||
} | ||
return res | ||
} | ||
} |
This file contains 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 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 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