Skip to content

Commit e7e1275

Browse files
committed
fix issue with scope
1 parent 8349b27 commit e7e1275

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "meshcore-cli"
7-
version = "1.2.10"
7+
version = "1.2.11"
88
authors = [
99
{ name="Florent de Lamotte", email="[email protected]" },
1010
]

src/meshcore_cli/meshcore_cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from meshcore import MeshCore, EventType, logger
3434

3535
# Version
36-
VERSION = "v1.2.10"
36+
VERSION = "v1.2.11"
3737

3838
# default ble address is stored in a config file
3939
MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/"
@@ -720,6 +720,7 @@ async def interactive_loop(mc, to=None) :
720720
prev_contact = None
721721

722722
scope = await set_scope(mc, "*")
723+
prev_scope = scope
723724

724725
await get_contacts(mc, anim=True)
725726
await get_channels(mc, anim=True)
@@ -937,7 +938,7 @@ def _(event):
937938
nc["adv_name"] = mc.channels[dest]["channel_name"]
938939
elif dest == ".." : # previous recipient
939940
nc = prev_contact
940-
if dest_scope is None and not scope is None:
941+
if dest_scope is None and not prev_scope is None:
941942
dest_scope = prev_scope
942943
elif dest == "~" or dest == "/" or dest == mc.self_info['name']:
943944
nc = None

0 commit comments

Comments
 (0)