diff --git a/PublishHelperBot/Handlers.fs b/PublishHelperBot/Handlers.fs index e400398..7ffb5cb 100644 --- a/PublishHelperBot/Handlers.fs +++ b/PublishHelperBot/Handlers.fs @@ -34,7 +34,7 @@ let RelayCaptionType (command: string) = | _ when command.StartsWith "\\post" -> WithAuthor | _ -> Unknown -let RelayCaption (name: string, url: string) = $" Прислал {name}" +let RelayCaption (name: string, url: string) = $"Прислал {name}" let RelayParseMode = ParseMode.Html; let RelayResolveCaption (mode: RelayCaptionMode, username: string, linkUrl: string) = @@ -52,7 +52,7 @@ let public RelayMatch: HandlerRequirements = fun (u, c) -> let public RelayHandler: Handler = fun (u, c, tg) -> let reply = u.Message.ReplyToMessage let channelId = c.chanelId - let author = reply.From.FirstName + let author = $"{reply.From.FirstName} {reply.From.LastName}" let captionMode = RelayCaptionType u.Message.Text let photoMedia = lazy Array.get (ExtractPhotoFromMessage reply) 0 diff --git a/PublishHelperBot/Program.fs b/PublishHelperBot/Program.fs index 16231a6..c006fdc 100644 --- a/PublishHelperBot/Program.fs +++ b/PublishHelperBot/Program.fs @@ -14,7 +14,7 @@ open Telegram.Bot.Types.Enums let CreateBot (config: BotConfig, http: HttpClient) = TelegramBotClient(config.token, http) let config = CreateConfig <| "SBPB_CONFIG_PATH"; let botClient = CreateBot <| (config, new HttpClient()) -let startDate = DateTime.Now +let startDate = DateTime.UtcNow let updateHandle (bc: ITelegramBotClient) (u: Update) (ct: CancellationToken): Task = match u with