Skip to content
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

[WIP] Add Static Location and Live Location Support #3531

Draft
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Dec 13, 2024

🔗 Issue Links

Resolves https://linear.app/stream/issue/IOS-578/location-attachment

🎯 Goal

Adds support for static and live location attachments in the Low-Level Client SDK.

The UI has been implemented in the Demo App to demonstrate how to use the new location APIs.
A guide should be written in the stream documentation on how to use the location APIs.

📝 Summary

New APIs:

  • ChatChannelController
    • sendStaticLocation() - Sends a static location message to the channel.
    • startLiveLocationSharing() - Starts a live location-sharing message in the channel.
    • stopLiveLocationSharing() - Stops sharing the live location message in the channel.
  • ChatMessageController
    • updateMessage() - Updates the message partially. (It was missing from the SDK)
    • updateLiveLocation() - Updates the message's live location attachment if it has one.
  • CurrentChatUserController
    • updateLiveLocation() - Updates the location of all active live location messages for the current user. Internally, it uses the Message Controller to update each message that has a live location attachment.
  • CurrentChatUserControllerDelegate
    • didStartSharingLiveLocation() - Notifies whenever the current user is sharing a live location.
    • didStopSharingLiveLocation() - Notifies whenever the current user stops sharing a live location.
    • didChangeActiveLiveLocationMessages() - Notifies whenever the live location messages update.
  • Throttler
    • The Throttler was part of the UI SDK somehow, so it was moved to the LLC and made public like the Debouncer.
  • ChatMessage
    • staticLocationAttachments - Returns the attachments of .staticLocation type.
    • liveLocationAttachments - Returns the attachments of .liveLocation type.
  • AttachmentType
    • .staticLocation
    • .liveLocation
  • ChatMessageLiveLocationAttachment & LiveLocationAttachmentPayload
  • ChatMessageStaticLocationAttachment & StaticLocationAttachmentPayload

🛠 Implementation

TODO

🎨 Showcase

TODO

🧪 Manual Testing Notes

TODO

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (docusaurus, tutorial, CMS)

…when the user should start and stop location sharing
@nuno-vieira nuno-vieira added 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK ✅ Feature An issue or PR related to a feature labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Feature An issue or PR related to a feature 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant