Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Update SignalRecipient with “is WebRTC enabled” property from service. #91

Merged
merged 2 commits into from Jan 13, 2017

Conversation

charlesmchen
Copy link
Contributor

[[SignalRecipient alloc] initWithTextSecureIdentifier:contactId
relay:relay
supportsVoice:YES
// Default to NO; ContactsUpdater will try to update this property.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the contactsUpdater does create a SignalRecipient with the correct supportsWebRTC value, aren't we clobbering it with a NO on line 48? [recipient saveWithTransaction:transaction];

Maybe the save needs to be moved up. Or maybe it can be deleted, since it looks like ContactsUpdater saves the recipient.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch. Fixed, and added a comment.

Also, per our offline conversation, let's keep thinking about how we can:

  • Avoid using concurrency unless necessary.
  • Avoid concurrency issues when mutating our models.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Some relevant reading that might shape our solutions https://github.com/YapStudios/YapDatabase/wiki#intermediate

// FREEBIE
@charlesmchen
Copy link
Contributor Author

PTAL @michaelkirk

@michaelkirk
Copy link
Contributor

LGTM 🌯

@charlesmchen charlesmchen merged commit ffb199b into mkirk/webrtc Jan 13, 2017
@charlesmchen charlesmchen deleted the charlesmchen/webrtcSetting2 branch January 13, 2017 20:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants