Skip to main content

Member State

The getMemberState function is used to fetch the member state of the current user. It provides information about the user's status, creation timestamp, edit requirements, and more.

Steps to Get Member State​

  1. Call getMemberState() function using the instance of LMFeedClient.
  2. Process the response LMResponse<GetMemberStateResponse> as per your requirement.
LMFeedClient.shared.getMemberState { response in
// Response (LMResponse<GetMemberStateResponse>)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models​

GetMemberStateResponse​

VARIABLETYPEDESCRIPTIONOPTIONAL
createdAtStringTimestamp of when the member state was created✔
editRequiredBoolIndicates if edit is required✔
memberUserDetails of the member✔
memberRightsMemberRightObject of the community.✔
stateIntMember State✔
toolStateIntLogout response in case the user doesn't have the access.✔

Member Rights​

VARIABLETYPEDESCRIPTIONOPTIONAL
idBooleanWhether topic is enabled or disabled.✔
isLockedStringInput text to search topics.✔
isSelectedStringType of search.✔
titleStringTitle of Member Right✔
subtitleStringSubtitle of Member Right✔
stateMemberRightStateState of Member Right✔

MemberRightState​

public enum ManagerRightState: Int {
case unknown = -1
case moderateChatRooms = 0
case moderateMembers = 1
case editCommunityDetails = 2
case viewMemberContactInfo = 3
case addCommunityManager = 4
case moderateDMSetting = 5
case moderateFeedAndComment = 6
}