Add parseJson function to simplify json parsing:
* automatically log parsing failure
* allows single-line json parsing
* take a string_view instead of begin/end pointers
* optimize building the CharReader by reusing the CharReaderBuilder
Change-Id: I332a88fc476ee84ba400a96bc1b41515cca43c32
When removing a contact, we need to update the ID of its linked
conversation (to be empty, which is the convention used to signify that
a contact doesn't have a linked conversation).
This used to be done via the updateConvForContact function, but there
were two issues (which are fixed by this patch):
1) if the user had multiple one-to-one conversations with the removed
contact, then the function would be called multiple times (once per
conversation) even though the update only needs to be performed once;
2) more importantly, if the contact's linked conversation ID didn't
match any of its one-to-one conversations, then the update would not
be performed at all. (Every contact should normally be linked to a
valid conversation, but this can fail in practice due to
synchronization issues.) As a result, the contact would remain linked
to a conversation that no longer exists.
https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1673https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1804
Change-Id: Ia75c5b27a4120bc48da5f449a874354326c6d96a
Given the change made in commit
e048f1b999, it no longer makes sense to
use a null pointer as the default value for the optHistory argument of
the addToHistory function.
GitLab: #1102
Change-Id: Ifc5ca8b069c16d7d9cca2cbc0c8237c56895ff4e
resolved a segfault triggered by multiple clients accessing and calling clearCache simultaneously during conversation loading.
Change-Id: Ic2b134d67d1a207f45e52c5aedeee5712ead14ba
This patch removes the callback argument to the doUnregister function,
which wasn't really needed since it was always called right before
returning from the function.
The patch also removes all calls to the shutdownConnections function
outside of doUnregister, and instead adds a boolean argument to
doUnregister to allow the caller to specify if they want the connections
to be shut down. This is a preparatory step for fixing the bug described
in the GitLab issue linked below.
GitLab: #1095
Change-Id: Ic78659f2e00684fd1db91c0ee3cf894a53d558ce