roster_update_presence now requires that
roster_process_pending_presence() has been called. Otherwise presence
are set to pending and not processed yet.
Presence of contact not found in roster are filtered out.
But sometimes roster is received after a first few presences.
We choose to store presences until we receive roster and then process
this presences.
Fixes#1050
When auto joining a MUC we don't have access to required information so
we just don't start OMEMO at this time.
Once we receive disco info we then try to start OMEMO.
There is 3 policy:
- manual: OMEMO session are only started manually
- automatic: OMEMO session are only started if they have been started
manually before
- always: OMEMO session are always started unless they have been ended
manually before
Closes#1040 and fixes#1052
If OMEMO wasn't loaded, removing key would create empty identity.txt
file. Then at load time it would segfault profanity.
Another commit should fix load of malformed identity.txt.
Install libmicrohttpd which are used for (currently disabled) functional
tests).
Install glibc-locale to get the locales.
Unit test for `prof_whole_occurrences_tests` uses UTF-8 character and
fails without proper locale being set.
Travis supports only quite old Ubuntu releases.
They don't ship with libsignal-protocol-c and not with a recent enough
libgrcypt.
We could build libsignal-protocol-c manually but for libgcrypt it's more
annoying.
Let us switch to Docker and use openSUSE Tumbleweed, which is rolling
release) and thus have up to date libs.
When connecting for the first time or when creating a new account don't
use only 'profanity' as default resource.
Some server don't support having 2 connection with same resource. Using
profanity as default lead to deconnections.
We already use uint_32 from stdint.h which AFAIK is C99.
I seem to remember there is more C99 in the code. Let's explicitly
define it here.
Also fixes build for https://github.com/boothj5/profanity/pull/1053
When decrypting first message with prekey, libsignal wants to remove
used prekey from storage. Return value on success should be 0.
We used to return number of deleted keys. Thus libsignal was considering
we failed to remove the key and we were ignoring plaintext.