Skip to content

Commit

Permalink
Merge branch 'release/3.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
rareMaxim committed Dec 19, 2017
2 parents c931f60 + 274189a commit c222540
Show file tree
Hide file tree
Showing 20 changed files with 1,298 additions and 2,800 deletions.
2 changes: 1 addition & 1 deletion Delphinus.Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": [],
"author": "M.E.Sysoev",
"description": "Telegram Bot API for Delphi",
"version": "3.5.0",
"version": "3.5.1",
"first_version": "2.3.1",
"project_url": "https://github.com/ms301/TelegAPI",
"homepage_url": "https://t.me/telegaPiBotTest",
Expand Down
2 changes: 1 addition & 1 deletion Demo/Console/ConsoleBot.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_DcuOutput>..\..\dcu\$(Platform)-$(Config)</DCC_DcuOutput>
<DCC_E>false</DCC_E>
<DCC_ExeOutput>..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
<DCC_ExeOutput>..\..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_N>false</DCC_N>
Expand Down
1 change: 0 additions & 1 deletion Demo/EchoBot/EchoBot.Main.fmx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ object Main: TMain
Touch.InteractiveGestures = [LongTap, DoubleTap]
Align = Client
TabOrder = 1
Text = '283107814:AAF9VZC6TRv6qKmOMCsLFoI8SBlV_xFMI80'
Margins.Right = 5.000000000000000000
Size.Width = 346.000000000000000000
Size.Height = 23.000000000000000000
Expand Down
19 changes: 10 additions & 9 deletions Demo/EchoBot/EchoBot.Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ TMain = class(TForm)
procedure ParseTextMessage(Msg: ITgMessage);
procedure ParsePhotoMessage(Msg: ITgMessage);
procedure ParseLocationMessage(Msg: ITgMessage);
procedure ParseContactMessage(Msg: ITgMessage);
public
{ Public declarations }
end;
Expand All @@ -79,6 +80,11 @@ procedure TMain.FormClose(Sender: TObject; var Action: TCloseAction);
tgReceiverUI1.IsActive := False;
end;

procedure TMain.ParseContactMessage(Msg: ITgMessage);
begin
WriteLine('Contact: ' + Msg.Contact.LastName + ' ' + Msg.Contact.FirstName + ' ' + Msg.Contact.PhoneNumber);
end;

procedure TMain.ParseLocationMessage(Msg: ITgMessage);
begin
WriteLine('Location: ' + Msg.Location.Longitude.ToString + ' ' + Msg.Location.Latitude.ToString);
Expand Down Expand Up @@ -150,22 +156,15 @@ procedure TMain.swtchTokenSwitch(Sender: TObject);

procedure TMain.SendPhoto(Msg: ITgMessage);
const
PATH_PHOTO = 'C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg';
var
LFile: TtgFileToSend;
PATH_PHOTO = 'Photo.png';
begin
tgBot.SendChatAction(Msg.Chat.Id, TtgSendChatAction.UploadPhoto);
if not TFile.Exists(PATH_PHOTO) then
begin
WriteLine('Change path to photo in metod: TMain.SendPhoto');
Exit;
end;
LFile := TtgFileToSend.Create(PATH_PHOTO);
try
tgBot.SendPhoto(Msg.Chat.Id, LFile, 'Nice Picture');
finally
LFile.Free;
end;
tgBot.SendPhoto(Msg.Chat.Id, TtgFileToSend.FromFile(PATH_PHOTO), 'Nice Picture');
end;

procedure TMain.SendInline;
Expand Down Expand Up @@ -264,6 +263,8 @@ procedure TMain.tgReceiverUI1Message(ASender: TObject; AMessage: ITgMessage);
ParsePhotoMessage(AMessage);
TtgMessageType.LocationMessage:
ParseLocationMessage(AMessage);
TtgMessageType.ContactMessage:
ParseContactMessage(AMessage);
end;
end;

Expand Down
5 changes: 1 addition & 4 deletions Demo/EchoBot/EchoBot.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<AUP_WRITE_EXTERNAL_STORAGE>true</AUP_WRITE_EXTERNAL_STORAGE>
<DCC_DcuOutput>..\..\DCU\$(Platform)-$(Config)</DCC_DcuOutput>
<DCC_E>false</DCC_E>
<DCC_ExeOutput>..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
<DCC_ExeOutput>..\..\..\Bin\$(Platform)-$(Config)</DCC_ExeOutput>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
<DCC_N>false</DCC_N>
Expand Down Expand Up @@ -101,7 +101,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<DCC_ExeOutput>..\bin\$(Platform)-$(Config)</DCC_ExeOutput>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<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>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
Expand Down Expand Up @@ -175,8 +174,6 @@
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\ComponentTray.bpl">Component Tray</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\DJSON_Project.bpl">(untitled)</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="3">
Expand Down
10 changes: 7 additions & 3 deletions Install/TelegaPi.dpk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ package TelegaPi;

requires
rtl,
RESTComponents;
RESTComponents,
fmx;

