QNGroupRepository
public class QNGroupRepository
Represents a Group
-
Name of the group
Declaration
Swift
public var name: String { get } -
Group identifier
Declaration
Swift
public var groupId: String { get } -
Group chat identifier
Declaration
Swift
public var chatId: String { get } -
Users who are joined to group
Declaration
Swift
public var participants: [QNUser] -
Group ringing strategy
Declaration
Swift
public var ringingStrategy: QNRingingStrategy { get }
-
add(user:Asynchronous) Add a new participant to group
Declaration
Swift
public func add(user: QNUser) async throwsParameters
userUser to be added
-
expel(user:Asynchronous) As group owners expel a participant from group
Declaration
Swift
public func expel(user: QNUser) async throwsParameters
participantParticipant to be expelled
-
leave()AsynchronousLeave the group
Declaration
Swift
public func leave() async throws -
removeAllUser()AsynchronousAs group owner expel all participants
Declaration
Swift
public func removeAllUser() async throws -
hasParticipant(userId:Asynchronous) Check if a participant belongs to the group
Declaration
Swift
public func hasParticipant(userId: String) async throws -> BoolParameters
participantParticipant to check
-
reorderParticipants(participants:Asynchronous) Update the list of group participants changing his order according to the received order.
Declaration
Swift
public func reorderParticipants(participants: [QNUser]) async throwsParameters
participantsThe list of group participants with the desired order
resultResult with success when the action is completed
-
changeRingingStrategy(to:Asynchronous) Change the ringing strategy of the group to the received value
Declaration
Swift
public func changeRingingStrategy(to strategy: QNRingingStrategy) async throwsParameters
toThe new ringing strategy to the group