owntracks / talk

Questions, talk about OwnTracks
32 stars 4 forks source link

Cards in http payload #44

Closed mbirth closed 6 years ago

mbirth commented 6 years ago

The booklet says we can also return cards in a HTTP response, yet the JSON structure only lists name and face for a card. How do I map a card to a tid or user in HTTP mode?

jpmens commented 6 years ago

You are correct: the documentation is incomplete. I've just checked the Recorder's source, in which I write:

Each of the objects in this array must contain a TID as the apps will use that to construct a ficticious topic name (owntracks/_http/) internally.

So, to answer your question, you need the tid element in the JSON.

I'd appreciate you testing that for veracity (and if possible providing either a small pull request for the booklet, or a short note here for us to update the documentation)

mbirth commented 6 years ago

Got around to test it and it works. Names and faces are shown properly.

Am I correct that with the Android app it's currently not possible to map tids to an address book contact? Since each face adds ~15+ kB to the payload, that would be preferable.

jpmens commented 6 years ago

I cannot remember. @growse, @binarybucks could you chip in please?

binarybucks commented 6 years ago

No it’s not. The API for that is a complete train wreck and we never really got it to work reliably