mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Support separate message type group restrictions.
This commit is contained in:
@@ -841,6 +841,22 @@ void DocumentData::setLoadedInMediaCache(bool loaded) {
|
||||
}
|
||||
}
|
||||
|
||||
ChatRestriction DocumentData::requiredSendRight() const {
|
||||
return isVideoFile()
|
||||
? ChatRestriction::SendVideos
|
||||
: isSong()
|
||||
? ChatRestriction::SendMusic
|
||||
: isVoiceMessage()
|
||||
? ChatRestriction::SendVoiceMessages
|
||||
: isVideoMessage()
|
||||
? ChatRestriction::SendVideoMessages
|
||||
: sticker()
|
||||
? ChatRestriction::SendStickers
|
||||
: isAnimation()
|
||||
? ChatRestriction::SendGifs
|
||||
: ChatRestriction::SendFiles;
|
||||
}
|
||||
|
||||
void DocumentData::setFileName(const QString &remoteFileName) {
|
||||
_filename = remoteFileName;
|
||||
|
||||
|
Reference in New Issue
Block a user