2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Enable story actions in channels.

This commit is contained in:
John Preston
2023-09-05 18:17:19 +04:00
parent 29c5f6b706
commit 39f8394f98
10 changed files with 142 additions and 63 deletions

View File

@@ -547,16 +547,25 @@ bool ChannelData::canDeleteMessages() const {
}
bool ChannelData::canPostStories() const {
if (!isBroadcast()) {
return false;
}
return amCreator()
|| (adminRights() & AdminRight::PostStories);
}
bool ChannelData::canEditStories() const {
if (!isBroadcast()) {
return false;
}
return amCreator()
|| (adminRights() & AdminRight::EditStories);
}
bool ChannelData::canDeleteStories() const {
if (!isBroadcast()) {
return false;
}
return amCreator()
|| (adminRights() & AdminRight::DeleteStories);
}