51 bool canSendMessage(std::string userId, std::string eventType)
const;
60 bool canSendState(std::string userId, std::string eventType)
const;
76 bool canKick(std::string userId)
const;
84 bool canBan(std::string userId)
const;
192 std::unique_ptr<Private> m_d;
Represent a m.power_levels event.
Definition: power-levels-desc.hpp:26
bool canInvite(std::string userId) const
Determine whether a user can invite someone else.
Definition: power-levels-desc.cpp:156
PowerLevelsDesc setInvite(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to invite someone.
Definition: power-levels-desc.cpp:212
PowerLevelsDesc setRedact(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to redact someone else's messages.
Definition: power-levels-desc.cpp:219
PowerLevelsDesc setBan(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to ban someone.
Definition: power-levels-desc.cpp:198
Event originalEvent() const
Get the original event provided when constructing this.
Definition: power-levels-desc.cpp:193
PowerLevelsDesc setUsersDefault(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the default power level for users.
Definition: power-levels-desc.cpp:240
bool canSendMessage(std::string userId, std::string eventType) const
Determine whether a user can send a non-state event.
Definition: power-levels-desc.cpp:136
bool canRedact(std::string userId) const
Determine whether a user can redact someone else's events.
Definition: power-levels-desc.cpp:180
PowerLevelsDesc(const Event &e)
Construct a PowerLevelsDesc from an event.
Definition: power-levels-desc.cpp:118
PowerLevelsDesc setEvent(std::string eventType, std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to send an event of a particular type.
Definition: power-levels-desc.cpp:257
PowerLevel powerLevelOfUser(std::string userId) const
Get the power level of a user in the room.
Definition: power-levels-desc.cpp:126
Event normalizedEvent() const
Get the normalized event of this.
Definition: power-levels-desc.cpp:188
bool canBan(std::string userId) const
Determine whether a user can ban someone else.
Definition: power-levels-desc.cpp:172
PowerLevelsDesc setUser(std::string userId, std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level of some user.
Definition: power-levels-desc.cpp:247
PowerLevelsDesc setStateDefault(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to send a state event whose type is not in...
Definition: power-levels-desc.cpp:233
bool canKick(std::string userId) const
Determine whether a user can kick someone else.
Definition: power-levels-desc.cpp:164
KAZV_DECLARE_COPYABLE(PowerLevelsDesc)
PowerLevelsDesc setKick(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to kick someone.
Definition: power-levels-desc.cpp:205
bool canSendState(std::string userId, std::string eventType) const
Determine whether a user can send a state event.
Definition: power-levels-desc.cpp:146
PowerLevelsDesc setEventsDefault(std::optional< PowerLevel > powerLevel) const
Amend the power levels event to set the power level needed to send a non-state event whose type is no...
Definition: power-levels-desc.cpp:226
Definition: location.hpp:10
std::int_fast64_t PowerLevel
Definition: power-levels-desc.hpp:20
Definition: power-levels-desc.cpp:68