mirror of
https://github.com/profanity-im/profanity.git
synced 2025-02-02 15:08:15 -05:00
Moved incoming message code to profanity module
This commit is contained in:
parent
79796ca129
commit
9f00ef14d2
@ -311,8 +311,7 @@ _jabber_message_handler(xmpp_conn_t * const conn,
|
|||||||
} else if (xmpp_stanza_get_child_by_name(stanza, "composing") != NULL) {
|
} else if (xmpp_stanza_get_child_by_name(stanza, "composing") != NULL) {
|
||||||
// composing
|
// composing
|
||||||
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
||||||
win_show_typing(from);
|
prof_handle_typing(from);
|
||||||
win_page_off();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,8 +325,7 @@ _jabber_message_handler(xmpp_conn_t * const conn,
|
|||||||
|
|
||||||
char *message = xmpp_stanza_get_text(body);
|
char *message = xmpp_stanza_get_text(body);
|
||||||
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
||||||
win_show_incomming_msg(from, message);
|
prof_handle_incoming_message(from, message);
|
||||||
win_page_off();
|
|
||||||
|
|
||||||
if (prefs_get_chlog()) {
|
if (prefs_get_chlog()) {
|
||||||
char from_cpy[strlen(from) + 1];
|
char from_cpy[strlen(from) + 1];
|
||||||
|
@ -179,6 +179,20 @@ _process_input(char *inp)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
prof_handle_typing(char *from)
|
||||||
|
{
|
||||||
|
win_show_typing(from);
|
||||||
|
win_page_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
prof_handle_incoming_message(char *from, char *message)
|
||||||
|
{
|
||||||
|
win_show_incomming_msg(from, message);
|
||||||
|
win_page_off();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_create_config_directory()
|
_create_config_directory()
|
||||||
{
|
{
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
void profanity_init(const int disable_tls, char *log_level);
|
void profanity_init(const int disable_tls, char *log_level);
|
||||||
void profanity_run(void);
|
void profanity_run(void);
|
||||||
|
void prof_handle_typing(char *from);
|
||||||
|
void prof_handle_incoming_message(char *from, char *message);
|
||||||
void profanity_shutdown_init(void);
|
void profanity_shutdown_init(void);
|
||||||
void profanity_shutdown(void);
|
void profanity_shutdown(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user