Feedback is sent to wrong articleId / replyId
MrOrz opened this issue · 0 comments
When user scrolls back and gives feedback, the feedback will be given to the latest article / reply.
For instance, in the conversation below, when user clicks "yes" circled in red, the feedback will be sent to the circled out reply further below:
If the second selected article have multiple replies, the selectedReplyId
will stay in the previous selection, while the selectedArticleId
in context being updated. This will create an article-reply-feedback to wrong combination of articleId
and replyId
, and chatbot will return "Cannot record your feedback" error. We now have hundreds of such feedback in the database.
Since the buttons comes from the same search session, the old buttons are not blocked.
Suggested fix
In #176 we have addressed that this is an issue. But instead of using JWT (which we want to deprecate), passing articleId
and replyId
right inside the LIFF URL should be enough.
We should also remove the need to use sendMessage
in feedback LIFFs, similar to what we have done in comment LIFFs (discussion).
In this way, we don't need dedicated ASKING_ARTICLE_REPLY_FEEDBACK
state. We can move the share bubble in that state to the right hand side of the card that asks if the reply is useful.