2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Create private channel post links.

This commit is contained in:
John Preston
2019-04-04 14:02:22 +04:00
parent 73470c3a95
commit 0744f43a0e
8 changed files with 33 additions and 35 deletions

View File

@@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_location_manager.h"
#include "history/history_service.h"
#include "history/view/history_view_service_message.h"
#include "history/view/history_view_context_menu.h" // For CopyPostLink().
#include "auth_session.h"
#include "boxes/share_box.h"
#include "boxes/confirm_box.h"
@@ -104,9 +105,7 @@ void FastShareMessage(not_null<HistoryItem*> item) {
auto copyCallback = [data]() {
if (auto item = App::histItemById(data->msgIds[0])) {
if (item->hasDirectLink()) {
QApplication::clipboard()->setText(item->directLink());
Ui::Toast::Show(lang(lng_channel_public_link_copied));
HistoryView::CopyPostLink(item->fullId());
} else if (const auto bot = item->getMessageBot()) {
if (const auto media = item->media()) {
if (const auto game = media->game()) {