From 6526cc230a80d8aa05d36c70c1d97f0e7ccf182d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 5 May 2024 23:07:42 +0200 Subject: relay/api: add input fields in GET /api/buffers New fields returned: - "input" (string): content of input - "input_position" (integer): position in input (starts at 0) - "input_multiline" (boolean): true if the buffer allows multiline input --- src/plugins/relay/api/relay-api-msg.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/plugins/relay/api/relay-api-msg.c b/src/plugins/relay/api/relay-api-msg.c index 71b990b02..95eb53617 100644 --- a/src/plugins/relay/api/relay-api-msg.c +++ b/src/plugins/relay/api/relay-api-msg.c @@ -385,6 +385,9 @@ relay_api_msg_buffer_to_json (struct t_gui_buffer *buffer, lines = lines_free; MSG_ADD_STR_PTR("type", ptr_string); MSG_ADD_HDATA_STR_COLORS("title", "title"); + MSG_ADD_HDATA_STR("input", "input_buffer"); + MSG_ADD_HDATA_VAR(Number, "input_position", integer, "input_buffer_pos"); + MSG_ADD_HDATA_VAR(Bool, "input_multiline", integer, "input_multiline"); MSG_ADD_HDATA_VAR(Bool, "nicklist", integer, "nicklist"); MSG_ADD_HDATA_VAR(Bool, "nicklist_case_sensitive", integer, "nicklist_case_sensitive"); MSG_ADD_HDATA_VAR(Bool, "nicklist_display_groups", integer, "nicklist_display_groups"); -- cgit v1.2.3