IDEMSInternational / parenttext-china

0 stars 0 forks source link

CODE: Implement edit to replace quick replies with html #1

Closed fagiothree closed 9 months ago

fagiothree commented 10 months ago

The RapidPro-Wechat integration is not fully developed and quick replies are not supported. However WeChat supports html so as a way around it, we can add a feature to the code for handling quick replies so that:

  1. quick replies are always removed from every node
  2. quick replies are added back into the message text embedded into html (see format below)
  3. wait for response nodes are not edited because clicking on the quick reply in html sends the message

<a href=""weixin://bizmsgmenu?msgmenucontent=The parameters filled in here represent what the user is sending.&msgmenuid=projectid"">The parameters filled in here represent what the link displays."

video demonstration: https://drive.google.com/file/d/1VGISDf4p0iFSkCHclD-yUxM-7IxEalkI/view?usp=sharing

edmoss345 commented 10 months ago

Believe the above PR gives the desired functionality but need to do some further testing

edmoss345 commented 10 months ago

Have tested the new functions as part of https://github.com/IDEMSInternational/idems_translation/pull/56, and the code is doing what I expect, but need to confirm that this is what is required. Below are some screenshots of what happens to the flow in RapidPro, I can't easily test these in WeChat, but could we maybe share this issue with the China team to confirm this is expected behaviour? There are also JSON test files added as part of this PR which are example before and after results, perhaps we could share theses with the China team for them to verify that they are functional on WeChat, would appreciate your thoughts @fagiothree

Before change image

After change image

fagiothree commented 9 months ago

Sent email to Zuyi and Wenhao to ask for help reviewing the html expression

edmoss345 commented 9 months ago

After feedback from China team, have made some changes and retested in WeChat and everything seems to be working as expected. Will make some associated PRs to get this into the pipeline

edmoss345 commented 9 months ago

Update to china repo PR https://github.com/IDEMSInternational/parenttext-china/pull/30

Update to pipeline repo PR https://github.com/IDEMSInternational/parenttext-pipeline/pull/72