From 65fc0ba726b9c0ee087e3e819029a4f5fb561796 Mon Sep 17 00:00:00 2001 From: amjed alqasemi <59507561+aqasemi@users.noreply.github.com> Date: Sat, 17 Aug 2024 22:47:27 +0300 Subject: [PATCH] Fix: logical bug. if no JID provided getFirstDevice instead of creating new one --- goneonize/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/goneonize/main.go b/goneonize/main.go index 530c47e..ba2b3bf 100644 --- a/goneonize/main.go +++ b/goneonize/main.go @@ -159,7 +159,7 @@ func Neonize(db *C.char, id *C.char, JIDByte *C.uchar, JIDSize C.int, logLevel * } deviceStore, err_device = container.GetDevice(utils.DecodeJidProto(&JID)) } else { - deviceStore, err_device = container.NewDevice(), nil + deviceStore, err_device = container.GetFirstDevice(), nil } if err_device != nil { panic(err)