nyaruka / gocommon

Common utility library for the TextIt platform.
Other
7 stars 11 forks source link

add weniwebchat urn #51

Closed rasoro closed 3 years ago

rasoro commented 3 years ago

this new urn is needed for that PR nyaruka/courier#372 in Courier

norkans7 commented 3 years ago

@rasoro how is the weniwebchat validated?

can you add that as done on https://github.com/nyaruka/gocommon/pull/28/files ?

And tests as well

rowanseymour commented 3 years ago

Was chatting with @ericnewcomer about this yesterday and we think the way this would work is as follows:

So say I'm running weni web chat on my "Foo" site, the client code needs to be initialized with

When communicating with courier, the URN then should be something like weniwebchat:123456@foo, so that user 123456 on site foo can have multiple chats which map to the same contact in RP.

Could probably also let the scheme be generic like webchat:123456@foo.. even if we add different webchat channel types, they can still work from the same URN scheme.

rasoro commented 3 years ago

thank you very much for your tip, @norkans7 , it really helped me

rasoro commented 3 years ago

@rowanseymour, Thanks for the sugestion. We discussed it here on our side and we realized that it would really be a good approach if the urn could be used for any other webchat channel types.

matmsa27 commented 3 years ago

URN updated on this commit on Rapidpro django

codecov[bot] commented 3 years ago

Codecov Report

Merging #51 (c89c69d) into main (94ddae9) will increase coverage by 0.04%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
+ Coverage   90.91%   90.96%   +0.04%     
==========================================
  Files          22       22              
  Lines         848      852       +4     
==========================================
+ Hits          771      775       +4     
  Misses         49       49              
  Partials       28       28              
Impacted Files Coverage Δ
urns/urns.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 94ddae9...c89c69d. Read the comment docs.