Fixed restricted date checking
This commit is contained in:
parent
523feaeb4b
commit
69a2c43ad9
1 changed files with 2 additions and 1 deletions
|
|
@ -754,7 +754,8 @@ std::optional<QString> RestrictionError(
|
||||||
using Flag = ChatRestriction;
|
using Flag = ChatRestriction;
|
||||||
if (const auto restricted = peer->amRestricted(restriction)) {
|
if (const auto restricted = peer->amRestricted(restriction)) {
|
||||||
const auto all = restricted.isWithEveryone();
|
const auto all = restricted.isWithEveryone();
|
||||||
if (!all && const auto channel = peer->asChannel()) {
|
const auto channel = peer->asChannel();
|
||||||
|
if (!all && channel) {
|
||||||
auto restrictedUntil = channel->restrictedUntil();
|
auto restrictedUntil = channel->restrictedUntil();
|
||||||
if (restrictedUntil > 0) {
|
if (restrictedUntil > 0) {
|
||||||
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
|
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue