mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 18:25:10 +00:00
[MOD] Start separating build config, HTML in edits
This commit is contained in:
parent
1f3d738bb4
commit
80bab890f6
4 changed files with 21 additions and 6 deletions
12
src/Events.c
12
src/Events.c
|
|
@ -180,6 +180,18 @@ MatrixCreateReplace(char *event, char *body)
|
|||
HashMapSet(map, "m.new_content", JsonValueObject(new));
|
||||
HashMapSet(map, "m.relates_to", JsonValueObject(rel));
|
||||
|
||||
{
|
||||
XEP393Element *e = XEP393(body);
|
||||
char *text = XEP393ToXMLString(e);
|
||||
XEP393FreeElement(e);
|
||||
|
||||
HashMapSet(map, "formatted_body", JsonValueString(text));
|
||||
HashMapSet(map, "format", JsonValueString("org.matrix.custom.html"));
|
||||
HashMapSet(new, "formatted_body", JsonValueString(text));
|
||||
HashMapSet(new, "format", JsonValueString("org.matrix.custom.html"));
|
||||
Free(text);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
HashMap *
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@ RetrieveStanza(XMPPThread *thread)
|
|||
{
|
||||
XMLElement *ret = NULL;
|
||||
|
||||
/* TODO: We're polling here... Parsee should avoid doing that,
|
||||
* in favour of condition variables, which should lower the system
|
||||
* load of Parsee as a whole. */
|
||||
pthread_mutex_lock(&thread->info->lock);
|
||||
ret = ArrayDelete(thread->info->stanzas, 0);
|
||||
pthread_mutex_unlock(&thread->info->lock);
|
||||
|
|
@ -54,7 +57,7 @@ XMPPDispatcher(void *argp)
|
|||
|
||||
if (!stanza)
|
||||
{
|
||||
UtilSleepMillis(5);
|
||||
UtilSleepMillis(10);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue