mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Reassign stanza name when looking for field values
This commit is contained in:
parent
72a364b65c
commit
a4f6e9391c
@ -167,12 +167,13 @@ form_create(xmpp_stanza_t * const form_stanza)
|
||||
|
||||
// handle repeated field children
|
||||
xmpp_stanza_t *field_child = xmpp_stanza_get_children(field_stanza);
|
||||
child_name = xmpp_stanza_get_name(field_child);
|
||||
while (field_child != NULL) {
|
||||
// handle values
|
||||
if (g_strcmp0(child_name, "value") == 0) {
|
||||
char *value = xmpp_stanza_get_text(field_child);
|
||||
if (value != NULL) {
|
||||
field->values = g_slist_append(field->values, value);
|
||||
field->values = g_slist_append(field->values, strdup(value));
|
||||
xmpp_free(ctx, value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user