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.
public func listThreads( from contextId: String, basedOn query: privmx.endpoint.core.PagingQuery ) throws -> privmx.ThreadList
Name
Type
Description
contextId
String
The unique identifier of the context from which to list Threads.
query
privmx.endpoint.core.PagingQuery
A paging query object for filtering and paginating the results.
Type
Description
privmx.ThreadList
A `privmx.endpoint.thread.ThreadsList` instance containing the list of Threads.
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. Note: when no policies are supplied, the default ones inherited from the context will be used instead.
public func createThread( in contextId: String, for users:[privmx.endpoint.core.UserWithPubKey], managedBy managers:[privmx.endpoint.core.UserWithPubKey], withPublicMeta publicMeta: Data, withPrivateMeta privateMeta: Data, withPolicies policies:privmx.endpoint.core.ContainerPolicy?= nil ) 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.
publicMeta
Data
The public metadata associated with the Thread, which will not be encrypted.
privateMeta
Data
The private metadata associated with the Thread, which will be encrypted.
policies
privmx.endpoint.core.ContainerPolicy?
The policies governing the Container, as well as the items within.
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.
public 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.
public 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.