-
Notifications
You must be signed in to change notification settings - Fork 150
Consume generated attributes #743
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
Conversation
|
|
| } | ||
|
|
||
| @objc | ||
| var agentStateString: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sort of breaks Obj-C contract, but IMO it's better than changing the schema for every single language, just for the sake of having Int raw value here...
| case transcription | ||
| } | ||
|
|
||
| public enum AgentState: String, Codable, Sendable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This public is a manual change, I don't think it's possible to expose a single one vs global "access-level": "public".
6384ce0 to
4b81f5c
Compare
|
|
||
| extension AgentState: CustomStringConvertible { | ||
| public var description: String { | ||
| rawValue.capitalized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to remove this one, looks like leftover that could be handled by the frontend.
| _state.mutate { $0.attributes = attributes } | ||
| _state.mutate { | ||
| $0.attributes = attributes | ||
| $0.agentAttributes = attributes.transcoded(to: AgentAttributes.self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically we could skip that for LocalParticipant, but it's not enforced anywhere else...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unused (but public), so I reverted that...
Participant.State(cache)A basic test case: