diff --git a/Telegram/SourceFiles/history/view/history_view_contact_status.cpp b/Telegram/SourceFiles/history/view/history_view_contact_status.cpp index bb5fb0525..7bb8ce97e 100644 --- a/Telegram/SourceFiles/history/view/history_view_contact_status.cpp +++ b/Telegram/SourceFiles/history/view/history_view_contact_status.cpp @@ -296,6 +296,15 @@ void ContactStatus::setupBlockHandler(not_null peer) { } void ContactStatus::setupShareHandler(not_null peer) { + _bar.entity()->shareClicks( + ) | rpl::start_with_next([=] { + peer->setSettings(0); + peer->session().api().request(MTPcontacts_AcceptContact( + peer->inputUser + )).done([=](const MTPUpdates &result) { + peer->session().api().applyUpdates(result); + }).send(); + }, _bar.lifetime()); } void ContactStatus::setupReportHandler(not_null peer) { diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 9677a3ef8..e41bec7e6 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -4218,7 +4218,11 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { const auto &d = update.c_updatePeerSettings(); const auto peerId = peerFromMTP(d.vpeer); if (const auto peer = session().data().peerLoaded(peerId)) { - //peer->updateSettings(d.vsettings); + const auto settings = d.vsettings.match([]( + const MTPDpeerSettings &data) { + return data.vflags.v; + }); + peer->setSettings(settings); } } break;