-
Notifications
You must be signed in to change notification settings - Fork 39
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
[CM-1186] Add preFilledMessage support to conversationObject | iOS SDK #454
Conversation
WalkthroughThe changes in this pull request introduce new functionality to the Changes
Possibly related PRs
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
Sources/Kommunicate/Classes/KMConversation.swift (1)
124-131
: Fix typos in documentation commentThe documentation has two typos:
- "converwastion" should be "conversation"
- "vissble" should be "visible"
- /// To set pre fill message in Chat Bar while opening converwastion. - /// - Parameter message: Pass the text that should be vissble on chat bar while opening the conversation. Only works with `launchConversation` + /// To set pre fill message in Chat Bar while opening conversation. + /// - Parameter message: Pass the text that should be visible on chat bar while opening the conversation. Only works with `launchConversation`Sources/Kommunicate/Classes/Kommunicate.swift (1)
495-586
: LGTM: Well-structured implementation with comprehensive error handlingThe implementation is thorough and follows best practices. Consider adding documentation for the possible error cases that can be returned in the completion handler to help API consumers better handle errors.
Add documentation for error cases, for example:
/** Launch a new conversation with the details passed in group chat from a ViewController - Parameters: - conversation: An instance of `KMConversation` object. - viewController: ViewController from which the group chat will be launched. - completionHandler: If successful launch the conversation the success callback will have a conversationId else it will be KMConversationError on failure. + + Possible errors returned in the completion handler: + - `.deviceRooted`: Device is suspected to be jailbroken + - `.internet`: No network connection available + - `.invalidTitle`: Conversation title is empty or invalid + - `.notLoggedIn`: User is not logged in + - `.api`: API related errors during conversation creation */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
Sources/Kommunicate/Classes/KMConversation.swift
(2 hunks)Sources/Kommunicate/Classes/Kommunicate.swift
(1 hunks)
🔇 Additional comments (1)
Sources/Kommunicate/Classes/KMConversation.swift (1)
26-26
: LGTM: Property declaration looks good
The optional String property with a nil default value is appropriate for storing a prefilled message.
Summary
prefilledMessage
parameter in theKMConversation
object.KMConversation
object and aUIViewController
as parameters.prefilledMessage
functionality is supported exclusively with thelaunchConversation
method.Refactored Code
Summary by CodeRabbit
New Features
Bug Fixes