diff --git a/pkg/channels/telegram/telegram_test.go b/pkg/channels/telegram/telegram_test.go index fd5252e07..49eab3ee3 100644 --- a/pkg/channels/telegram/telegram_test.go +++ b/pkg/channels/telegram/telegram_test.go @@ -644,34 +644,34 @@ func TestHandleMessage_ReplyThread_NonForum_NoIsolation(t *testing.T) { } func TestHandleMessage_EmptyContent_Ignored(t *testing.T) { - messageBus := bus.NewMessageBus() - ch := &TelegramChannel{ - BaseChannel: channels.NewBaseChannel("telegram", nil, messageBus, nil), - chatIDs: make(map[string]int64), - ctx: context.Background(), - } + messageBus := bus.NewMessageBus() + ch := &TelegramChannel{ + BaseChannel: channels.NewBaseChannel("telegram", nil, messageBus, nil), + chatIDs: make(map[string]int64), + ctx: context.Background(), + } - // Service message with no text/caption/media (like ForumTopicCreated) - msg := &telego.Message{ - MessageID: 123, - Chat: telego.Chat{ - ID: 456, - Type: "group", - }, - From: &telego.User{ - ID: 789, - FirstName: "User", - }, - } + // Service message with no text/caption/media (like ForumTopicCreated) + msg := &telego.Message{ + MessageID: 123, + Chat: telego.Chat{ + ID: 456, + Type: "group", + }, + From: &telego.User{ + ID: 789, + FirstName: "User", + }, + } - err := ch.handleMessage(context.Background(), msg) - require.NoError(t, err) + err := ch.handleMessage(context.Background(), msg) + require.NoError(t, err) - // Should NOT publish to message bus - select { - case <-messageBus.InboundChan(): - t.Fatal("Empty message should not be published to message bus") - case <-time.After(100 * time.Millisecond): - // nothing was published - } -} \ No newline at end of file + // Should NOT publish to message bus + select { + case <-messageBus.InboundChan(): + t.Fatal("Empty message should not be published to message bus") + case <-time.After(100 * time.Millisecond): + // nothing was published + } +}