Added otr_tag_message, removed commands.c dependency on libotr

This commit is contained in:
James Booth
2015-03-16 21:41:35 +00:00
parent ec57c72fb4
commit 11966d39b0
4 changed files with 23 additions and 11 deletions

View File

@@ -365,6 +365,18 @@ otr_key_loaded(void)
return data_loaded;
}
char *
otr_tag_message(const char * const msg)
{
GString *otr_message = g_string_new(msg);
g_string_append(otr_message, OTRL_MESSAGE_TAG_BASE);
g_string_append(otr_message, OTRL_MESSAGE_TAG_V2);
char *result = otr_message->str;
g_string_free(otr_message, FALSE);
return result;
}
gboolean
otr_is_secure(const char * const recipient)
{

View File

@@ -58,6 +58,8 @@ void otr_poll(void);
void otr_on_connect(ProfAccount *account);
void otr_keygen(ProfAccount *account);
char* otr_tag_message(const char * const msg);
gboolean otr_key_loaded(void);
gboolean otr_is_secure(const char * const recipient);