contains
TelegAPI.Base in '..\Source\TelegAPI.Base.pas',
Expand All @@ -50,8 +51,11 @@ contains
TelegAPi.Types in '..\Source\TelegAPi.Types.pas',
TelegaPi.Types.ReplyMarkups in '..\Source\TelegaPi.Types.ReplyMarkups.pas',
TelegAPI.Utils.Json in '..\Source\TelegAPI.Utils.Json.pas',
TelegAPI.Utils.Params in '..\Source\TelegAPI.Utils.Params.pas',
TelegAPI.CoreAPI.ParameterConverter in '..\Source\TelegAPI.CoreAPI.ParameterConverter.pas',
TelegAPI.Receiver.UI in '..\Source\TelegAPI.Receiver.UI.pas',
TelegaPi.Factory in '..\Source\TelegaPi.Factory.pas';
TelegaPi.Factory in '..\Source\TelegaPi.Factory.pas',
TelegAPi.CoreAPI.Request in '..\Source\TelegAPi.CoreAPI.Request.pas',
TelegAPi.CoreAPI.Parameter in '..\Source\TelegAPi.CoreAPI.Parameter.pas',
TelegaPi.Ext.Sessions in '..\Source\TelegaPi.Ext.Sessions.pas';

end.
23 changes: 18 additions & 5 deletions Install/TelegaPi.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,33 @@ $(PreBuildEvent)]]>
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
<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>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_Build>1</VerInfo_Build>
<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>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<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>
<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>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_MajorVer>3</VerInfo_MajorVer>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<BT_BuildType>Debug</BT_BuildType>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<DCC_UsePackage>rtl;fmx;RESTComponents;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<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>
<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>
<VerInfo_Locale>1033</VerInfo_Locale>
<VerInfo_MajorVer>3</VerInfo_MajorVer>
<VerInfo_MinorVer>5</VerInfo_MinorVer>
<VerInfo_Release>1</VerInfo_Release>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_DebugDCUs>true</DCC_DebugDCUs>
Expand Down Expand Up @@ -113,6 +123,7 @@ $(PreBuildEvent)]]>
<DCCReference Include="TTelegramBot.dcr"/>
<DCCReference Include="rtl.dcp"/>
<DCCReference Include="RESTComponents.dcp"/>
<DCCReference Include="fmx.dcp"/>
<DCCReference Include="..\Source\TelegAPI.Base.pas"/>
<DCCReference Include="..\Source\TelegAPI.Bot.Impl.pas"/>
<DCCReference Include="..\Source\TelegAPI.Bot.pas"/>
Expand All @@ -123,15 +134,18 @@ $(PreBuildEvent)]]>
<DCCReference Include="..\Source\TelegAPI.Receiver.Service.pas"/>
<DCCReference Include="..\Source\TelegAPi.RegisterIDE.pas"/>
<DCCReference Include="..\Source\TelegaPi.Types.Enums.pas"/>
<DCCReference Include="..\Source\TelegAPi.Types.Impl.pas"/>
<DCCReference Include="..\Source\TelegAPI.Types.Impl.pas"/>
<DCCReference Include="..\Source\TelegaPi.Types.InlineQueryResults.pas"/>
<DCCReference Include="..\Source\TelegaPi.Types.InputMessageContents.pas"/>
<DCCReference Include="..\Source\TelegAPi.Types.pas"/>
<DCCReference Include="..\Source\TelegaPi.Types.ReplyMarkups.pas"/>
<DCCReference Include="..\Source\TelegAPI.Utils.Json.pas"/>
<DCCReference Include="..\Source\TelegAPI.Utils.Params.pas"/>
<DCCReference Include="..\Source\TelegAPI.CoreAPI.ParameterConverter.pas"/>
<DCCReference Include="..\Source\TelegAPI.Receiver.UI.pas"/>
<DCCReference Include="..\Source\TelegaPi.Factory.pas"/>
<DCCReference Include="..\Source\TelegAPi.CoreAPI.Request.pas"/>
<DCCReference Include="..\Source\TelegAPi.CoreAPI.Parameter.pas"/>
<DCCReference Include="..\Source\TelegaPi.Ext.Sessions.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
Expand All @@ -155,7 +169,6 @@ $(PreBuildEvent)]]>
<Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k240.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="$(BDSBIN)\dclofficexp240.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
<Excluded_Packages Name="C:\Users\Public\Documents\Embarcadero\Studio\18.0\Bpl\DJSON_Project.bpl">(untitled)</Excluded_Packages>
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="3">
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Telega π - Library for working with Telegram Bot API in Delphi


Version Bot API: *3.5.0*
Version Bot API: *3.5.1*

## Support project

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

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

Версия Bot API: *3.5.0*
Версия Bot API: *3.5.1*

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

Expand Down
2 changes: 1 addition & 1 deletion Source/TelegAPI.Base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ constructor TtgAbstractComponent.Create(AOwner: TComponent);
begin
inherited;
FAutor := 'Maxim Sysoev';
FVersion := '3.5.0';
FVersion := '3.5.1';
end;

end.
Expand Down
Loading

0 comments on commit c222540

Please sign in to comment.