Skip to content

Commit 5788b13

Browse files
committed
defaults to public channel
1 parent 8141ec8 commit 5788b13

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/meshcore_cli/meshcore_cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ def make_completion_dict(contacts):
178178
for c in it :
179179
contact_list[c[1]['adv_name']] = None
180180

181+
contact_list["public"] = None
182+
contact_list["ch"] = None
183+
contact_list["ch0"] = None
184+
181185
completion_list = {
182186
"to" : contact_list,
183187
"to_ch" : None,
@@ -251,8 +255,9 @@ async def interactive_loop(mc, to=None) :
251255
contact = to
252256
elif len(mc.contacts.items()) == 0 :
253257
contact = {"adv_name" : "public", "type" : 0, "chan_nb" : 0}
254-
else:
255-
contact = next(iter(mc.contacts.items()))[1]
258+
else: # defaults to public chanel
259+
contact = {"adv_name" : "public", "type" : 0, "chan_nb" : 0}
260+
# contact = next(iter(mc.contacts.items()))[1]
256261

257262
try:
258263
while True: # purge msgs

0 commit comments

Comments
 (0)