tn-cli .use question

12 views
Skip to first unread message

Chariton

unread,
Mar 8, 2024, 4:17:31 AMMar 8
to Tinode General
In the tn-cli commands below, why is it that ".use --user=$meta.sub[0].user_id" doesn't work, but ".use --user=usrMZbBHCkAkuQ" works?

I would like to have it automated, so that I don't have to enter the specific user_id. Is there any way to use a variable to automatically put in the user_id for the ".use --user=" command?

tn> .must sub fnd
<= 200 ok (fnd)
tn> .must set fnd --public=basic:testUser
<= 200 ok (fnd)
tn> .must $meta get fnd --sub
<= meta sub fnd
tn> .log $meta.sub[0].user_id
<= usrMZbBHCkAkuQ
tn> .use --user=$meta.sub[0].user_id
<= Error: user ID '$meta.sub[0].user_id' is invalid
<= Default user='None'
tn> .use --user=usrMZbBHCkAkuQ
<= Default user='usrMZbBHCkAkuQ'

Gene

unread,
Mar 8, 2024, 11:44:34 AMMar 8
to Tinode General
I guess it just has not been done. It's either a bug or a missing feature. You are welcome to send a pull request.
Reply all
Reply to author
Forward
0 new messages