Headless: alias missing from contacts response when same as author's name
In headless' readme an example of a response is shown that contains the key alias
. When alias
is the same as author->name
, Briar headless leaves out the alias
key and only answers with author->name
.
Steps to reproduce
Add a contact remotely and give it an alias equal to the contact's self chosen nickname.
Excepted behavior
Both @fphemeral and I thought that the response would always contain an alias. At least when the user gives the contact an alias.
Actual behavior
If alias
matches author->name
, alias
is dropped from the response.
Proposed solution
Either explicitly state in the documentation that the alias
key is not guaranteed to get delivered all the time, or change the output to always contain an alias
key.
Related resources
- the commit where I added a check for this in Briar GTK
- my proposed merge request at briar_repl