Skip to content

Commit c222540

Browse files
committed
Merge branch 'release/3.5.1'
2 parents c931f60 + 274189a commit c222540

20 files changed

+1298
-2800
lines changed

Delphinus.Info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"dependencies": [],
1313
"author": "M.E.Sysoev",
1414
"description": "Telegram Bot API for Delphi",
15-
"version": "3.5.0",
15+
"version": "3.5.1",
1616
"first_version": "2.3.1",
1717
"project_url": "https://github.com/ms301/TelegAPI",
1818
"homepage_url": "https://t.me/telegaPiBotTest",

Demo/Console/ConsoleBot.dproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<PropertyGroup Condition="'$(Base)'!=''">
3838
<DCC_DcuOutput>..\..\dcu\$(Platform)-$(Config)</DCC_DcuOutput>
3939
<DCC_E>false</DCC_E>
40-
<DCC_ExeOutput>..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
40+
<DCC_ExeOutput>..\..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
4141
<DCC_F>false</DCC_F>
4242
<DCC_K>false</DCC_K>
4343
<DCC_N>false</DCC_N>

Demo/EchoBot/EchoBot.Main.fmx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ object Main: TMain
4444
Touch.InteractiveGestures = [LongTap, DoubleTap]
4545
Align = Client
4646
TabOrder = 1
47-
Text = '283107814:AAF9VZC6TRv6qKmOMCsLFoI8SBlV_xFMI80'
4847
Margins.Right = 5.000000000000000000
4948
Size.Width = 346.000000000000000000
5049
Size.Height = 23.000000000000000000

Demo/EchoBot/EchoBot.Main.pas

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ TMain = class(TForm)
5656
procedure ParseTextMessage(Msg: ITgMessage);
5757
procedure ParsePhotoMessage(Msg: ITgMessage);
5858
procedure ParseLocationMessage(Msg: ITgMessage);
59+
procedure ParseContactMessage(Msg: ITgMessage);
5960
public
6061
{ Public declarations }
6162
end;
@@ -79,6 +80,11 @@ procedure TMain.FormClose(Sender: TObject; var Action: TCloseAction);
7980
tgReceiverUI1.IsActive := False;
8081
end;
8182

83+
procedure TMain.ParseContactMessage(Msg: ITgMessage);
84+
begin
85+
WriteLine('Contact: ' + Msg.Contact.LastName + ' ' + Msg.Contact.FirstName + ' ' + Msg.Contact.PhoneNumber);
86+
end;
87+
8288
procedure TMain.ParseLocationMessage(Msg: ITgMessage);
8389
begin
8490
WriteLine('Location: ' + Msg.Location.Longitude.ToString + ' ' + Msg.Location.Latitude.ToString);
@@ -150,22 +156,15 @@ procedure TMain.swtchTokenSwitch(Sender: TObject);
150156

151157
procedure TMain.SendPhoto(Msg: ITgMessage);
152158
const
153-
PATH_PHOTO = 'C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg';
154-
var
155-
LFile: TtgFileToSend;
159+
PATH_PHOTO = 'Photo.png';
156160
begin
157161
tgBot.SendChatAction(Msg.Chat.Id, TtgSendChatAction.UploadPhoto);
158162
if not TFile.Exists(PATH_PHOTO) then
159163
begin
160164
WriteLine('Change path to photo in metod: TMain.SendPhoto');
161165
Exit;
162166
end;
163-
LFile := TtgFileToSend.Create(PATH_PHOTO);
164-
try
165-
tgBot.SendPhoto(Msg.Chat.Id, LFile, 'Nice Picture');
166-
finally
167-
LFile.Free;
168-
end;
167+
tgBot.SendPhoto(Msg.Chat.Id, TtgFileToSend.FromFile(PATH_PHOTO), 'Nice Picture');
169168
end;
170169

171170
procedure TMain.SendInline;
@@ -264,6 +263,8 @@ procedure TMain.tgReceiverUI1Message(ASender: TObject; AMessage: ITgMessage);
264263
ParsePhotoMessage(AMessage);
265264
TtgMessageType.LocationMessage:
266265
ParseLocationMessage(AMessage);
266+
TtgMessageType.ContactMessage:
267+
ParseContactMessage(AMessage);
267268
end;
268269
end;
269270

