mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-14 00:45:10 +00:00
[ADD/WIP] No-fly list for Matrix users
Imagine being in Parsee jail.
This commit is contained in:
parent
46489b50e6
commit
f434f7aa87
4 changed files with 120 additions and 20 deletions
|
|
@ -12,6 +12,16 @@
|
|||
#include <XML.h>
|
||||
#include <AS.h>
|
||||
|
||||
#define IQ_ADVERT \
|
||||
AdvertiseSimple("http://jabber.org/protocol/chatstates") \
|
||||
AdvertiseSimple("urn:xmpp:message-correct:0") \
|
||||
AdvertiseSimple("urn:xmpp:reactions:0") \
|
||||
AdvertiseSimple("urn:xmpp:styling:0") \
|
||||
AdvertiseSimple("urn:xmpp:reply:0") \
|
||||
AdvertiseSimple("urn:xmpp:sid:0") \
|
||||
AdvertiseSimple("jabber:x:oob") \
|
||||
AdvertiseSimple("urn:parsee:x-parsee:0") \
|
||||
AdvertiseSimple("urn:parsee:jealousy:0")
|
||||
|
||||
static pthread_mutex_t cond_var_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_cond_t cond_var = PTHREAD_COND_INITIALIZER;
|
||||
|
|
@ -59,7 +69,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza)
|
|||
room = ParseeFindDMRoom(args, to, from);
|
||||
data = ArrayGet(body->children, 0);
|
||||
|
||||
/* TODO: Consider having rich messages. */
|
||||
chat_id = ParseeGetFromMUCID(args, from);
|
||||
mroom_id = ParseeGetRoomID(args, chat_id);
|
||||
if (room)
|
||||
|
|
@ -76,7 +85,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza)
|
|||
char *event_id = NULL;
|
||||
char *replaced = XMPPGetReplacedID(stanza);
|
||||
|
||||
/* TODO: Create smarter puppet names */
|
||||
if (ParseeVerifyStanza(args, chat_id, s_id_str) && !replaced)
|
||||
{
|
||||
XMLElement *oob, *oob_data;
|
||||
|
|
@ -203,18 +211,10 @@ IQDiscoGet(ParseeData *args, XMPPComponent *jabber, XMLElement *stanza)
|
|||
XMLAddAttr(feature, "var", f); \
|
||||
XMLAddChild(query, feature); \
|
||||
} \
|
||||
while (0)
|
||||
while (0);
|
||||
|
||||
AdvertiseSimple("urn:xmpp:message-correct:0");
|
||||
AdvertiseSimple("urn:xmpp:reactions:0");
|
||||
AdvertiseSimple("urn:xmpp:styling:0");
|
||||
AdvertiseSimple("urn:xmpp:reply:0");
|
||||
AdvertiseSimple("urn:xmpp:sid:0");
|
||||
AdvertiseSimple("jabber:x:oob");
|
||||
|
||||
AdvertiseSimple("urn:parsee:x-parsee:0");
|
||||
AdvertiseSimple("urn:parsee:jealousy:0");
|
||||
/* TODO: Advertise more things */
|
||||
IQ_ADVERT
|
||||
#undef AdvertiseSimple
|
||||
}
|
||||
XMLAddChild(iq_reply, query);
|
||||
|
|
@ -271,10 +271,6 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
{
|
||||
ParseePushJIDTable(oid, jid);
|
||||
}
|
||||
/* TODO: Make proper mapping in some sort of soft-DB.
|
||||
* I am saying soft-DB, because this does not need to be
|
||||
* stored inside the actual database, as we retrieve it at
|
||||
* startup everytime from the service anyways. */
|
||||
}
|
||||
#undef MUC_USER_NS
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue