Refactored muc_room_is_active to only take room, rather than full jid

This commit is contained in:
James Booth
2014-03-08 21:20:26 +00:00
parent dd1ee18c72
commit b177250f47
11 changed files with 19 additions and 27 deletions

View File

@@ -386,7 +386,7 @@ _groupchat_handler(xmpp_conn_t * const conn,
}
// room not active in profanity
if (!muc_room_is_active(jid)) {
if (!muc_room_is_active(jid->barejid)) {
log_error("Message recieved for inactive chat room: %s", jid->str);
jid_destroy(jid);
return 1;
@@ -438,7 +438,7 @@ _chat_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
return 1;
// private message from chat room use full jid (room/nick)
} else if (muc_room_is_active(jid)) {
} else if (muc_room_is_active(jid->barejid)) {
// determine if the notifications happened whilst offline
GTimeVal tv_stamp;
gboolean delayed = stanza_get_delay(stanza, &tv_stamp);