From 27223a5896ba2c957007067672e0555c78a11d4c Mon Sep 17 00:00:00 2001 From: LDA Date: Fri, 11 Oct 2024 19:58:28 +0200 Subject: [PATCH] [FIX/CI] Listen to CI --- src/XMPP/MUC.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/XMPP/MUC.c b/src/XMPP/MUC.c index 498ddfa..5d39d78 100644 --- a/src/XMPP/MUC.c +++ b/src/XMPP/MUC.c @@ -168,10 +168,10 @@ XMPPRequestVoice(XMPPComponent *jabber, char *from, char *muc) Free(identifier); } 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; - char *from, *id; + char *from, *id, *stime = "3600"; if (!comp || !fr || !muc) { return false; @@ -186,7 +186,17 @@ XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc, char *hash, bool ret) XMLAddAttr(presence, "id", (id = StrRandom(8))); XMLAddAttr(x, "xmlns", "http://jabber.org/protocol/muc"); 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(presence, x);