From acfb5a7638c566923217826e84e74ea55cfce1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 26 Jun 2020 08:03:15 +0200 Subject: [PATCH] relay: add missing field "notify_level" in message "_buffer_line_added" (issue #1529) --- ChangeLog.adoc | 1 + doc/en/weechat_relay_protocol.en.adoc | 3 +++ doc/fr/weechat_relay_protocol.fr.adoc | 21 +++++++++++-------- doc/ja/weechat_relay_protocol.ja.adoc | 4 ++++ .../relay/weechat/relay-weechat-protocol.c | 5 +++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index f2b287653..42f2fa760 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -73,6 +73,7 @@ Bug fixes:: * irc: fix realname delimiter color in WHO/WHOX response (issue #1497) * irc: reuse a buffer with wrong type "channel" when a private message is received (issue #869) * python: fix crash when invalid UTF-8 string is in a WeeChat hashtable converted to a Python dict (issue #1463) + * relay: add missing field "notify_level" in message "_buffer_line_added" (issue #1529) * relay: fix slow send of data to clients when SSL is enabled * trigger: only return trigger's return code when condition evaluates to true (issue #592) * trigger: fix truncated trigger command with commands /trigger input|output|recreate diff --git a/doc/en/weechat_relay_protocol.en.adoc b/doc/en/weechat_relay_protocol.en.adoc index 102692061..8a6d94fcd 100644 --- a/doc/en/weechat_relay_protocol.en.adoc +++ b/doc/en/weechat_relay_protocol.en.adoc @@ -2010,6 +2010,7 @@ Data sent as hdata: | date | time | Date of message. | date_printed | time | Date when WeeChat displayed message. | displayed | char | 1 if message is displayed, 0 if message is filtered (hidden). +| notify_level | char | Notify level: -1 = notify disabled, 0 = low, 1 = message, 2 = private, 3 = highlight. | highlight | char | 1 if line has a highlight, otherwise 0. | tags_array | array of strings | List of tags for line. | prefix | string | Prefix. @@ -2027,6 +2028,7 @@ hda: 'date': 'tim', 'date_printed': 'tim', 'displayed': 'chr', + 'notify_level': 'chr', 'highlight': 'chr', 'tags_array': 'arr', 'prefix': 'str', @@ -2039,6 +2041,7 @@ hda: date: 1362728993 date_printed: 1362728993 displayed: 1 + notify_level: 1 highlight: 0 tags_array: [ 'irc_privmsg', diff --git a/doc/fr/weechat_relay_protocol.fr.adoc b/doc/fr/weechat_relay_protocol.fr.adoc index 3f2b8d5be..977fa146b 100644 --- a/doc/fr/weechat_relay_protocol.fr.adoc +++ b/doc/fr/weechat_relay_protocol.fr.adoc @@ -2030,15 +2030,16 @@ Données envoyées dans le hdata : [width="100%",cols="3m,2,10",options="header"] |=== -| Nom | Type | Description -| buffer | pointeur | Pointeur vers le tampon. -| date | date/heure | Date du message. -| date_printed | date/heure | Date d'affichage du message. -| displayed | caractère | 1 si le message est affiché, 0 si le message est filtré (caché). -| highlight | caractère | 1 si la ligne a un highlight, sinon 0. -| tags_array | tableau de chaînes | Liste des étiquettes de la ligne. -| prefix | chaîne | Préfixe. -| message | chaîne | Message. +| Nom | Type | Description +| buffer | pointeur | Pointeur vers le tampon. +| date | date/heure | Date du message. +| date_printed | date/heure | Date d'affichage du message. +| displayed | caractère | 1 si le message est affiché, 0 si le message est filtré (caché). +| notify_level | caractère | Niveau de notification : -1 = notification désactivée, 0 = bas, 1 = message, 2 = privé, 3 = highlight. +| highlight | caractère | 1 si la ligne a un highlight, sinon 0. +| tags_array | tableau de chaînes | Liste des étiquettes de la ligne. +| prefix | chaîne | Préfixe. +| message | chaîne | Message. |=== Exemple : nouveau message _hello!_ du pseudo _FlashCode_ sur le tampon @@ -2053,6 +2054,7 @@ hda: 'date': 'tim', 'date_printed': 'tim', 'displayed': 'chr', + 'notify_level': 'chr', 'highlight': 'chr', 'tags_array': 'arr', 'prefix': 'str', @@ -2065,6 +2067,7 @@ hda: date: 1362728993 date_printed: 1362728993 displayed: 1 + notify_level: 1 highlight: 0 tags_array: [ 'irc_privmsg', diff --git a/doc/ja/weechat_relay_protocol.ja.adoc b/doc/ja/weechat_relay_protocol.ja.adoc index e37f02c84..bdf3a4e34 100644 --- a/doc/ja/weechat_relay_protocol.ja.adoc +++ b/doc/ja/weechat_relay_protocol.ja.adoc @@ -2034,6 +2034,8 @@ hdata として送られるデータ: | date | time | メッセージの日付 | date_printed | time | WeeChat メッセージを表示した日付 | displayed | char | メッセージが表示される場合は 1、メッセージがフィルタされる (隠される) 場合は 0 +// TRANSLATION MISSING +| notify_level | char | Notify level: -1 = notify disabled, 0 = low, 1 = message, 2 = private, 3 = highlight. | highlight | char | 行がハイライト部分を含む場合は 1、それ以外は 0 | tags_array | string の配列 | 行に対するタグのリスト | prefix | string | プレフィックス @@ -2051,6 +2053,7 @@ hda: 'date': 'tim', 'date_printed': 'tim', 'displayed': 'chr', + 'notify_level': 'chr', 'highlight': 'chr', 'tags_array': 'arr', 'prefix': 'str', @@ -2063,6 +2066,7 @@ hda: date: 1362728993 date_printed: 1362728993 displayed: 1 + notify_level: 1 highlight: 0 tags_array: [ 'irc_privmsg', diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c index e833d5277..ae2e4ab0c 100644 --- a/src/plugins/relay/weechat/relay-weechat-protocol.c +++ b/src/plugins/relay/weechat/relay-weechat-protocol.c @@ -1140,8 +1140,9 @@ relay_weechat_protocol_signal_buffer_cb (const void *pointer, void *data, (unsigned long)ptr_line_data); relay_weechat_msg_add_hdata (msg, cmd_hdata, "buffer,date,date_printed," - "displayed,highlight,tags_array," - "prefix,message"); + "displayed,notify_level," + "highlight,tags_array,prefix," + "message"); relay_weechat_msg_send (ptr_client, msg); relay_weechat_msg_free (msg); }