Commit Graph

16 Commits

Author SHA1 Message Date
85422c76d0 multiplex socket: pass full certificate in callbacks
Change-Id: I40171f3c5872bd5bf5719fd22a6a2af20ce6263f
2021-10-28 15:19:31 -04:00
d75289477f swarm: calculate linearizedParent while logging
This makes the log sending messages in the order the client will
show it and avoid to calculate linearized parent for each commit.
However, this linearized parent can change over time. In fact, if
a merge happens, the parents of the messages shown can be
modified.

Change-Id: I26372aa52de0e5f89140680a4beaf5fc7ec52163
GitLab: https://git.jami.net/savoirfairelinux/ring-project/-/issues/1282
2021-09-13 09:26:48 -04:00
95280b19b8 JamiAccount: use full public key or sha256 for DeviceId instead of sha1
Change-Id: I5e135b9ef4365acf87e6de4a8b1af9d19ef34ca3
2021-07-28 16:21:57 -04:00
ba3a411ca3 daemon: Rename dring occurrences in code and file names to jamid.
Automated using the following commands:

  $ mv src/{dring,jami}
  $ git grep -l src/dring | xargs sed -i 's,src/dring,src/jami,g'
  $ git grep -l '#include "dring/' | \
    xargs sed -i 's,#include "dring/,#include "jami/,g'
  $ git grep -l 'dring.h' | xargs sed -i 's,dring.h,jami.h,g'

And finally,

  $ git grep -l 'dring' | xargs sed -i 's,dring,jami,g'

  $ files=$(find -name '*dring*' | sort)
  $ for f in $files; do mkdir -p "$(dirname "$f")"; \
      mv "$f" "$(echo $f | sed 's/dring/jami/g')"; done

To resolve a bad renaming favorably:

  $ git grep -l -i AlsaCarjami | \
    xargs sed -i -E 's/([Aa])lsaCarjami/\1lsaCardRingtone/g'

The above renaming command is not perfect, so some hand-tuning was
required to complete it.

* src/manager.cpp (Manager::ManagerPimpl::retrieveConfigPath):
Preserve the dring.yml configuration file name, until we add something
to migrate (rename) it to jami.yml.
* man/dring.pod: Delete.
* bin/dbus/jamid.pod: Move to ...
* man/jamid.pod: here.
* bin/dbus/meson.build (jamid_targets): Normalize man section to the
pre-existing 1 and adjust accordingly.
* src/jami/def.h (dring_EXPORTS): Rename to ...
(jami_EXPORTS): ... this.

change-Id: I9828be6da9c711ab2f22c4d1b9539fea89d7b6fb
2021-07-15 10:57:26 -04:00
d475a227fb swarm: clean APIs
Pass all methods in async and on the io pool if they write into
the repository. Moreover, now MessageReceived guarantees to be
ordered if announced. e.g. if a parrallel merge and commit are done
previously if the merge was done before the commit you could receives
MessageReceived(merge) after MessageReceived(commit). Now it's
impossible. So the linearizedParent is guaranteed to be announced
before.

Change-Id: If4b94f19f5bf5abd4841fc19074231e3411e077d
2021-06-11 15:26:00 -04:00
8a8abc1951 unitTest: Add wait_for_removal_of functions
Change-Id: Icf4453467c246ac29b3d178e73380fbeb174d3cd
2021-06-02 12:01:06 -04:00
cabbc523a8 unitTest: Add load_actors function
Load actors from YAML description for unit tests.

Change-Id: Id1840e2bd7244abf902c9be95589b82503c72840
2021-06-02 12:01:06 -04:00
fbb4c95312 unitTest: Add wait_for_announcement_of function
Change-Id: I200b7fa80f8d0bf769bfb84a2915c220880a1146
2021-05-31 11:20:04 -04:00
3152c635d9 unittest: fix build
Change-Id: I4bfaf16797afefba0e33b1f58bfc5f56a6a0ef63
2021-04-22 10:20:53 -04:00
fd944896fa swarm: sync infos such as title/description/avatar
Change-Id: I0b56d6a8583923bfbac350ee497956d8268d11de
GitLab: #381
2021-04-21 15:13:02 -04:00
153e4e2a9f dring: add conversation interface API
Change-Id: Id983f360bff9f6732e37090934f43bd247f0bb9e
2021-03-30 13:49:07 -04:00
3ef9cabae7 swarm: get changedFiles by a range of commits
Change-Id: I3710414acdff1eef447e308d6ae3827e27add04b
2021-03-30 13:49:07 -04:00
0c6540ba2e swarm chat: add the ability to merge a branch to master
This will give the possibility to merge two states of the conversation.

Change-Id: I1dfcbc2d9bd581c0b41a0f01919f490d4cc20d13
2021-03-30 13:49:07 -04:00
99700f5524 swarm: add a method to get a range of commits
This patch introduces ConversationRepository::log(last, n) to get the commits
from [last-n, last], where last (if not specified) is current HEAD.

Change-Id: Ia6b8eb96b8a4a0de3614d4e422c1179f976d2ab0
2021-03-30 13:49:07 -04:00
ad5607380f swarmchat: clone distant conversation
Retrieving a conversation is done by cloning the distant repository

Change-Id: Ib68749d0cd37ff708b08187e987cc3fdeaa0fbe6
2021-03-30 13:49:07 -04:00
6100a792f6 swarmchat: initialize empty git repository with initial commit
This patch offers an API to create conversation. A conversation
is represented by a git repository.

The repository will contains the account certificate in /admins,
its CRLs in /CRLs and the device key in /devices. Moreover,
the first signed commit's hash will be the conversation's id

Change-Id: Iac7ff7f6002185a5bb0f51d4c10df1afe9e059b4
2021-03-30 13:49:07 -04:00