File tree Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Expand file tree Collapse file tree 4 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 8
8
<InvariantGlobalization >false</InvariantGlobalization >
9
9
<RootNamespace >GGroupp.Internal.Timesheet</RootNamespace >
10
10
<AssemblyName >GGroupp.Internal.Timesheet.Bot.Application</AssemblyName >
11
- <Version >1.5.7 </Version >
11
+ <Version >1.5.8 </Version >
12
12
</PropertyGroup >
13
13
14
14
<PropertyGroup Condition =" '$(RunConfiguration)' == 'Application' " />
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ internal static ChatFlow<TimesheetCreateFlowState> FindProject(
24
24
25
25
private static string CreateResultMessage ( IChatFlowContext < TimesheetCreateFlowState > context , LookupValue projectValue )
26
26
=>
27
- $ "{ projectValue . GetProjectType ( ) . ToStringRussianCulture ( ) } : { context . EncodeTextWithStyle ( projectValue . Name , BotTextStyle . Bold ) } ";
27
+ $ "{ projectValue . GetProjectType ( ) . ToStringRussianCulture ( ) } : { context . CreateBoldText ( projectValue . Name ) } ";
28
28
29
29
private static TimesheetProjectType GetProjectType ( this LookupValue projectValue )
30
30
=>
Original file line number Diff line number Diff line change 12
12
13
13
<ItemGroup >
14
14
<PackageReference Include =" GGroupp.Infra.Bot.Builder.ChatFlow.Step.Card" Version =" 1.2.4" />
15
- <PackageReference Include =" GGroupp.Infra.Bot.Builder.ChatFlow.Step.Lookup" Version =" 2.3.3 " />
15
+ <PackageReference Include =" GGroupp.Infra.Bot.Builder.ChatFlow.Step.Lookup" Version =" 2.3.4 " />
16
16
<PackageReference Include =" GGroupp.Infra.Bot.Builder.ChatFlow.Step.Value" Version =" 2.3.3" />
17
17
<PackageReference Include =" GGroupp.Internal.Timesheet.FavoriteProjectSet.Get.InOut" Version =" 1.8.1" />
18
18
<PackageReference Include =" GGroupp.Internal.Timesheet.ProjectSet.Search.InOut" Version =" 1.3.1" />
Original file line number Diff line number Diff line change 1
1
using System . Globalization ;
2
+ using System . Text ;
3
+ using GGroupp . Infra . Bot . Builder ;
4
+ using Microsoft . Bot . Builder ;
2
5
3
6
namespace GGroupp . Internal . Timesheet ;
4
7
@@ -23,4 +26,12 @@ internal static string ToStringRussianCulture(this TimesheetProjectType projectT
23
26
TimesheetProjectType . Incident => "Инцидент" ,
24
27
_ => "Проект"
25
28
} ;
29
+
30
+ internal static string CreateBoldText ( this ITurnContext turnContext , string message )
31
+ =>
32
+ turnContext . IsNotTelegramChannel ( ) switch
33
+ {
34
+ true => new StringBuilder ( ) . Append ( "**" ) . Append ( message ) . Append ( "**" ) . ToString ( ) ,
35
+ _ => new StringBuilder ( ) . Append ( "<b>" ) . Append ( message ) . Append ( "</b>" ) . ToString ( )
36
+ } ;
26
37
}
You can’t perform that action at this time.
0 commit comments