From 66753889bbd9acb90cc0f6f5160c26b41045cd1f Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Wed, 13 Dec 2023 08:33:14 +0900 Subject: [PATCH] Code refactoring --- lib/oto/commands/util/slack.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/oto/commands/util/slack.dart b/lib/oto/commands/util/slack.dart index c98437d..bdedbda 100644 --- a/lib/oto/commands/util/slack.dart +++ b/lib/oto/commands/util/slack.dart @@ -20,15 +20,9 @@ class Slack extends Command { if (value != null) { message = value as DataSlack; } - } else if (data.message != null) { - message = data.message; - } - - if (message != null) { - await sender.send(message); - } else { - throw Exception('property or message field should not be null'); } + message = data.message; + await sender.send(message); return simpleFuture; }