Use uuid in create_unique_id instead of counter

Message IDs should be unique so they can be used by XEPs like delivery receipts, chat markers, message correction.

So far it used a counter so restarting profanity will cause the counter
to be 0 again.

Let's rather use an UUID since we have such a function in the
xmpp/xmpp.h already.

Closes https://github.com/boothj5/profanity/issues/998
This commit is contained in:
Michael Vetter
2018-08-14 15:49:25 +02:00
parent bcaf55e5b8
commit f4fb61b0c8
2 changed files with 7 additions and 12 deletions

View File

@@ -94,7 +94,6 @@ gboolean release_is_new(char *found_version);
char* p_sha1_hash(char *str);
char* create_unique_id(char *prefix);
void reset_unique_id(void);
char* get_file_or_linked(char *loc, char *basedir);
char* strip_arg_quotes(const char *const input);