Revert API change of plugins_pre_chat_message_display()

In order to keep the C plugins API stable, we have to revert this part of
the changes done in 16ed7cc187.

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
Steffen Jaeckel
2025-03-13 13:26:05 +01:00
parent a9c601101d
commit 666895905b
3 changed files with 19 additions and 10 deletions

View File

@@ -515,15 +515,15 @@ plugins_on_disconnect(const char* const account_name, const char* const fulljid)
}
char*
plugins_pre_chat_message_display(const char* const barejid, const char* const resource, char* message)
plugins_pre_chat_message_display(const char* const barejid, const char* const resource, const char* message)
{
GList* values = g_hash_table_get_values(plugins);
if (!values) {
return message;
return NULL;
}
char* new_message = NULL;
char* curr_message = message;
char* curr_message = strdup(message);
GList* curr = values;
while (curr) {

View File

@@ -132,7 +132,7 @@ void plugins_on_start(void);
void plugins_on_connect(const char* const account_name, const char* const fulljid);
void plugins_on_disconnect(const char* const account_name, const char* const fulljid);
char* plugins_pre_chat_message_display(const char* const barejid, const char* const resource, char* message);
char* plugins_pre_chat_message_display(const char* const barejid, const char* const resource, const char* message);
void plugins_post_chat_message_display(const char* const barejid, const char* const resource, const char* message);
char* plugins_pre_chat_message_send(const char* const barejid, const char* message);
void plugins_post_chat_message_send(const char* const barejid, const char* message);