* Switched to DB initialization at compile time
* Organized and cleaned up db files directories(not finished completely)
* Fixed DB related unit tests
* Minor improvements to CMake
* Small fixes for GCC12 build
Adding or removing country code from existing contacts number is
changing now number record itself, exactly when changed number
is placed in DB, instead to create new number record, to avoid
miss match during matching numbers.
Adding or removing code country from contact's number creates a
new number record. Old number, which was connected witch contact
previously, is removed from the numbers table to avoid miss match
numbers. Changing country code only creates new number records,
without removing old ones. Old ones are temporary number from now.
When thread record is modified during connection
with Mudita Center, notification of that action
should be collected in outbox endpoint to
keep contacts data synchronized between MuditaOS
and Mudita Center.
It appears in the past a major edit was made but had used a regex to
change some text which resulted in an errant space between the
enumuneration/struct/class name and the scope resolution operator.
These errant spaces have been removed.
There was an issue, when contact with a specific number was added,
then removed and added again via Mudita Center. Then
it was displayed without a name. This issue was caused by
another known issue with temporary contacts handling (EGD-79473).
This fix is a workaround to make adding contacts via MC work,
without the need to refactor temporary contacts handling.
Pagination added for contact endpoint.
Introduced PagedContext and query message for contacts that returns
the required contacts together with the number of all contacts in db.
[EGD-2460] additional stoi/stoul protected; usage of magin_enum; review issues resolved
[EGB-2460] added return when exception caught as mention by Radek
Use phone number instead of contact number to identify a message thread
to allow having multiple threads for a contact if contact has multiple
numbers.
Fix duplicates detection when updating a contact.
Before this change dupliates detection both for numbers and speed dial
was not implemented at all.
Fix contact update procedure - add unbinding procedure if a new number
was bound to another contact before update. Do the same for speed dial.
Fix invalid contact number tests (it wasn't taken into account that each
section has clean db state).
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Fix contacts get query following changes in the contacts database to
move contacts groups to another table.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
Introduce a new way to handle query responses allowing to deal with
races:
- bind reponse with request,
- handle responses with an observer-like interface.
Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>