mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 18:25:10 +00:00
[ADD] Add basic Matrix ID parser
This commit is contained in:
parent
fb511b4df0
commit
8042ccc0cc
8 changed files with 70 additions and 15 deletions
|
|
@ -11,6 +11,8 @@
|
|||
#include <Matrix.h>
|
||||
#include <AS.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
static void
|
||||
JoinMUC(ParseeData *data, HashMap *event, char *jid, char *muc, char *name)
|
||||
{
|
||||
|
|
@ -20,7 +22,7 @@ JoinMUC(ParseeData *data, HashMap *event, char *jid, char *muc, char *name)
|
|||
char *rev = StrConcat(3, muc, "/", nick);
|
||||
int nonce = 0;
|
||||
|
||||
while (!XMPPJoinMUC(data->jabber, jid, rev, true) && nonce < 20)
|
||||
while (!XMPPJoinMUC(data->jabber, jid, rev, true) && nonce < 32)
|
||||
{
|
||||
char *nonce_str = StrInt(nonce);
|
||||
char *input = StrConcat(4, sender, name, data->id, nonce_str);
|
||||
|
|
@ -122,10 +124,6 @@ ParseeMemberHandler(ParseeData *data, HashMap *event)
|
|||
goto end;
|
||||
}
|
||||
|
||||
/* TODO: We need to deal with the nick properly, as XMPP
|
||||
* requires us to provide it whenever we want to even think
|
||||
* about leaving...
|
||||
* I love how this is the last place victim of the dreaded [p]... */
|
||||
name = StrDuplicate(ParseeLookupNick(muc_id, sender));
|
||||
rev = StrConcat(3, muc_id, "/", name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue