MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / sendPaths

Method sendPaths

Telegram/SourceFiles/mainwidget.cpp:643–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

641}
642
643bool MainWidget::sendPaths(
644 not_null<Data::Thread*> thread,
645 const QStringList &paths) {
646 if (!Data::CanSendAnyOf(thread, Data::FilesSendRestrictions())) {
647 _controller->showToast(
648 tr::lng_forward_send_files_cant(tr::now));
649 return false;
650 } else if (const auto error = Data::AnyFileRestrictionError(
651 thread->peer())) {
652 Data::ShowSendErrorToast(controller(), thread->peer(), error);
653 return false;
654 } else {
655 _controller->showThread(
656 thread,
657 ShowAtTheEndMsgId,
658 Window::SectionShow::Way::ClearStack);
659 }
660 return (_controller->activeChatCurrent().thread() == thread)
661 && (_mainSection
662 ? _mainSection->confirmSendingFiles(paths)
663 : _history->confirmSendingFiles(paths));
664}
665
666bool MainWidget::filesOrForwardDrop(
667 not_null<Data::Thread*> thread,

Callers

nothing calls this directly

Calls 10

CanSendAnyOfFunction · 0.85
FilesSendRestrictionsFunction · 0.85
AnyFileRestrictionErrorFunction · 0.85
ShowSendErrorToastFunction · 0.85
showThreadMethod · 0.80
activeChatCurrentMethod · 0.80
showToastMethod · 0.45
peerMethod · 0.45
threadMethod · 0.45
confirmSendingFilesMethod · 0.45

Tested by

no test coverage detected