mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[FIX] Saner way to filter stanzas
This commit is contained in:
parent
729d107400
commit
f743a33643
1 changed files with 2 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
||||||
char *retracted = XMPPGetRetractedID(stanza);
|
char *retracted = XMPPGetRetractedID(stanza);
|
||||||
char *reply_to = XMPPGetReply(stanza);
|
char *reply_to = XMPPGetReply(stanza);
|
||||||
char *moderated = XMPPGetModeration(stanza);
|
char *moderated = XMPPGetModeration(stanza);
|
||||||
|
bool chat = StrEquals(HashMapGet(stanza->attrs, "type"), "chat");
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
to = NULL;
|
to = NULL;
|
||||||
|
|
@ -182,7 +183,7 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
||||||
* ISSUE.
|
* ISSUE.
|
||||||
*
|
*
|
||||||
* I HATE THIS. I NEED TO FIND A BETTER WAY. */
|
* I HATE THIS. I NEED TO FIND A BETTER WAY. */
|
||||||
if (mroom_id)
|
if (!chat)
|
||||||
{
|
{
|
||||||
if (strncmp(HashMapGet(stanza->attrs, "to"), "parsee@", 7))
|
if (strncmp(HashMapGet(stanza->attrs, "to"), "parsee@", 7))
|
||||||
{
|
{
|
||||||
|
|
@ -195,7 +196,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
||||||
char *res = ParseeGetResource(from);
|
char *res = ParseeGetResource(from);
|
||||||
char *encoded = ParseeGetBridgedUser(args, stanza);
|
char *encoded = ParseeGetBridgedUser(args, stanza);
|
||||||
char *event_id = NULL;
|
char *event_id = NULL;
|
||||||
bool chat = StrEquals(HashMapGet(stanza->attrs, "type"), "chat");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
char *parsee = ParseeJID(args);
|
char *parsee = ParseeJID(args);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue