Skip to content

Commit 932cd5b

Browse files
committed
works again
1 parent acce8f4 commit 932cd5b

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

templates/copilot/compose.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@
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"
@@ -41,8 +42,6 @@
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"
@@ -78,6 +77,7 @@
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"
@@ -318,6 +318,9 @@
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)
@@ -378,8 +381,10 @@
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') {

0 commit comments

Comments
 (0)