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

[Feature] Introduce new method createCommunicationIdentifier(from rawId:) #1312

Merged

Conversation

JoshuaLai
Copy link
Member

Introducing new method to serialize and deserialize the communication identifier the raw id.
Follow up from feedback from PR(#1255)

Swift Interface:

        let acsRawId = "8:acs:37691ec4-57fb-4c0f-ae31-32791610cb14_37691ec4-57fb-4c0f-ae31-32791610cb14"
        var communicationUserIdentifier = createCommunicationIdentifier(from: acsRawId)
        XCTAssertTrue(communicationUserIdentifier.isKind(of: CommunicationUserIdentifier.self))
        XCTAssertEqual(communicationUserIdentifier.kind, .CommunicationUser)
        XCTAssertEqual(communicationUserIdentifier.rawId, acsRawId)

ObjC Interface:

    NSString *acsRawId = @"8:acs:37691ec4-57fb-4c0f-ae31-32791610cb14_37691ec4-57fb-4c0f-ae31-32791610cb14";
    id<CommunicationIdentifier> identifier = [CommunicationIdentifierFactory createCommunicationIdentifier:acsRawId];
    XCTAssertTrue([identifier isKindOfClass:CommunicationUserIdentifier.class]);
    XCTAssertEqual(identifier.kind, IdentifierKind.CommunicationUser);
    XCTAssertEqualObjects(identifier.rawId, acsRawId);
    XCTAssertEqualObjects(((CommunicationUserIdentifier *)identifier).identifier, acsRawId);

@JoshuaLai JoshuaLai requested a review from a team as a code owner July 12, 2022 20:56
@ghost ghost added the Communication label Jul 12, 2022
@JoshuaLai JoshuaLai requested a review from petrsvihlik July 18, 2022 15:29
@JoshuaLai JoshuaLai requested a review from tjprescott July 18, 2022 15:52
…com:JoshuaLai/azure-sdk-for-ios into feature/swift_createCommunicationIdentifier
Copy link
Member

@tjprescott tjprescott left a comment

Choose a reason for hiding this comment

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

Holding temporarily while we let the archboard weigh-in.

@petrsvihlik
Copy link

this is blocking #1335

@JoshuaLai JoshuaLai requested a review from tjprescott August 22, 2022 20:07
@tjprescott tjprescott enabled auto-merge (squash) August 24, 2022 15:43
@tjprescott tjprescott merged commit 5106cff into Azure:main Aug 24, 2022
@JoshuaLai JoshuaLai deleted the feature/swift_createCommunicationIdentifier branch August 24, 2022 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants