mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[ADD/WIP] One-way chatstates, capabilities
No avatarwerk today because avatars are an absolute sore.
This commit is contained in:
parent
59d5ad6780
commit
6b0f08c49e
10 changed files with 349 additions and 24 deletions
|
|
@ -175,6 +175,7 @@ XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc)
|
|||
XMLAddAttr(x, "xmlns", "http://jabber.org/protocol/muc");
|
||||
|
||||
XMLAddChild(presence, x);
|
||||
XMPPAnnotatePresence(presence);
|
||||
|
||||
XMLEncode(comp->stream, presence);
|
||||
StreamFlush(comp->stream);
|
||||
|
|
@ -279,3 +280,23 @@ XMPPGetReply(XMLElement *elem)
|
|||
|
||||
return HashMapGet(rep->attrs, "id");
|
||||
}
|
||||
void
|
||||
XMPPAnnotatePresence(XMLElement *presence)
|
||||
{
|
||||
XMLElement *c;
|
||||
char *ver;
|
||||
if (!presence)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ver = XMPPGenerateVer();
|
||||
c = XMLCreateTag("c");
|
||||
XMLAddAttr(c, "xmlns", "http://jabber.org/protocol/caps");
|
||||
XMLAddAttr(c, "hash", "sha-1");
|
||||
XMLAddAttr(c, "node", REPOSITORY);
|
||||
XMLAddAttr(c, "ver", ver);
|
||||
|
||||
Free(ver);
|
||||
XMLAddChild(presence, c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue