mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 16:26:21 +00:00
Add xep-0107: User Mood support
Implementation of XEP 0107 - User Mood
This commit is contained in:
committed by
Michael Vetter
parent
9a9122c148
commit
23e886ed5e
@@ -161,8 +161,13 @@ _message_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* con
|
||||
} else if (type && g_strcmp0(type, STANZA_TYPE_GROUPCHAT) == 0) {
|
||||
// XEP-0045: Multi-User Chat
|
||||
_handle_groupchat(stanza);
|
||||
|
||||
} else if (type && g_strcmp0(type, STANZA_TYPE_HEADLINE) == 0) {
|
||||
_handle_headline(stanza);
|
||||
xmpp_stanza_t* event = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_PUBSUB_EVENT);
|
||||
if (event) {
|
||||
_handle_pubsub(stanza, event);
|
||||
return 1;
|
||||
}
|
||||
} else if (type == NULL || g_strcmp0(type, STANZA_TYPE_CHAT) == 0 || g_strcmp0(type, STANZA_TYPE_NORMAL) == 0) {
|
||||
// type: chat, normal (==NULL)
|
||||
|
||||
@@ -247,6 +252,8 @@ _message_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* con
|
||||
if (msg_stanza) {
|
||||
_handle_chat(msg_stanza, FALSE, is_carbon, NULL, NULL);
|
||||
}
|
||||
} else if (type && g_strcmp0(type, STANZA_TYPE_HEADLINE) == 0) {
|
||||
_handle_headline(stanza);
|
||||
} else {
|
||||
// none of the allowed types
|
||||
char* text;
|
||||
|
||||
Reference in New Issue
Block a user