Lists the Threads the user has access to in a specified context.
This method retrieves a list of Threads in the given context, with pagination and filtering options.
Creates a new Thread in a specified context.
This method creates a new Thread with specified users, managers, and metadata in the given context. Note: Managers do not automatically have access to the thread unless explicitly added as users.
func createThread( in contextId: String, for users:[privmx.endpoint.core.UserWithPubKey], managedBy managers:[privmx.endpoint.core.UserWithPubKey], withPublicMeta pubMeta: Data, withPrivateMeta privMeta: Data ) throws -> String
Name
Type
Description
contextId
String
The unique identifier of the context in which to create the Thread.
users
[privmx.endpoint.core.UserWithPubKey]
A list of `UserWithPubKey` objects representing users who will have access to the Thread.
managers
[privmx.endpoint.core.UserWithPubKey]
A list of `UserWithPubKey` objects representing managers responsible for the Thread.
pubMeta
Data
privMeta
Data
Type
Description
String
A `String` representing the ID of the newly created Thread.
Updates an existing Thread with new users, managers, and metadata.
This method updates a Thread, replacing its existing users, managers, and metadata with new values. The update can be forced and a new key can be generated if necessary.
Subscribes to receive events related to Messages in a specific Thread.
This method subscribes to message-related events, allowing the client to receive notifications about changes in the Messages of the specified Thread.
func subscribeForMessageEvents( in threadId: String ) throws -> Void
Name
Type
Description
threadId
String
The unique identifier of the Thread for which to subscribe to message events.
Unsubscribes from receiving events related to Messages in a specific Thread.
This method unsubscribes from message-related events for the specified Thread, stopping further notifications.
func unsubscribeFromMessageEvents( in threadId: String ) throws -> Void
Name
Type
Description
threadId
String
The unique identifier of the Thread for which to unsubscribe from message events.