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
- Use the
getMemberState()
function provided by thelmFeedClient
object created earlier. - Use the response as per your requirement
try {
const response = await lmFeedClient.getMemberState();
// Use the response as per your requirement.
} catch (error) {
// Use the error as per your requirement.
}
Models
GetMemberStateResponse
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
createdAt | string | Timestamp of when the member state was created | ✔ |
editRequired | boolean | Indicates if edit is required | ✔ |
member | User | Details of the member | ✔ |
memberRights | [MemberRight][](#member-rights) | Object of the community. | ✔ |
state | int | Member State | ✔ |
toolState | int | Logout response in case the user doesn't have the access. | ✔ |
Member Rights
VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
---|---|---|---|
id | boolean | Whether topic is enabled or disabled. | ✔ |
isLocked | string | Input text to search topics. | ✔ |
isSelected | string | Type of search. | ✔ |
title | string | Title of Member Right | ✔ |
subtitle | string | Subtitle of Member Right | ✔ |
state | MemberRightState | State of Member Right | ✔ |
MemberRightState
enum ManagerRightState {
Unknown = -1,
ModerateChatRooms = 0,
ModerateMembers = 1,
EditCommunityDetails = 2,
ViewMemberContactInfo = 3,
AddCommunityManager = 4,
ModerateDMSetting = 5,
ModerateFeedAndComment = 6
}