Use case: Subscribe a user to an Annotation Thread
Before you start
Before you subscribe a user to an Annotation Thread, ensure you have completed the following prerequisites:
- Verify Permissions: Confirm that you have the necessary rights to manage Annotation Thread subscriptions. Typically, users can subscribe themselves, while administrators might be able to manage subscriptions for others.
- Identify the Annotation Thread: You must have a valid Annotation Thread identifier for the Annotation Thread to which you want to subscribe the user. Annotation Threads are typically identified by their root annotation ID or a dedicated Annotation Thread ID.
- Identify the User: Determine which user should be subscribed to the Annotation Thread. This could be the current user or another user (if you have administrative access).
- Understand Subscription Effects: Be aware that subscribing to an Annotation Thread means the user will receive notifications about Annotation Thread activity, such as new replies, status changes, or mentions.
- Set Up SDK Environment: Ensure your Unity environment is properly configured with the Collaboration SDK to interact with the Annotation Thread subscription system.
How do I...?
Subscribe the current user to an Annotation Thread
To subscribe the currently authenticated user to a specific Annotation Thread:
- Obtain the Project Identifier: Ensure you have the correct project identifier (GUID) for the project.
- Obtain the Annotation Identifier: Ensure you have the correct annotation identifier (GUID) for the root annotation identifying the Annotation Thread.
- Execute the Subscription: Use the SDK to subscribe the current user to the Annotation Thread.
- Update UI: Modify your interface to indicate the user is now subscribed.
Example:
var annotationReference = new AnnotationReference(projectId, annotationId);
await annotationManagement.SubscribeToAnnotationThreadAsync(
annotationReference,
cancellationToken);
Note
Annotation Thread subscriptions are an important mechanism for keeping team members informed about discussions that matter to them. Users who subscribe to Annotation Threads will receive notifications when new replies are added, when the Annotation Thread is resolved or reopened, or when other significant Annotation Thread events occur, helping them stay connected to important conversations.
For more information on working with Annotation Thread subscriptions, see the documentation on checking user subscription status and unsubscribing users from Annotation Threads.
See the API documentation for more details on the SubscribeToAnnotationThreadAsync method.