No 'Clear History' for everyone in groups.
This commit is contained in:
parent
018232680f
commit
0a678ae8bd
|
@ -1568,7 +1568,7 @@ channels.editBanned#72796912 channel:InputChannel user_id:InputUser banned_right
|
|||
channels.getAdminLog#33ddf480 flags:# channel:InputChannel q:string events_filter:flags.0?ChannelAdminLogEventsFilter admins:flags.1?Vector<InputUser> max_id:long min_id:long limit:int = channels.AdminLogResults;
|
||||
channels.setStickers#ea8ca4f9 channel:InputChannel stickerset:InputStickerSet = Bool;
|
||||
channels.readMessageContents#eab5dc38 channel:InputChannel id:Vector<int> = Bool;
|
||||
channels.deleteHistory#bda41f3f flags:# for_everyone:flags.0?true channel:InputChannel max_id:int = Bool;
|
||||
channels.deleteHistory#af369d42 channel:InputChannel max_id:int = Bool;
|
||||
channels.togglePreHistoryHidden#eabbb94c channel:InputChannel enabled:Bool = Updates;
|
||||
channels.getLeftChannels#8341ecc0 offset:int = messages.Chats;
|
||||
channels.getGroupsForDiscussion#f5dad378 = messages.Chats;
|
||||
|
|
|
@ -750,6 +750,8 @@ auto DeleteMessagesBox::revokeText(not_null<PeerData*> peer) const
|
|||
tr::now,
|
||||
lt_user,
|
||||
user->firstName);
|
||||
} else if (_wipeHistoryJustClear) {
|
||||
return std::nullopt;
|
||||
} else {
|
||||
result.checkbox = tr::lng_delete_for_everyone_check(tr::now);
|
||||
}
|
||||
|
|
|
@ -606,11 +606,7 @@ void Histories::deleteAllMessages(
|
|||
// }
|
||||
}).send();
|
||||
} else if (channel) {
|
||||
const auto flags = revoke
|
||||
? MTPchannels_DeleteHistory::Flag::f_for_everyone
|
||||
: MTPchannels_DeleteHistory::Flag(0);
|
||||
return session().api().request(MTPchannels_DeleteHistory(
|
||||
MTP_flags(flags),
|
||||
channel->inputChannel,
|
||||
MTP_int(deleteTillId)
|
||||
)).done([=](const MTPBool &result) {
|
||||
|
|
|
@ -583,16 +583,16 @@ void Filler::addChannelActions(not_null<ChannelData*> channel) {
|
|||
}
|
||||
}
|
||||
if (channel->amIn()) {
|
||||
auto text = isGroup
|
||||
? tr::lng_profile_leave_group(tr::now)
|
||||
: tr::lng_profile_leave_channel(tr::now);
|
||||
_addAction(text, DeleteAndLeaveHandler(channel));
|
||||
if ((isGroup && !channel->isPublic())
|
||||
|| channel->canDeleteMessages()) {
|
||||
_addAction(
|
||||
tr::lng_profile_clear_history(tr::now),
|
||||
ClearHistoryHandler(channel));
|
||||
}
|
||||
auto text = isGroup
|
||||
? tr::lng_profile_leave_group(tr::now)
|
||||
: tr::lng_profile_leave_channel(tr::now);
|
||||
_addAction(text, DeleteAndLeaveHandler(channel));
|
||||
} else {
|
||||
auto text = isGroup
|
||||
? tr::lng_profile_join_group(tr::now)
|
||||
|
|
Loading…
Reference in New Issue