mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:25:11 +00:00
[MOD/FIX] Be a bit more specific with component errors
This commit is contained in:
parent
389870c5d3
commit
f9de7f1750
3 changed files with 11 additions and 14 deletions
|
|
@ -26,20 +26,15 @@ JoinMUC(ParseeData *data, HashMap *event, char *jid, char *muc, char *name, char
|
|||
char *rev = StrConcat(3, muc, "/", nick);
|
||||
int nonce = 0;
|
||||
|
||||
Log(LOG_DEBUG, "MUCJOINER: filtered '%s' to '%s'", name, nick);
|
||||
|
||||
UnistrFree(uninick);
|
||||
UnistrFree(filtered);
|
||||
UnistrFree(filterASCII);
|
||||
|
||||
/* TODO: Make sure that we fall back to plain ASCII if it fails too many
|
||||
* times. */
|
||||
/* TODO: vCards! */
|
||||
while (!XMPPJoinMUC(data->jabber, jid, rev, hash, -1, true) && nonce < 32)
|
||||
{
|
||||
char *nonce_str = StrInt(nonce);
|
||||
char *input = StrConcat(3, sender, name, nonce_str);
|
||||
char *hex = ParseeHMACS(data->id, input);
|
||||
Unistr *filterASCII = UnistrFilter(uninick, UnistrIsASCII);
|
||||
|
||||
if (strlen(hex) >= 8)
|
||||
{
|
||||
|
|
@ -48,7 +43,6 @@ JoinMUC(ParseeData *data, HashMap *event, char *jid, char *muc, char *name, char
|
|||
|
||||
Free(nick);
|
||||
Free(rev);
|
||||
Free(revscii);
|
||||
|
||||
nick = StrConcat(4, name, "[", hex, "]");
|
||||
rev = StrConcat(3, muc, "/", nick);
|
||||
|
|
@ -368,7 +362,7 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
|
|||
StanzaBuilder *builder = NULL;
|
||||
DbRef *ref = NULL;
|
||||
HashMap *json = NULL;
|
||||
|
||||
|
||||
char *m_sender = GrabString(event, 1, "sender");
|
||||
char *unedited_id = NULL;
|
||||
char *body = GrabString(event, 2, "content", "body");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue