From e6b209fb727ef0265b0bee42d5bfe74120498cc1 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 21 Jan 2020 04:29:35 +0300 Subject: [PATCH] Support QUIZ push notifications. GitOrigin-RevId: 34e2e7c364b2670861900ce8371534d0ab368afb --- td/generate/scheme/td_api.tl | 4 ++-- td/generate/scheme/td_api.tlo | Bin 166680 -> 166716 bytes td/telegram/NotificationManager.cpp | 8 ++++++++ td/telegram/NotificationType.cpp | 7 ++++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 99e7b15fc29f..f8ac96b72ad9 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2230,8 +2230,8 @@ pushMessageContentLocation is_live:Bool is_pinned:Bool = PushMessageContent; //@description A photo message @photo Message content; may be null @caption Photo caption @is_secret True, if the photo is secret @is_pinned True, if the message is a pinned message with the specified content pushMessageContentPhoto photo:photo caption:string is_secret:Bool is_pinned:Bool = PushMessageContent; -//@description A message with a poll @question Poll question @is_pinned True, if the message is a pinned message with the specified content -pushMessageContentPoll question:string is_pinned:Bool = PushMessageContent; +//@description A message with a poll @question Poll question @is_regular True, if the poll is regular and not in quiz mode @is_pinned True, if the message is a pinned message with the specified content +pushMessageContentPoll question:string is_regular:Bool is_pinned:Bool = PushMessageContent; //@description A screenshot of a message in the chat has been taken pushMessageContentScreenshotTaken = PushMessageContent; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 52fb14d0a4602ce5dda364f699640d76066846c8..87956b8a74371727ae6f5c80012635e65f9dec82 100644 GIT binary patch delta 721 zcmbO+jcd;|t_>UHS(sM!KG?iPKI8){h{Z5{BOjyub{zr6086mc^af8x69{XEC!-F8 zB_P4*F#U}mqsa6FUW_Ubu@o;x4G3$37h?#7^}>r$hZAJ%&0|77Op_BW)u%7;fhjBS zW;Bt2NiqOIku#ePhi%(Ikl6G+-cZXXy*HS?2X3|pP&<-|hVzh3JmUj%;2$5x5{MH@ zd|_fsd|}S|0~gcrgNe2H!Q8dMk8y?wI4nSp0)ne@TrpN9QGch$_%lktEoYwm@t8Ib zS7vd1QEGZ=PGS+mbO%312Z*g#{PFosApqv4fB={~PXs{ipX|^eGhHB%(E?(UPaw=) z2P7G7K!F|ukq`+&3ESR}`bd$n04NDjb|Hu{0>aV>X0*T^-ZjCnXx0d2jF>J^z{oOP zAOse<79sfj(*l%**fBwfQD(BhLJ16&+vW(`DaMJPU#z5r#Rt__2+QoUHS+*=O-M4v*e8>k@5Q|~@Mm|RQ?K%RC0hVB?=?$KYCJ@#RPevUG zOF)9rVfq_CMv>_Uycks=VkusX8W7e5FUAlE>xCCg$AXQFI@1^Uz?2ktGnz<%?7MkP z$cF(4ik#VWIBeSvg2blp@rG)f^xk0l9=N$4K<%6`O-z#w=cyx^c*X~2)gK?m5{UIB zzA&*RzAz{Kfs5(*!NgkpVD8%B$2da-91b8y0l`%{u9%*xM~kP&_%li%S^n{uHj?E( z{PB6mC4f-}u9bPZ;&n!i>799u@<;}}34pp_vO|N+%FxMTBWV8VVdkn;T z7C}hnGEGms&ZvzPT1SAg5Op0=jL5+l5X@+SJM0$(!=l?KlrdtuK?uz9m=Jt^Tmh7Y y*!CcV(E!2{35AIPjjDl&odJsBwp=0%rXv8(>Ij3Gw(to_integer(arg), true, false); } if (key == "MESSAGE_POLL") { - return td_api::make_object(arg, is_pinned); + return td_api::make_object(arg, true, is_pinned); + } + break; + case 'Q': + if (key == "MESSAGE_QUIZ") { + return td_api::make_object(arg, false, is_pinned); } break; case 'S':