File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 < div class ="row ">
2424 < div class ="col " style ="max-width: 100px ">
2525 < lnbits-qrcode
26- :value ="chatUrl "
26+ :value ="fullChatLink "
2727 class ="rounded-borders "
28+ :show-buttons ="false "
2829 > </ lnbits-qrcode >
2930 </ div >
3031 < div class ="col ">
3132 < div class ="text-h6 q-ml-md "> Trollbox</ div >
3233 < a
33- :href ="chatLink "
34+ :href ="fullChatLink "
3435 class ="text-white "
3536 style ="color: #43a047 "
3637 target ="_blank "
4142 </ div >
4243 </ q-card-section >
4344
44- < q-separator dark inset > </ q-separator >
45-
4645 < q-card-actions >
4746 < div
4847 class ="absolute-bottom q-ml-md q-mb-xs "
7877 < lnbits-qrcode
7978 :value ="'lightning:' + copilot.lnurl "
8079 class ="rounded-borders "
80+ :show-buttons ="false "
8181 > </ lnbits-qrcode >
8282 < center
8383 class ="absolute-bottom "
318318 )
319319 . then ( response => {
320320 this . copilot = response . data
321+ const bytes = new TextEncoder ( ) . encode ( this . copilot . lnurl )
322+ const bech32 = NostrTools . nip19 . encodeBytes ( 'lnurl' , bytes )
323+ this . copilot . lnurl = bech32 . toUpperCase ( )
321324 } )
322325 . catch ( err => {
323326 LNbits . utils . notifyApiError ( err )
378381 addTask ( [ '40%' , '/copilot/static/rick.gif' , res [ 1 ] ] )
379382 }
380383 if ( res [ 0 ] == 'trollbox' ) {
381- this . chat_id = res [ 1 ]
384+ this . chat_id = res [ 1 ] . trim ( )
382385 this . chatLink = '/copilot/chat/' + this . chat_id
386+ this . fullChatLink =
387+ window . location . origin + '/copilot/chat/' + this . chat_id
383388 this . initTrollBox ( )
384389 }
385390 if ( res [ 0 ] == 'trollboxchat' ) {
You can’t perform that action at this time.
0 commit comments