diff --git a/src/main/kotlin/com/wire/apps/polls/services/UserCommunicationService.kt b/src/main/kotlin/com/wire/apps/polls/services/UserCommunicationService.kt index 12b61ca..f935bea 100644 --- a/src/main/kotlin/com/wire/apps/polls/services/UserCommunicationService.kt +++ b/src/main/kotlin/com/wire/apps/polls/services/UserCommunicationService.kt @@ -22,13 +22,14 @@ class UserCommunicationService( private val version: String ) { private companion object : KLogging() { + private const val WELCOME_TEXT = + "👋 Hi, I'm the Poll App. Thanks for adding me to the conversation.\n" + + "You can use me to create polls directly in Wire.\n" + + "I'm here to help make everyday work a little easier.\n" const val USAGE = "To create poll please text: " + "`/poll \"Question\" \"Option 1\" \"Option 2\"`. To display usage write `/poll help`" - val commands = """ - Following commands are available: - `/poll "Question" "Option 1" "Option 2"` will create poll - `/poll help` to show help - """.trimIndent() + + const val WELCOME_MESSAGE = WELCOME_TEXT + USAGE } /** @@ -38,7 +39,7 @@ class UserCommunicationService( manager: WireApplicationManager, conversationId: QualifiedId ) { - manager.send(textMessage(conversationId, "Hello, I'm Poll App. $USAGE")) + manager.send(textMessage(conversationId, WELCOME_MESSAGE)) logger.info("App sent a welcome message. conversationId: $conversationId") } @@ -69,7 +70,7 @@ class UserCommunicationService( manager: WireApplicationManager, conversationId: QualifiedId ) { - manager.send(textMessage(conversationId, commands)) + manager.send(textMessage(conversationId, USAGE)) } /**