Demo/EchoBot/EchoBot.dproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<AUP_WRITE_EXTERNAL_STORAGE>true</AUP_WRITE_EXTERNAL_STORAGE>
7171
<DCC_DcuOutput>..\..\DCU\$(Platform)-$(Config)</DCC_DcuOutput>
7272
<DCC_E>false</DCC_E>
73-
<DCC_ExeOutput>..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
73+
<DCC_ExeOutput>..\..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
7474
<DCC_F>false</DCC_F>
7575
<DCC_K>false</DCC_K>
7676
<DCC_N>false</DCC_N>
@@ -101,7 +101,6 @@
101101
</PropertyGroup>
102102
<PropertyGroup Condition="'$(Base_Win32)'!=''">
103103
<BT_BuildType>Debug</BT_BuildType>
104-
<DCC_ExeOutput>..\bin\$(Platform)-$(Config)</DCC_ExeOutput>
105104
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
106105
<DCC_UsePackage>DBXSqliteDriver;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;svnui;tethering;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;Intraweb;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;fmx;fmxdae;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;DataSnapCommon;DataSnapConnectors;VCLRESTComponents;vclie;bindengine;DBXMySQLDriver;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;DataSnapClient;bindcompdbx;IndyIPCommon;vcl;DBXSybaseASEDriver;IndyIPServer;IndySystem;FireDACDb2Driver;TelegaPiBot;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;emshosting;FireDACPgDriver;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;DbxCommonDriver;Tee;DataSnapServer;xmlrtl;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;DbxClientDriver;DBXSybaseASADriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;dsnapxml;DataSnapProviderClient;dbrtl;inetdbxpress;FireDACMongoDBDriver;IndyProtocols;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
107106
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
@@ -175,8 +174,6 @@
175174
<Excluded_Packages>
176175
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
177176
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
178-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\ComponentTray.bpl">Component Tray</Excluded_Packages>
179-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\DJSON_Project.bpl">(untitled)</Excluded_Packages>
180177
</Excluded_Packages>
181178
</Delphi.Personality>
182179
<Deployment Version="3">

Install/TelegaPi.dpk

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ package TelegaPi;
3131

3232
requires
3333
rtl,
34-
RESTComponents;
34+
RESTComponents,
35+
fmx;
3536

3637
contains
3738
TelegAPI.Base in '..\Source\TelegAPI.Base.pas',
@@ -50,8 +51,11 @@ contains
5051
TelegAPi.Types in '..\Source\TelegAPi.Types.pas',
5152
TelegaPi.Types.ReplyMarkups in '..\Source\TelegaPi.Types.ReplyMarkups.pas',
5253
TelegAPI.Utils.Json in '..\Source\TelegAPI.Utils.Json.pas',
53-
TelegAPI.Utils.Params in '..\Source\TelegAPI.Utils.Params.pas',
54+
TelegAPI.CoreAPI.ParameterConverter in '..\Source\TelegAPI.CoreAPI.ParameterConverter.pas',
5455
TelegAPI.Receiver.UI in '..\Source\TelegAPI.Receiver.UI.pas',
55-
TelegaPi.Factory in '..\Source\TelegaPi.Factory.pas';
56+
TelegaPi.Factory in '..\Source\TelegaPi.Factory.pas',
57+
TelegAPi.CoreAPI.Request in '..\Source\TelegAPi.CoreAPI.Request.pas',
58+
TelegAPi.CoreAPI.Parameter in '..\Source\TelegAPi.CoreAPI.Parameter.pas',
59+
TelegaPi.Ext.Sessions in '..\Source\TelegaPi.Ext.Sessions.pas';
5660

5761
end.

