-
Notifications
You must be signed in to change notification settings - Fork 209
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
Add support for sending system messages client-side #3477
Conversation
…if skipping is enabled
SDK Size
|
SDK Performance
|
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.
Looks good. I added one suggestion for the db handling, let me know what you think.
Additionally, we need some usage docs before we merge it.
@@ -38,6 +38,10 @@ class MessageDTO: NSManagedObject { | |||
@NSManaged var replyCount: Int32 | |||
@NSManaged var extraData: Data? | |||
@NSManaged var isSilent: Bool | |||
|
|||
// Used for creating a message as a system message from the client SDK. | |||
@NSManaged var isSystem: Bool |
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.
Isn't it better to use the optional type directly here? If we need to use it for some other type, we would need to use another helper var like this one.
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.
@martinmitrevski I've removed the isSystem
prop. The reason I added this, was because when using the message for the HTTP Request, we should only send the type if it is a system message, but now I check if the type is system, and if yes, then we send it. So the isSystem
is not really needed 👍
@martinmitrevski We probably should only update the CMS docs, I don't think updating the UI docs is very valuable 🤔 Also, where would we put this on the UI docs? |
cb17cb1
to
6d4febe
Compare
… `MessageDTO.type`
6d4febe
to
e5c1ed7
Compare
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.
LGTM! About the docs, yes, only the CMS docs. I think Android has this already, so you can follow the same format.
SDK Size
|
Quality Gate passedIssues Measures |
🔗 Issue Links
Resolves https://stream-io.atlassian.net/browse/PBE-4505
🎯 Goal
Add support for sending system messages from the SDK.
📝 Summary
lastMessageAt
locally🎨 Showcase
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-10-30.at.15.48.53.mp4
🧪 Manual Testing Notes
Regular Case:
1- Open the Demo App
2- Open the Channel Actions
3- Tap on Send a system message
4- A system message should be rendered on the channel
5- The channel list order should be updated
Skipping System lastMessageAt Case:
1- Open the Demo App
2- Login with Leia Organa
3- Send a system message in the
SKipppy
channel4- The channel list order should NOT be updated
☑️ Contributor Checklist