How to set user public field from tn-cli

38 views
Skip to first unread message

kmata53

unread,
Apr 12, 2022, 7:48:31 AM4/12/22
to Tinode General
My script is this:

.must login root:root
.use --user usrOoxB3WgtcJA
.must sub me
.must set me --public='{"fn":"Eric","photo":{"ref":"https://link.to.image.jpg"}}'
.must leave me
.use --user ""

The problem is that instead of saving a JSON into the database(mysql), a string containing the JSON is saved.

Another thing I tried and it didn't work is using the usermod macro. It requires the profile photo to be a local file and I need it to work with URLs.

Gene

unread,
Apr 12, 2022, 12:18:46 PM4/12/22
to Tinode General
Would you like to send a pull request?

kmata53

unread,
Apr 14, 2022, 2:59:20 AM4/14/22
to Tinode General
No, I would, first, like to know if it's a problem with my script.

Gene

unread,
Apr 14, 2022, 12:47:52 PM4/14/22
to Tinode General
There is no problem with your script. tn-cli does not support it out of the box.

Gene

unread,
Apr 24, 2022, 5:46:24 PM4/24/22
to Tinode General
Reply all
Reply to author
Forward
0 new messages