From 13b1370e35aea230fd0a6fd038909e5346bc4e17 Mon Sep 17 00:00:00 2001 From: bernard-ng Date: Sat, 13 Jul 2024 05:10:36 +0200 Subject: [PATCH 1/2] feat: support telegram topics --- DependencyInjection/Configuration.php | 2 ++ DependencyInjection/MonologExtension.php | 1 + 2 files changed, 3 insertions(+) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index eea9347f..491c8c59 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -365,6 +365,7 @@ * - [disable_notification]: bool, defaults to false, sends the message silently. Users will receive a notification with no sound * - [split_long_messages]: bool, defaults to false, split messages longer than 4096 bytes into multiple messages * - [delay_between_messages]: bool, defaults to false, adds a 1sec delay/sleep between sending split messages + * - [topic]: int, defaults to null, message_thread_id, unique identifier for the target message thread (topic) of the forum; for forum supergroups only * * - sampling: * - handler: the wrapped handler's name @@ -595,6 +596,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->booleanNode('disable_notification')->defaultNull()->end() // telegram ->booleanNode('split_long_messages')->defaultFalse()->end() // telegram ->booleanNode('delay_between_messages')->defaultFalse()->end() // telegram + ->scalarNode('topic')->defaultNull()->end() // telegram ->integerNode('factor')->defaultValue(1)->min(1)->end() // sampling ->arrayNode('tags') // loggly ->beforeNormalization() diff --git a/DependencyInjection/MonologExtension.php b/DependencyInjection/MonologExtension.php index 0e64f088..db1c9e5b 100644 --- a/DependencyInjection/MonologExtension.php +++ b/DependencyInjection/MonologExtension.php @@ -351,6 +351,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler $handler['disable_notification'], $handler['split_long_messages'], $handler['delay_between_messages'], + $handler['topic'] ]); break; From c877e0e23d290a33c2c2d714c125454adbc57d3b Mon Sep 17 00:00:00 2001 From: bernard-ng Date: Wed, 4 Sep 2024 18:46:09 +0200 Subject: [PATCH 2/2] fix ci --- DependencyInjection/MonologExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/MonologExtension.php b/DependencyInjection/MonologExtension.php index c04043e6..974a2824 100644 --- a/DependencyInjection/MonologExtension.php +++ b/DependencyInjection/MonologExtension.php @@ -349,7 +349,7 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler $handler['disable_notification'], $handler['split_long_messages'], $handler['delay_between_messages'], - $handler['topic'] + $handler['topic'], ]); break;