mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
room_chat: rename room_is_active
This commit is contained in:
parent
3436a2245d
commit
7c85f0fcb2
11
src/jabber.c
11
src/jabber.c
@ -375,14 +375,11 @@ static int
|
||||
_message_handler(xmpp_conn_t * const conn,
|
||||
xmpp_stanza_t * const stanza, void * const userdata)
|
||||
{
|
||||
char *type = NULL;
|
||||
char *from = NULL;
|
||||
|
||||
type = xmpp_stanza_get_attribute(stanza, "type");
|
||||
from = xmpp_stanza_get_attribute(stanza, "from");
|
||||
gchar *type = xmpp_stanza_get_attribute(stanza, "type");
|
||||
gchar *from = xmpp_stanza_get_attribute(stanza, "from");
|
||||
|
||||
// handle groupchat messages
|
||||
if (room_jid_is_room_chat(from)) {
|
||||
if (room_is_active(from)) {
|
||||
xmpp_stanza_t *delay = xmpp_stanza_get_child_by_name(stanza, "delay");
|
||||
|
||||
// handle chat room history
|
||||
@ -633,7 +630,7 @@ _presence_handler(xmpp_conn_t * const conn,
|
||||
|
||||
char *from = xmpp_stanza_get_attribute(stanza, "from");
|
||||
|
||||
if (room_jid_is_room_chat(from)) {
|
||||
if (room_is_active(from)) {
|
||||
char **tokens = g_strsplit(from, "/", 0);
|
||||
char *room_jid = tokens[0];
|
||||
char *nick = tokens[1];
|
||||
|
@ -56,7 +56,7 @@ room_leave(const char * const jid)
|
||||
}
|
||||
|
||||
gboolean
|
||||
room_jid_is_room_chat(const char * const jid)
|
||||
room_is_active(const char * const jid)
|
||||
{
|
||||
char **tokens = g_strsplit(jid, "/", 0);
|
||||
char *jid_part = tokens[0];
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
void room_join(const char * const jid, const char * const nick);
|
||||
void room_leave(const char * const jid);
|
||||
gboolean room_jid_is_room_chat(const char * const jid);
|
||||
gboolean room_is_active(const char * const jid);
|
||||
char * room_get_nick_for_room(const char * const jid);
|
||||
gboolean room_parse_room_jid(const char * const room_jid, char **room,
|
||||
char **nick);
|
||||
|
@ -200,7 +200,7 @@ win_in_chat(void)
|
||||
int
|
||||
win_in_groupchat(void)
|
||||
{
|
||||
if (room_jid_is_room_chat(_wins[_curr_prof_win].from)) {
|
||||
if (room_is_active(_wins[_curr_prof_win].from)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user