Skip to content

Commit 348d266

Browse files
committed
Keep beam dms, until synced with mobile
1 parent f82aa02 commit 348d266

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/backend/beam.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const beam_event = (beam, chat, key) => {
133133
if (str === "Ping") return
134134
if (check_data_message(str, addr)) return
135135
let hash = str.substring(0,64)
136-
decrpyt_beam_message(str.substring(65), msgKey)
136+
decrpyt_beam_message(str, msgKey)
137137
})
138138

139139
beam.on('end', () => {

src/backend/messages.cjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ ipcMain.on('end-swarm', async (e, key) => {
205205
})
206206

207207
const peer_dms = async () => {
208+
//TODO ***
209+
return
208210
const contacts = await getConversations()
209211
for (const c of contacts) {
210212
const hashDerivation = await key_derivation_hash(c.chat)
@@ -628,7 +630,7 @@ async function send_message(message, receiver, off_chain = false, group = false,
628630
//Offchain messages
629631
let random_key = randomKey()
630632
let sentMsg = Buffer.from(payload_hex, 'hex')
631-
let sendMsg = random_key + sentMsg
633+
let sendMsg = random_key + '99' + sentMsg
632634
if (beam_this) {
633635
send_beam_message(sendMsg, address, timestamp)
634636
return

src/routes/+layout.svelte

-5
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,9 @@
418418
})
419419
420420
window.api.receive('stop-beam', (addr, close = false) => {
421-
if (!close) {
422-
const restart = $beam.active.find(a => a.chat === addr)
423-
window.api.createBeam(restart.hugin)
424-
}
425421
let filter = $beam.active.filter(a => a.chat !== addr)
426422
$beam.active = filter
427423
console.log('active beams', $beam.active)
428-
if (!close) return
429424
toast.error('Beam disconnected', {
430425
position: 'top-right',
431426
style: 'border-radius: 5px; background: #171717; border: 1px solid #252525; color: #fff;',

0 commit comments

Comments
 (0)