mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 15:05:11 +00:00
[ADD] Allow the main component to be used to issue commands
This commit is contained in:
parent
fb44ad4bf6
commit
fd1b3499b6
2 changed files with 3 additions and 9 deletions
|
|
@ -374,7 +374,7 @@ IQResult(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
bool
|
||||
IQIsCommandList(ParseeData *args, XMLElement *stanza)
|
||||
{
|
||||
char *parsee = NULL;
|
||||
char *parsee = NULL, *to;
|
||||
XMLElement *query = XMLookForTKV(
|
||||
stanza, "query", "xmlns",
|
||||
"http://jabber.org/protocol/disco#items"
|
||||
|
|
@ -389,7 +389,8 @@ IQIsCommandList(ParseeData *args, XMLElement *stanza)
|
|||
}
|
||||
|
||||
parsee = ParseeJID(args);
|
||||
ret = StrEquals(HashMapGet(stanza->attrs, "to"), parsee);
|
||||
to = HashMapGet(stanza->attrs, "to");
|
||||
ret = StrEquals(to, parsee) || StrEquals(to, args->config->component_host);
|
||||
Free(parsee);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue