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.
Reflected messages can't be filtered by nick only otherwise you might
ignore messages comming from you on another devices.
Consequently we maintain a list of sent messages id in mucwin.
To be sure the id will be correctly reflected we use the origin-id
stanza.