From 545dbd07910b8478c3ac08c536d8c9ef1083c013 Mon Sep 17 00:00:00 2001
From: John Preston <johnprestonmail@gmail.com>
Date: Wed, 2 Jan 2019 12:19:14 +0400
Subject: [PATCH] Return sticker-related context menu actions.

Regression was introduced in 3e22ada889.
---
 Telegram/SourceFiles/history/history_inner_widget.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp
index e8c189fd4..289a4f0da 100644
--- a/Telegram/SourceFiles/history/history_inner_widget.cpp
+++ b/Telegram/SourceFiles/history/history_inner_widget.cpp
@@ -1637,6 +1637,17 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
 				const auto mediaHasTextForCopy = media && media->hasTextForCopy();
 				if (const auto document = media ? media->getDocument() : nullptr) {
 					if (document->sticker()) {
+						if (document->sticker()->set.type() != mtpc_inputStickerSetEmpty) {
+							_menu->addAction(lang(document->isStickerSetInstalled() ? lng_context_pack_info : lng_context_pack_add), [=] {
+								showStickerPackInfo(document);
+							});
+							_menu->addAction(lang(Stickers::IsFaved(document) ? lng_faved_stickers_remove : lng_faved_stickers_add), [=] {
+								Auth().api().toggleFavedSticker(
+									document,
+									itemId,
+									!Stickers::IsFaved(document));
+							});
+						}
 						_menu->addAction(lang(lng_context_save_image), App::LambdaDelayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [=] {
 							saveDocumentToFile(itemId, document);
 						}));