mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
message.c: Adjust function formatting
This commit is contained in:
parent
26d4b00d6d
commit
10190b5fb0
@ -1377,7 +1377,9 @@ _handle_chat(xmpp_stanza_t *const stanza, gboolean is_mam)
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void _handle_ox_chat(xmpp_stanza_t *const stanza, ProfMessage *message, gboolean is_mam) {
|
static void
|
||||||
|
_handle_ox_chat(xmpp_stanza_t *const stanza, ProfMessage *message, gboolean is_mam)
|
||||||
|
{
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
xmpp_stanza_t *ox = stanza_get_child_by_name_and_ns(stanza, "openpgp", STANZA_NS_OPENPGP_0);
|
xmpp_stanza_t *ox = stanza_get_child_by_name_and_ns(stanza, "openpgp", STANZA_NS_OPENPGP_0);
|
||||||
message->plain = p_ox_gpg_decrypt(xmpp_stanza_get_text(ox));
|
message->plain = p_ox_gpg_decrypt(xmpp_stanza_get_text(ox));
|
||||||
@ -1485,16 +1487,18 @@ message_is_sent_by_us(const ProfMessage *const message, bool checkOID) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBGPGME
|
#ifdef HAVE_LIBGPGME
|
||||||
xmpp_stanza_t* _openpgp_signcrypt(xmpp_ctx_t* ctx, const char* const to, const char* const text) {
|
xmpp_stanza_t*
|
||||||
|
_openpgp_signcrypt(xmpp_ctx_t* ctx, const char* const to, const char* const text)
|
||||||
time_t now = time(NULL);
|
{
|
||||||
struct tm* tm = localtime(&now);
|
time_t now = time(NULL);
|
||||||
char buf[255];
|
struct tm* tm = localtime(&now);
|
||||||
strftime(buf, sizeof(buf), "%FT%T%z", tm);
|
char buf[255];
|
||||||
|
strftime(buf, sizeof(buf), "%FT%T%z", tm);
|
||||||
int randnr = rand() % 5;
|
int randnr = rand() % 5;
|
||||||
char rpad_data[randnr];
|
char rpad_data[randnr];
|
||||||
|
|
||||||
for(int i = 0; i < randnr-1; i++) {
|
for(int i = 0; i < randnr-1; i++) {
|
||||||
rpad_data[i] = 'c';
|
rpad_data[i] = 'c';
|
||||||
}
|
}
|
||||||
rpad_data[randnr-1] = '\0';
|
rpad_data[randnr-1] = '\0';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user