feat: per-account ghost & lock ghost features & refactor

This commit is contained in:
AlexeyZavar
2026-02-04 02:20:12 +03:00
parent 4107597a3a
commit b6d19149d9
110 changed files with 2482 additions and 2657 deletions
+3 -3
View File
@@ -326,7 +326,7 @@ Session::Session(not_null<Main::Session*> session)
// AyuGram disableStories
const auto &settings = AyuSettings::getInstance();
if (!settings.disableStories) {
if (!settings.disableStories()) {
_stories->loadMore(Data::StorySourcesList::NotHidden);
}
});
@@ -2681,7 +2681,7 @@ void Session::updateEditedMessage(const MTPMessage &data) {
goto proceed;
}
edit = HistoryMessageEdition(_session, data.c_message());
if (settings.saveMessagesHistory && !existing->isLocal() && !existing->author()->isSelf() && !edit.isEditHide) {
if (settings.saveMessagesHistory() && !existing->isLocal() && !existing->author()->isSelf() && !edit.isEditHide) {
const auto msg = existing->originalText();
if (edit.textWithEntities == msg || msg.empty()) {
@@ -2837,7 +2837,7 @@ void Session::checkTTLs() {
_ttlCheckTimer.cancel();
const auto now = base::unixtime::now();
if (settings.saveDeletedMessages) {
if (settings.saveDeletedMessages()) {
auto toBeRemoved = ranges::views::take_while(
_ttlMessages,
[now](const auto &pair) {