stream-chat-swift icon indicating copy to clipboard operation
stream-chat-swift copied to clipboard

Add user privacy settings to control user events

Open nuno-vieira opened this issue 2 months ago • 6 comments

🔗 Issue Links

Resolves https://github.com/GetStream/ios-issues-tracking/issues/774

🎯 Goal

Allow the user to control whether he wants to share, read, or type events.

📝 Summary

  • Adds UserPrivacySettings to ChatClient.connectUser()
  • Adds UserPrivacySettings to CurrentUserController.updateUserData()
  • Adds ChatCurrentUser.privacySettings
  • Only send typing events if ChatCurrentUser.privacySettings.typingIndicator.enabled
  • Allow to edit user privacy settings in the Demo App Configuration.
  • Allow to edit user privacy settings in the Demo App Profile View.

🧪 Manual Testing Notes

  • Open Demo App Configuration
  • Enable/Disable typing indicators and read indicators
  • When connecting the user, the connectUser call in proxyman should include the privacy settings
  • If typing events are disabled, when sending a message, it should not send typing events (Check with another device and user)
  • if read receipts are disabled, when reading a message, it should not appear in the delivery receipts of the other user
  • Do the same when updating the user profile (Open the user profile view and update the privacy settings)

☑️ Contributor Checklist

  • [x] I have signed the Stream CLA (required)
  • [x] This change follows zero ⚠️ policy (required)
  • [x] This change should be manually QAed
  • [x] Changelog is updated with client-facing changes
  • [x] New code is covered by unit tests
  • [ ] Comparison screenshots added for visual changes
  • [ ] Affected documentation updated (docusaurus, tutorial, CMS)

nuno-vieira avatar Apr 10 '24 17:04 nuno-vieira