[FIX/CI] Listen to CI

This commit is contained in:
LDA 2024-10-11 19:58:28 +02:00
commit 27223a5896

View file

@ -168,10 +168,10 @@ XMPPRequestVoice(XMPPComponent *jabber, char *from, char *muc)
Free(identifier); Free(identifier);
} }
bool bool
XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, char *hash, bool ret) XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, char *hash, int time, bool ret)
{ {
XMLElement *presence, *x, *reply, *history, *photo; XMLElement *presence, *x, *reply, *history, *photo;
char *from, *id; char *from, *id, *stime = "3600";
if (!comp || !fr || !muc) if (!comp || !fr || !muc)
{ {
return false; return false;
@ -186,7 +186,17 @@ XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, char *hash, bool ret)
XMLAddAttr(presence, "id", (id = StrRandom(8))); XMLAddAttr(presence, "id", (id = StrRandom(8)));
XMLAddAttr(x, "xmlns", "http://jabber.org/protocol/muc"); XMLAddAttr(x, "xmlns", "http://jabber.org/protocol/muc");
history = XMLCreateTag("history"); history = XMLCreateTag("history");
XMLAddAttr(history, "seconds", "3600"); /* TODO: Custom timeout */
if (time > 0)
{
stime = StrInt(time);
}
XMLAddAttr(history, "seconds", stime);
if (time > 0)
{
Free(stime);
stime = NULL;
}
XMLAddChild(x, history); XMLAddChild(x, history);
XMLAddChild(presence, x); XMLAddChild(presence, x);