The client can send feedback for a message response to the endpoint /conversation/<id>. This feedback is saved into the DB. It can be configured via the Masdif configuration file, if client feedback is forwarded to the dialog system or if it should be only saved into DB. If feedback is provided, the message payload that the client sends needs to contain a message_id of a previously received message.
If the message_id is provided, but the body of the request doesn't contain the required format /feedback{"value":"someval"}, an error is returned. Errors are also returned in case the message_id isn't present, but the feedback paylod is sent.
add test cases for good and bad feedback paths, also add test fixtures
fix mandatory field checks for #check_bot_response and change a button initiating message
move feedback column from model Conversation to model Message, add migration and update fixtures + code
add default configuration for Rails.application.config.masdif[:feedback]
provide message_id: to response (issue #32)
Refactor out all private methods of ConversationController to ConversationConcern module and clean up
The client can send feedback for a message response to the endpoint
/conversation/<id>
. This feedback is saved into the DB. It can be configured via the Masdif configuration file, if client feedback is forwarded to the dialog system or if it should be only saved into DB. If feedback is provided, the message payload that the client sends needs to contain amessage_id
of a previously received message.If the
message_id
is provided, but the body of the request doesn't contain the required format/feedback{"value":"someval"}
, an error is returned. Errors are also returned in case themessage_id
isn't present, but the feedback paylod is sent.#check_bot_response
and change a button initiating messageMessage
, add migration and update fixtures + codeRails.application.config.masdif[:feedback]
message_id:
to response (issue #32)ConversationController
toConversationConcern
module and clean upThis PR closes #30, #32