Skip to content

Commit

Permalink
bevent: encode bevent without display name
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Dec 11, 2024
1 parent 9a4db75 commit 6a6e95a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ int odict_encode_bevent(struct odict *od, struct bevent *event)
if (hdr)
err = odict_pl_add(od, "contact", &hdr->val);

err |= odict_pl_add(od, "display", &msg->from.dname);
err |= re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri);
if (pl_isset(&msg->from.dname))
odict_pl_add(od, "display", &msg->from.dname);

err = re_sdprintf(&buf, "%H", uri_encode, &msg->from.uri);
err |= odict_entry_add(od, "from", ODICT_STRING, buf);
mem_deref(buf);
if (err)
Expand Down

0 comments on commit 6a6e95a

Please sign in to comment.