Install/TelegaPi.dproj

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,33 @@ $(PreBuildEvent)]]>
6969
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
7070
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
7171
<EnabledSysJars>android-support-v4.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar</EnabledSysJars>
72+
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
73+
<VerInfo_Build>1</VerInfo_Build>
7274
<VerInfo_Keys>package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=auto;largeHeap=False;theme=TitleBar;hardwareAccelerated=true;apiKey=</VerInfo_Keys>
7375
</PropertyGroup>
7476
<PropertyGroup Condition="'$(Base_Win32)'!=''">
7577
<BT_BuildType>Debug</BT_BuildType>
7678
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
7779
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
80+
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
7881
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
79-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
82+
<VerInfo_Keys>CompanyName=Maxim Sysoev;FileDescription=$(MSBuildProjectName);FileVersion=3.5.1.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
8083
<VerInfo_Locale>1033</VerInfo_Locale>
84+
<VerInfo_MajorVer>3</VerInfo_MajorVer>
85+
<VerInfo_MinorVer>5</VerInfo_MinorVer>
86+
<VerInfo_Release>1</VerInfo_Release>
8187
</PropertyGroup>
8288
<PropertyGroup Condition="'$(Base_Win64)'!=''">
8389
<BT_BuildType>Debug</BT_BuildType>
8490
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
8591
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
92+
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
8693
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
87-
<VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
94+
<VerInfo_Keys>CompanyName=Maxim Sysoev;FileDescription=$(MSBuildProjectName);FileVersion=3.5.1.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
8895
<VerInfo_Locale>1033</VerInfo_Locale>
96+
<VerInfo_MajorVer>3</VerInfo_MajorVer>
97+
<VerInfo_MinorVer>5</VerInfo_MinorVer>
98+
<VerInfo_Release>1</VerInfo_Release>
8999
</PropertyGroup>
90100
<PropertyGroup Condition="'$(Cfg_1)'!=''">
91101
<DCC_DebugDCUs>true</DCC_DebugDCUs>
@@ -113,6 +123,7 @@ $(PreBuildEvent)]]>
113123
<DCCReference Include="TTelegramBot.dcr"/>
114124
<DCCReference Include="rtl.dcp"/>
115125
<DCCReference Include="RESTComponents.dcp"/>
126+
<DCCReference Include="fmx.dcp"/>
116127
<DCCReference Include="..\Source\TelegAPI.Base.pas"/>
117128
<DCCReference Include="..\Source\TelegAPI.Bot.Impl.pas"/>
118129
<DCCReference Include="..\Source\TelegAPI.Bot.pas"/>
@@ -123,15 +134,18 @@ $(PreBuildEvent)]]>
123134
<DCCReference Include="..\Source\TelegAPI.Receiver.Service.pas"/>
124135
<DCCReference Include="..\Source\TelegAPi.RegisterIDE.pas"/>
125136
<DCCReference Include="..\Source\TelegaPi.Types.Enums.pas"/>
126-
<DCCReference Include="..\Source\TelegAPi.Types.Impl.pas"/>
137+
<DCCReference Include="..\Source\TelegAPI.Types.Impl.pas"/>
127138
<DCCReference Include="..\Source\TelegaPi.Types.InlineQueryResults.pas"/>
128139
<DCCReference Include="..\Source\TelegaPi.Types.InputMessageContents.pas"/>
129140
<DCCReference Include="..\Source\TelegAPi.Types.pas"/>
130141
<DCCReference Include="..\Source\TelegaPi.Types.ReplyMarkups.pas"/>
131142
<DCCReference Include="..\Source\TelegAPI.Utils.Json.pas"/>
132-
<DCCReference Include="..\Source\TelegAPI.Utils.Params.pas"/>
143+
<DCCReference Include="..\Source\TelegAPI.CoreAPI.ParameterConverter.pas"/>
133144
<DCCReference Include="..\Source\TelegAPI.Receiver.UI.pas"/>
134145
<DCCReference Include="..\Source\TelegaPi.Factory.pas"/>
146+
<DCCReference Include="..\Source\TelegAPi.CoreAPI.Request.pas"/>
147+
<DCCReference Include="..\Source\TelegAPi.CoreAPI.Parameter.pas"/>
148+
<DCCReference Include="..\Source\TelegaPi.Ext.Sessions.pas"/>
135149
<BuildConfiguration Include="Base">
136150
<Key>Base</Key>
137151
</BuildConfiguration>
@@ -155,7 +169,6 @@ $(PreBuildEvent)]]>
155169
<Excluded_Packages>
156170
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
157171
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
158-
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\DJSON_Project.bpl">(untitled)</Excluded_Packages>
159172
</Excluded_Packages>
160173
</Delphi.Personality>
161174
<Deployment Version="3">

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Telega π - Library for working with Telegram Bot API in Delphi
44

55

6-
Version Bot API: *3.5.0*
6+
Version Bot API: *3.5.1*
77

88
## Support project
99

@@ -50,7 +50,7 @@ as well as many others who ask / suggest features / points bugs.
5050

5151
Telega π - Библиотека для работы с Telegram Bot API в Delphi
5252

53-
Версия Bot API: *3.5.0*
53+
Версия Bot API: *3.5.1*
5454

5555
## Помощь проекту
5656

Source/TelegAPI.Base.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ constructor TtgAbstractComponent.Create(AOwner: TComponent);
2828
begin
2929
inherited;
3030
FAutor := 'Maxim Sysoev';
31-
FVersion := '3.5.0';
31+
FVersion := '3.5.1';
3232
end;
3333

3434
end.

0 commit comments

Comments
 (0)