Some minor bugfixes

This commit is contained in:
WolverinDEV 2020-07-13 11:13:06 +02:00
parent 809fa82b31
commit 7a3854843f

View File

@ -81,7 +81,7 @@ namespace ts {
ts_always_inline
static bool permission_granted(const permission::v2::PermissionFlaggedValue& channel_permission_value, const permission::v2::PermissionFlaggedValue& granted_value, bool require_granted_value) {
if(!channel_permission_value.has_value || channel_permission_value.value == 0) {
return !require_granted_value || granted_value.has_value;
return !require_granted_value || granted_value.has_power();
}
if(channel_permission_value.value == -1) {
return granted_value.value == -1;