mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:25:11 +00:00
[FIX] Leaves now actually do matter on Matrix
This commit is contained in:
parent
0ec028d458
commit
53739dd42d
4 changed files with 46 additions and 1 deletions
|
|
@ -13,6 +13,9 @@
|
|||
|
||||
#include <ctype.h>
|
||||
|
||||
static const char *
|
||||
GetXMPPInformation(ParseeData *data, HashMap *event, char **from, char **to);
|
||||
|
||||
static void
|
||||
JoinMUC(ParseeData *data, HashMap *event, char *jid, char *muc, char *name)
|
||||
{
|
||||
|
|
@ -121,6 +124,21 @@ ParseeMemberHandler(ParseeData *data, HashMap *event)
|
|||
muc_id = ParseeGetMUCID(data, chat_id);
|
||||
if (!chat_id)
|
||||
{
|
||||
/* If it can't be found, try to see if it's as a DM */
|
||||
char *info_from = NULL, *info_to = NULL;
|
||||
const char *type = GetXMPPInformation(data, event, &info_from, &info_to);
|
||||
|
||||
if (StrEquals(type, "chat"))
|
||||
{
|
||||
char *jid_to = ParseeTrimJID(info_to);
|
||||
Log(LOG_DEBUG, "('%s'->'%s') is gone.", state_key, info_to);
|
||||
/* TODO: Send a last DM, signifying that all is gone. */
|
||||
ParseeDeleteDM(data, state_key, jid_to);
|
||||
Free(jid_to);
|
||||
}
|
||||
|
||||
Free(info_from);
|
||||
Free(info_to);
|
||||
goto end;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue