diff options
author | Jacki <jacki@thejackimonster.de> | 2024-01-20 10:53:28 +0100 |
---|---|---|
committer | Jacki <jacki@thejackimonster.de> | 2024-01-20 10:53:28 +0100 |
commit | 8641d0af12d460e251924ab1b1e1549825911833 (patch) | |
tree | 68dea9a7d0d27b4104b8d034c66ea657d48c10cf | |
parent | 1d1129fb6c72cdd6902ace7a1a19dfcdf95a37ba (diff) | |
download | libgnunetchat-8641d0af12d460e251924ab1b1e1549825911833.tar.gz libgnunetchat-8641d0af12d460e251924ab1b1e1549825911833.zip |
Use new function to delete messages
Signed-off-by: Jacki <jacki@thejackimonster.de>
-rw-r--r-- | src/gnunet_chat_lib.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c index 1c0dcd9..0310f55 100644 --- a/src/gnunet_chat_lib.c +++ b/src/gnunet_chat_lib.c | |||
@@ -1786,12 +1786,7 @@ GNUNET_CHAT_message_delete (const struct GNUNET_CHAT_Message *message, | |||
1786 | if ((!message) || (!(message->msg)) || (!(message->context))) | 1786 | if ((!message) || (!(message->msg)) || (!(message->context))) |
1787 | return GNUNET_SYSERR; | 1787 | return GNUNET_SYSERR; |
1788 | 1788 | ||
1789 | struct GNUNET_MESSENGER_Message msg; | 1789 | GNUNET_MESSENGER_delete_message(message->context->room, &(message->hash), delay); |
1790 | msg.header.kind = GNUNET_MESSENGER_KIND_DELETE; | ||
1791 | GNUNET_memcpy(&(msg.body.deletion.hash), &(message->hash), sizeof(message->hash)); | ||
1792 | msg.body.deletion.delay = GNUNET_TIME_relative_hton(delay); | ||
1793 | |||
1794 | GNUNET_MESSENGER_send_message(message->context->room, &msg, NULL); | ||
1795 | return GNUNET_OK; | 1790 | return GNUNET_OK; |
1796 | } | 1791 | } |
1797 | 1792 | ||