[MOD] Change media path, connect to component through another address

This commit is contained in:
lda 2025-01-06 17:09:36 +00:00
commit 5e1931a19f
9 changed files with 30 additions and 9 deletions

View file

@ -41,9 +41,11 @@ typedef struct ParseeConfig {
/* Homeserver port info */
char *homeserver_host;
int homeserver_port;
int homeserver_tls;
/* ------- JABBER -------- */
char *component_addr;
char *component_host;
char *shared_comp_secret;
int component_port;

View file

@ -75,7 +75,7 @@ typedef struct ParseeCmdArg {
X_ROUTE("/_matrix/app/v1/users/(.*)", RouteUserAck) \
X_ROUTE("/_matrix/app/v1/rooms/(.*)", RouteRoomAck) \
X_ROUTE("/_matrix/app/v1/ping", RoutePing) \
X_ROUTE("/_matrix/client/v1/media/download/(.*)/(.*)", RouteMedia)
X_ROUTE("/media/(.*)/(.*)", RouteMedia)
#define X_ROUTE(path, name) extern void * name(Array *, void *);
ROUTES

View file

@ -22,7 +22,7 @@ typedef struct XMPPComponent {
/* Initialises a raw component stream to host, with an optional port.
* If said port is 0, then it is set to the default Prosody port */
extern XMPPComponent * XMPPInitialiseCompStream(char *host, int port);
extern XMPPComponent * XMPPInitialiseCompStream(char *addr, char *host, int port);
/* Authenticates a component stream with a given shared secret,
* with a stream ID from the server. This should be called right