Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix small issue #7

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/data/data_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ void PeerData::setEncryption(bool encryption) {
auto action = Api::SendAction(history);
auto message = Api::MessageToSend(action);
if (encryption) {
message.textWithTags.text = QString("E2E INIT") + init_DH();
message.textWithTags.text = QString("E2E INIT ") + init_DH();
} else {
message.textWithTags.text = QString("stop encryption");
}
Expand Down
3 changes: 3 additions & 0 deletions Telegram/SourceFiles/history/history_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,9 @@ void HistoryItem::updateSentContent(
if (isEditingMedia()) {
return;
}
if (history()->peer->isEcnrypted()) {
return;
}
setText(textWithEntities);
if (_flags & MessageFlag::FromInlineBot) {
if (!media || !_media || !_media->updateInlineResultMedia(*media)) {
Expand Down
2 changes: 2 additions & 0 deletions Telegram/SourceFiles/window/window_peer_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ For license and copyright information please follow this link:
#include "info/stories/info_stories_widget.h"
#include "data/components/scheduled_messages.h"
#include "data/notify/data_notify_settings.h"
#include "data/encrypt/data_encrypt_settings.h"
#include "data/data_changes.h"
#include "data/data_session.h"
#include "data/data_folder.h"
Expand Down Expand Up @@ -1100,6 +1101,7 @@ void Filler::addEncryptButton() {
}
const auto peer = _peer;
const auto weak = base::make_weak(_thread);
//todo check here is chat already encrypted?
if (!_peer->isEcnrypted()) {
_addAction({
.text = "Enable encrypt",
Expand Down
Loading