1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-28 22:06:38 +02:00

relay/api: add support of time displayed in remote client buffers

This commit is contained in:
Sébastien Helleu
2024-08-10 14:29:30 +02:00
parent aeac9f02f9
commit 8010eeece3
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
- core: allow mask in command `/item refresh`
- relay: enable websocket extension "permessage-deflate" with "api" relay only ([#1549](https://github.com/weechat/weechat/issues/1549))
- relay/api: add field "hidden" in GET /api/buffers, add support of hidden buffers in remote client ([#2159](https://github.com/weechat/weechat/issues/2159))
- relay/api: add field "time_displayed" in GET /api/buffers
- relay/api: add field "time_displayed" in GET /api/buffers, add support of time displayed in remote client buffers
- relay/weechat: add line id in buffer lines sent to clients
- relay: display connection status in output of commands `/remote list` and `/remote listfull`
- relay: add option `reconnect` in command `/remote` ([#2160](https://github.com/weechat/weechat/issues/2160))
@@ -95,6 +95,7 @@ relay_api_protocol_signal_buffer_cb (const void *pointer, void *data,
|| (strcmp (signal, "buffer_renamed") == 0)
|| (strcmp (signal, "buffer_title_changed") == 0)
|| (strcmp (signal, "buffer_modes_changed") == 0)
|| (strcmp (signal, "buffer_time_for_each_line_changed") == 0)
|| (strncmp (signal, "buffer_localvar_", 16) == 0)
|| (strcmp (signal, "buffer_cleared") == 0)
|| (strcmp (signal, "buffer_closing") == 0)
@@ -842,8 +842,8 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
const char *ptr_key, *ptr_command;
char *full_name, str_number[64], str_local_var[1024], *property;
long long id;
int number, hidden, nicklist;
int nicklist_case_sensitive, nicklist_display_groups;
int number, hidden, nicklist, nicklist_case_sensitive;
int nicklist_display_groups, time_displayed;
int apply_props, input_position, input_multiline;
if (!event->json)
@@ -864,6 +864,7 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
JSON_GET_BOOL(event->json, nicklist);
JSON_GET_BOOL(event->json, nicklist_case_sensitive);
JSON_GET_BOOL(event->json, nicklist_display_groups);
JSON_GET_BOOL(event->json, time_displayed);
buffer_props = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -887,6 +888,8 @@ RELAY_REMOTE_EVENT_CALLBACK(buffer)
(nicklist_case_sensitive) ? "1" : "0");
weechat_hashtable_set (buffer_props, "nicklist_display_groups",
(nicklist_display_groups) ? "1" : "0");
weechat_hashtable_set (buffer_props, "time_for_each_line",
(time_displayed) ? "1" : "0");
/* extra properties for relay */
weechat_hashtable_set (buffer_props,