[MOD/ADD] Separate AS code, XMPP reactions removal

This commit is contained in:
LDA 2024-08-21 13:51:52 +02:00
commit fb511b4df0
16 changed files with 1183 additions and 1029 deletions

39
src/AS/Ping.c Normal file
View file

@ -0,0 +1,39 @@
#include <AS.h>
#include <Cytoplasm/Memory.h>
#include <Cytoplasm/Str.h>
#include <Cytoplasm/Log.h>
#include <Cytoplasm/Uri.h>
#include <string.h>
#include <stdlib.h>
#include <Matrix.h>
void
ASPing(const ParseeConfig *conf)
{
HttpClientContext *ctx = NULL;
HashMap *json = NULL;
char *path;
if (!conf)
{
return;
}
path = StrConcat(3,
"/_matrix/client/v1/appservice/",
"Parsee%20XMPP",
"/ping"
);
ctx = ParseeCreateRequest(
conf,
HTTP_POST, path
);
Free(path);
json = HashMapCreate();
ASAuthenticateRequest(conf, ctx);
ParseeSetRequestJSON(ctx, json);
HttpClientContextFree(ctx);
JsonFree(json);
}