|
Ring Daemon
|
#include <conversation_module.h>

Classes | |
| class | Impl |
Public Member Functions | |
| void | acceptConversationRequest (const std::string &conversationId, const std::string &deviceId="") |
| Accept a conversation's request. | |
| void | addCallHistoryMessage (const std::string &uri, uint64_t duration_ms, const std::string &reason) |
| Add to the related conversation the call history message. | |
| void | addConversationMember (const std::string &conversationId, const dht::InfoHash &contactUri, bool sendRequest=true) |
| Adds a new member to a conversation (this will triggers a member event + new message on success) | |
| void | addConvInfo (const ConvInfo &info) |
| void | addGitSocket (std::string_view deviceId, std::string_view convId, const std::shared_ptr< dhtnet::ChannelSocket > &channel) |
| void | addSwarmChannel (const std::string &conversationId, std::shared_ptr< dhtnet::ChannelSocket > socket) |
| Add a swarm connection. | |
| void | bootstrap (const std::string &convId="") |
| Bootstrap swarm managers to other peers. | |
| std::shared_ptr< SIPCall > | call (const std::string &url, const std::vector< libjami::MediaMap > &mediaList, std::function< void(const std::string &, const DeviceId &, const std::shared_ptr< SIPCall > &)> &&cb) |
| Call the conversation. | |
| void | clearCache (const std::string &conversationId) |
| Clear loaded interactions. | |
| void | clearPendingFetch () |
| Clear not removed fetch. | |
| void | cloneConversationFrom (const std::string &conversationId, const std::string &uri, const std::string &oldConvId="") |
| Clone conversation from a member. | |
| void | connectivityChanged () |
| Triggers a bucket maintainance for DRTs. | |
| std::map< std::string, std::string > | conversationInfos (const std::string &conversationId) const |
| ConversationModule (std::shared_ptr< JamiAccount > account, std::shared_ptr< AccountManager > accountManager, NeedsSyncingCb &&needsSyncingCb, SengMsgCb &&sendMsgCb, NeedSocketCb &&onNeedSocket, NeedSocketCb &&onNeedSwarmSocket, OneToOneRecvCb &&oneToOneRecvCb, bool autoLoadConversations=true) | |
| std::vector< uint8_t > | conversationVCard (const std::string &conversationId) const |
| std::map< std::string, std::map< std::string, std::map< std::string, std::string > > > | convMessageStatus () const |
| std::map< std::string, std::map< std::string, std::string > > | convPreferences () const |
| Retrieve all conversation preferences to sync with other devices. | |
| uint32_t | countInteractions (const std::string &convId, const std::string &toId, const std::string &fromId, const std::string &authorUri) const |
| Retrieve the number of interactions from interactionId to HEAD. | |
| std::shared_ptr< TransferManager > | dataTransfer (const std::string &id) const |
| Returns related transfer manager. | |
| void | declineConversationRequest (const std::string &conversationId) |
| Decline a conversation's request. | |
| bool | downloadFile (const std::string &conversationId, const std::string &interactionId, const std::string &fileId, const std::string &path) |
| Ask conversation's members to send a file to this device. | |
| void | editMessage (const std::string &conversationId, const std::string &newBody, const std::string &editedId) |
| void | fetchNewCommits (const std::string &peer, const std::string &deviceId, const std::string &conversationId, const std::string &commitId) |
| Launch fetch on new commit. | |
| std::string | findMatchingOneToOneConversation (const std::string &excludedConversationId, const std::set< std::string > &targetUris) const |
| Search for an existing one-to-one conversation that exactly matches the given set of member URIs. | |
| std::vector< std::map< std::string, std::string > > | getActiveCalls (const std::string &conversationId) const |
| Return active calls. | |
| std::shared_ptr< Conversation > | getConversation (const std::string &convId) |
| Get a conversation. | |
| std::vector< std::map< std::string, std::string > > | getConversationMembers (const std::string &conversationId, bool includeBanned=false) const |
| Get members. | |
| std::map< std::string, std::string > | getConversationPreferences (const std::string &conversationId, bool includeCreated=false) const |
| std::vector< std::map< std::string, std::string > > | getConversationRequests () const |
| Return conversation's requests. | |
| std::vector< std::string > | getConversations () const |
| Return all conversation's id (including syncing ones) | |
| std::string | getOneToOneConversation (const std::string &uri) const noexcept |
| Get related conversation with member. | |
| std::shared_ptr< Typers > | getTypers (const std::string &convId) |
| Get Typers object for a conversation. | |
| std::shared_ptr< dhtnet::ChannelSocket > | gitSocket (std::string_view deviceId, std::string_view convId) const |
| Return current git socket used for a conversation. | |
| void | hostConference (const std::string &conversationId, const std::string &confId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList={}) |
| void | initPresence () |
| bool | isBanned (const std::string &convId, const std::string &uri) const |
| Return if a device or member is banned from a conversation. | |
| bool | isHosting (const std::string &conversationId, const std::string &confId) const |
| Check if we're hosting a specific conference. | |
| uint32_t | loadConversation (const std::string &conversationId, const std::string &fromMessage="", size_t n=0) |
| Load conversation's messages. | |
| void | loadConversations () |
| Refresh information about conversations. | |
| void | loadSingleConversation (const std::string &convId) |
| uint32_t | loadSwarmUntil (const std::string &conversationId, const std::string &fromMessage, const std::string &toMessage) |
| void | monitor () |
| bool | needsSyncingWith (const std::string &memberUri) const |
| Check if we need to share infos with a contact. | |
| void | onConversationRequest (const std::string &from, const Json::Value &value) |
| Called when receiving a new conversation's request. | |
| bool | onFileChannelRequest (const std::string &conversationId, const std::string &member, const std::string &fileId, bool verifyShaSum=true) const |
| Choose if we can accept channel request. | |
| bool | onMessageDisplayed (const std::string &peer, const std::string &conversationId, const std::string &interactionId) |
| void | onNeedConversationRequest (const std::string &from, const std::string &conversationId) |
| Called when a peer needs an invite for a conversation (generally after that they received a commit notification for a conversation they don't have yet) | |
| void | onSyncData (const SyncMsg &msg, const std::string &peerId, const std::string &deviceId) |
| Detect new conversations and request from other devices. | |
| void | onTrustRequest (const std::string &uri, const std::string &conversationId, const std::vector< uint8_t > &payload, time_t received) |
| Called when detecting a new trust request with linked one to one. | |
| std::string | peerFromConversationRequest (const std::string &convId) const |
| Retrieve author of a conversation request. | |
| void | reactToMessage (const std::string &conversationId, const std::string &newBody, const std::string &reactToId) |
| void | reloadRequests () |
| Reload requests from file. | |
| void | removeContact (const std::string &uri, bool ban) |
| Remove one to one conversations related to a contact. | |
| bool | removeConversation (const std::string &conversationId) |
| Remove a conversation, but not the contact. | |
| void | removeConversationMember (const std::string &conversationId, const dht::InfoHash &contactUri, bool isDevice=false) |
| Remove a member from a conversation (this will trigger a member event + new message on success) | |
| void | removeGitSocket (std::string_view deviceId, std::string_view convId) |
| void | search (uint32_t req, const std::string &convId, const Filter &filter) const |
| Search in conversations via a filter. | |
| void | sendMessage (const std::string &conversationId, Json::Value &&value, const std::string &replyTo="", bool announce=true, OnCommitCb &&onCommit={}, OnDoneCb &&cb={}) |
| void | sendMessage (const std::string &conversationId, std::string message, const std::string &replyTo="", const std::string &type="text/plain", bool announce=true, OnCommitCb &&onCommit={}, OnDoneCb &&cb={}) |
| void | setAccountManager (std::shared_ptr< AccountManager > accountManager) |
| void | setConversationPreferences (const std::string &conversationId, const std::map< std::string, std::string > &prefs) |
| Update user's preferences (like color, notifications, etc) to be synced across devices. | |
| void | setFetched (const std::string &conversationId, const std::string &deviceId, const std::string &commit) |
| Notify that a peer fetched a commit. | |
| void | shutdownConnections () |
| Clear all connection (swarm channels) | |
| std::string | startConversation (ConversationMode mode=ConversationMode::INVITES_ONLY, const dht::InfoHash &otherMember={}) |
| Starts a new conversation. | |
| void | syncConversations (const std::string &peer, const std::string &deviceId) |
| Sync conversations with detected peer. | |
| void | updateConversationInfos (const std::string &conversationId, const std::map< std::string, std::string > &infos, bool sync=true) |
| Update metadatas from conversations (like title, avatar, etc) | |
| bool | updateConvForContact (const std::string &uri, const std::string &oldConv, const std::string &newConv) |
| Replace linked conversation in contact's details. | |
| ~ConversationModule ()=default | |
Static Public Member Functions | |
| static std::map< std::string, ConvInfo > | convInfos (const std::string &accountId) |
| static std::map< std::string, ConvInfo > | convInfosFromPath (const std::filesystem::path &path) |
| static std::map< std::string, ConversationRequest > | convRequests (const std::string &accountId) |
| static std::map< std::string, ConversationRequest > | convRequestsFromPath (const std::filesystem::path &path) |
| static void | saveConvInfos (const std::string &accountId, const std::map< std::string, ConvInfo > &conversations) |
| static void | saveConvInfosToPath (const std::filesystem::path &path, const std::map< std::string, ConvInfo > &conversations) |
| static void | saveConvRequests (const std::string &accountId, const std::map< std::string, ConversationRequest > &conversationsRequests) |
| static void | saveConvRequestsToPath (const std::filesystem::path &path, const std::map< std::string, ConversationRequest > &conversationsRequests) |
Definition at line 67 of file conversation_module.h.
| jami::ConversationModule::ConversationModule | ( | std::shared_ptr< JamiAccount > | account, |
| std::shared_ptr< AccountManager > | accountManager, | ||
| NeedsSyncingCb && | needsSyncingCb, | ||
| SengMsgCb && | sendMsgCb, | ||
| NeedSocketCb && | onNeedSocket, | ||
| NeedSocketCb && | onNeedSwarmSocket, | ||
| OneToOneRecvCb && | oneToOneRecvCb, | ||
| bool | autoLoadConversations = true |
||
| ) |
Definition at line 1553 of file conversation_module.cpp.
References jami::emitSignal(), and loadConversations().

|
default |
| void jami::ConversationModule::acceptConversationRequest | ( | const std::string & | conversationId, |
| const std::string & | deviceId = "" |
||
| ) |
Accept a conversation's request.
| convId | |
| deviceId | If a trust request is accepted from a device (can help to sync) |
Definition at line 2057 of file conversation_module.cpp.
References jami::emitSignal(), and JAMI_WARNING.

| void jami::ConversationModule::addCallHistoryMessage | ( | const std::string & | uri, |
| uint64_t | duration_ms, | ||
| const std::string & | reason | ||
| ) |
Add to the related conversation the call history message.
| uri | Peer number |
| duration_ms | The call duration in ms |
| reason |
Definition at line 2208 of file conversation_module.cpp.
References jami::emitSignal(), getOneToOneConversation(), and sendMessage().

| void jami::ConversationModule::addConversationMember | ( | const std::string & | conversationId, |
| const dht::InfoHash & | contactUri, | ||
| bool | sendRequest = true |
||
| ) |
Adds a new member to a conversation (this will triggers a member event + new message on success)
| conversationId | |
| contactUri | |
| sendRequest | If we need to inform the peer (used for tests) |
Definition at line 2576 of file conversation_module.cpp.
References jami::emitSignal(), JAMI_DEBUG, and JAMI_ERROR.

Definition at line 3280 of file conversation_module.cpp.
Referenced by jami::ConversationModule::Impl::cloneConversation(), jami::ConversationModule::Impl::cloneConversationFrom(), jami::ConversationModule::Impl::handlePendingConversation(), onSyncData(), jami::ConversationModule::Impl::removeConversationImpl(), jami::ConversationModule::Impl::removeRepositoryImpl(), and startConversation().
| void jami::ConversationModule::addGitSocket | ( | std::string_view | deviceId, |
| std::string_view | convId, | ||
| const std::shared_ptr< dhtnet::ChannelSocket > & | channel | ||
| ) |
Definition at line 3319 of file conversation_module.cpp.
References JAMI_WARNING.
| void jami::ConversationModule::addSwarmChannel | ( | const std::string & | conversationId, |
| std::shared_ptr< dhtnet::ChannelSocket > | socket | ||
| ) |
Add a swarm connection.
| conversationId | |
| socket |
Definition at line 3348 of file conversation_module.cpp.
Bootstrap swarm managers to other peers.
Definition at line 1869 of file conversation_module.cpp.
References jami::emitSignal().

| std::shared_ptr< SIPCall > jami::ConversationModule::call | ( | const std::string & | url, |
| const std::vector< libjami::MediaMap > & | mediaList, | ||
| std::function< void(const std::string &, const DeviceId &, const std::shared_ptr< SIPCall > &)> && | cb | ||
| ) |
Call the conversation.
| url | Url to call (swarm:conversation or swarm:conv/account/device/conf to join) |
| mediaList | The media list |
| cb | Callback to pass which device to call (called in the same thread) |
Definition at line 3020 of file conversation_module.cpp.
References call(), jami::Manager::callFactory, jami::Call::DISCONNECTED, jami::emitSignal(), jami::CallFactory::getNewCallID(), hostConference(), jami::Manager::instance(), JAMI_DEBUG, JAMI_ERROR, jami::MediaAttribute::mediaAttributesToMediaMaps(), jami::Call::MERROR, jami::Call::OUTGOING, jami::split_string(), and jami::Call::TRYING.
Referenced by call().

Clear loaded interactions.
| conversationId |
Definition at line 2252 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::clearPendingFetch | ( | ) |
Clear not removed fetch.
Definition at line 1882 of file conversation_module.cpp.
References jami::emitSignal(), and JAMI_ERR.

| void jami::ConversationModule::cloneConversationFrom | ( | const std::string & | conversationId, |
| const std::string & | uri, | ||
| const std::string & | oldConvId = "" |
||
| ) |
Clone conversation from a member.
| conversationId | |
| uri | |
| oldConvId |
Definition at line 2155 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by jami::ConversationModule::Impl::bootstrap(), jami::ConversationModule::Impl::fallbackClone(), and onSyncData().

| void jami::ConversationModule::connectivityChanged | ( | ) |
Triggers a bucket maintainance for DRTs.
Definition at line 3354 of file conversation_module.cpp.
| std::map< std::string, std::string > jami::ConversationModule::conversationInfos | ( | const std::string & | conversationId | ) | const |
Definition at line 2696 of file conversation_module.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| std::vector< uint8_t > jami::ConversationModule::conversationVCard | ( | const std::string & | conversationId | ) | const |
Definition at line 2771 of file conversation_module.cpp.
References jami::emitSignal(), and JAMI_ERROR.

|
static |
Definition at line 3232 of file conversation_module.cpp.
Referenced by loadConversations(), loadSingleConversation(), and jami::SyncModule::Impl::syncInfos().
|
static |
Definition at line 3238 of file conversation_module.cpp.
References JAMI_WARN.
| std::map< std::string, std::map< std::string, std::map< std::string, std::string > > > jami::ConversationModule::convMessageStatus | ( | ) | const |
Definition at line 2240 of file conversation_module.cpp.
References jami::emitSignal().

| std::map< std::string, std::map< std::string, std::string > > jami::ConversationModule::convPreferences | ( | ) | const |
Retrieve all conversation preferences to sync with other devices.
Definition at line 2759 of file conversation_module.cpp.
References jami::emitSignal().

|
static |
Definition at line 3256 of file conversation_module.cpp.
Referenced by jami::ConversationModule::Impl::Impl(), reloadRequests(), and jami::SyncModule::Impl::syncInfos().
|
static |
Definition at line 3262 of file conversation_module.cpp.
References JAMI_WARN.
| uint32_t jami::ConversationModule::countInteractions | ( | const std::string & | convId, |
| const std::string & | toId, | ||
| const std::string & | fromId, | ||
| const std::string & | authorUri | ||
| ) | const |
Retrieve the number of interactions from interactionId to HEAD.
| convId | |
| interactionId | "" for getting the whole history |
| authorUri | Stop when detect author |
Definition at line 2640 of file conversation_module.cpp.
References jami::emitSignal().

| std::shared_ptr< TransferManager > jami::ConversationModule::dataTransfer | ( | const std::string & | id | ) | const |
Returns related transfer manager.
| id | Conversation's id |
Definition at line 2310 of file conversation_module.cpp.
Decline a conversation's request.
| convId |
Definition at line 2084 of file conversation_module.cpp.
References jami::emitSignal().

| bool jami::ConversationModule::downloadFile | ( | const std::string & | conversationId, |
| const std::string & | interactionId, | ||
| const std::string & | fileId, | ||
| const std::string & | path | ||
| ) |
Ask conversation's members to send a file to this device.
| conversationId | Related conversation |
| interactionId | Related interaction |
| fileId | Related fileId |
| path | where to download the file |
Definition at line 2356 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::editMessage | ( | const std::string & | conversationId, |
| const std::string & | newBody, | ||
| const std::string & | editedId | ||
| ) |
Definition at line 2187 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::fetchNewCommits | ( | const std::string & | peer, |
| const std::string & | deviceId, | ||
| const std::string & | conversationId, | ||
| const std::string & | commitId | ||
| ) |
Launch fetch on new commit.
| peer | Who sent the notification |
| deviceId | Who sent the notification |
| conversationId | Related conversation |
| commitId | Commit to retrieve |
Definition at line 2567 of file conversation_module.cpp.
References jami::emitSignal().

| std::string jami::ConversationModule::findMatchingOneToOneConversation | ( | const std::string & | excludedConversationId, |
| const std::set< std::string > & | targetUris | ||
| ) | const |
Search for an existing one-to-one conversation that exactly matches the given set of member URIs.
| excludedConversationId | Conversation ID to be ignored during the search. |
| targetUris | The set of member URIs that must match exactly. |
Definition at line 2968 of file conversation_module.cpp.
References jami::emitSignal(), and jami::ONE_TO_ONE.
Referenced by removeConversation().

| std::vector< std::map< std::string, std::string > > jami::ConversationModule::getActiveCalls | ( | const std::string & | conversationId | ) | const |
Return active calls.
| convId | Which conversation to choose |
Definition at line 3013 of file conversation_module.cpp.
| std::shared_ptr< Conversation > jami::ConversationModule::getConversation | ( | const std::string & | convId | ) |
Get a conversation.
| convId |
Definition at line 3296 of file conversation_module.cpp.
Referenced by jami::ConversationModule::Impl::bootstrap(), jami::ConversationModule::Impl::editMessage(), jami::ConversationModule::Impl::fallbackClone(), jami::ConversationModule::Impl::fetchNewCommits(), jami::ConversationModule::Impl::handlePendingConversation(), jami::ConversationModule::Impl::removeRepository(), jami::ConversationModule::Impl::sendMessage(), and jami::ConversationModule::Impl::sendMessageNotification().
| std::vector< std::map< std::string, std::string > > jami::ConversationModule::getConversationMembers | ( | const std::string & | conversationId, |
| bool | includeBanned = false |
||
| ) | const |
Get members.
| conversationId | |
| includeBanned |
Definition at line 2634 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by jami::ConversationModule::Impl::fallbackClone(), and onSyncData().

| std::map< std::string, std::string > jami::ConversationModule::getConversationPreferences | ( | const std::string & | conversationId, |
| bool | includeCreated = false |
||
| ) | const |
Definition at line 2748 of file conversation_module.cpp.
References jami::emitSignal().

| std::vector< std::map< std::string, std::string > > jami::ConversationModule::getConversationRequests | ( | ) | const |
Return conversation's requests.
Definition at line 1933 of file conversation_module.cpp.
References jami::emitSignal().

| std::vector< std::string > jami::ConversationModule::getConversations | ( | ) | const |
Return all conversation's id (including syncing ones)
Definition at line 1907 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by jami::ConversationModule::Impl::onBuddyOnline().

|
noexcept |
Get related conversation with member.
| uri | The member to search for |
Definition at line 1921 of file conversation_module.cpp.
Referenced by addCallHistoryMessage(), removeContact(), jami::ConversationModule::Impl::removeRepositoryImpl(), and jami::ConversationModule::Impl::updateConvForContact().
Get Typers object for a conversation.
| convId |
Definition at line 3361 of file conversation_module.cpp.
| std::shared_ptr< dhtnet::ChannelSocket > jami::ConversationModule::gitSocket | ( | std::string_view | deviceId, |
| std::string_view | convId | ||
| ) | const |
Return current git socket used for a conversation.
| deviceId | Related device |
| conversationId | Related conversation |
Definition at line 3306 of file conversation_module.cpp.
| void jami::ConversationModule::hostConference | ( | const std::string & | conversationId, |
| const std::string & | confId, | ||
| const std::string & | callId, | ||
| const std::vector< libjami::MediaMap > & | mediaList = {} |
||
| ) |
Definition at line 3133 of file conversation_module.cpp.
References JAMI_ERROR, and JAMI_WARNING.
Referenced by call().
| void jami::ConversationModule::initPresence | ( | ) |
Definition at line 3372 of file conversation_module.cpp.
| bool jami::ConversationModule::isBanned | ( | const std::string & | convId, |
| const std::string & | uri | ||
| ) | const |
Return if a device or member is banned from a conversation.
| convId | |
| uri |
Definition at line 2783 of file conversation_module.cpp.
References jami::emitSignal(), and jami::ONE_TO_ONE.

| bool jami::ConversationModule::isHosting | ( | const std::string & | conversationId, |
| const std::string & | confId | ||
| ) | const |
Check if we're hosting a specific conference.
| conversationId | (empty to search all conv) |
| confId |
Definition at line 2994 of file conversation_module.cpp.
References jami::emitSignal().

| uint32_t jami::ConversationModule::loadConversation | ( | const std::string & | conversationId, |
| const std::string & | fromMessage = "", |
||
| size_t | n = 0 |
||
| ) |
Load conversation's messages.
| conversationId | Conversation to load |
| fromMessage | |
| n | Max interactions to load |
Definition at line 2263 of file conversation_module.cpp.
References jami::emitSignal(), and jami::LogOptions::from.

| void jami::ConversationModule::loadConversations | ( | ) |
Refresh information about conversations.
Definition at line 1592 of file conversation_module.cpp.
References _, convInfos(), jami::emitSignal(), jami::fileutils::get_data_dir(), jami::ConvInfo::id, JAMI_ERROR, JAMI_LOG, JAMI_WARNING, jami::ConversationMapKeys::LAST_DISPLAYED, and jami::ONE_TO_ONE.
Referenced by ConversationModule().

Definition at line 1810 of file conversation_module.cpp.
References convInfos(), jami::emitSignal(), jami::fileutils::get_data_dir(), JAMI_LOG, and JAMI_WARNING.

| uint32_t jami::ConversationModule::loadSwarmUntil | ( | const std::string & | conversationId, |
| const std::string & | fromMessage, | ||
| const std::string & | toMessage | ||
| ) |
Definition at line 2285 of file conversation_module.cpp.
References jami::emitSignal(), and jami::LogOptions::from.

| void jami::ConversationModule::monitor | ( | ) |
Definition at line 1875 of file conversation_module.cpp.
References jami::emitSignal().

Check if we need to share infos with a contact.
| memberUri | |
| deviceId |
Definition at line 2532 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::onConversationRequest | ( | const std::string & | from, |
| const Json::Value & | value | ||
| ) |
Called when receiving a new conversation's request.
| from | Sender |
| value | Conversation's request |
Definition at line 1985 of file conversation_module.cpp.
References jami::ConversationRequest::conversationId, jami::emitSignal(), jami::ConversationRequest::from, jami::ConversationRequest::isOneToOne(), JAMI_DEBUG, JAMI_LOG, jami::ConversationRequest::received, jami::ConversationRequest::toMap(), and updateConvForContact().

| bool jami::ConversationModule::onFileChannelRequest | ( | const std::string & | conversationId, |
| const std::string & | member, | ||
| const std::string & | fileId, | ||
| bool | verifyShaSum = true |
||
| ) | const |
Choose if we can accept channel request.
| member | Member to check |
| fileId | File transfer to check (needs to be waiting) |
| verifyShaSum | For debug only |
Definition at line 2316 of file conversation_module.cpp.
References jami::emitSignal(), JAMI_WARNING, and jami::fileutils::sha3File().

| bool jami::ConversationModule::onMessageDisplayed | ( | const std::string & | peer, |
| const std::string & | conversationId, | ||
| const std::string & | interactionId | ||
| ) |
Definition at line 2225 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::onNeedConversationRequest | ( | const std::string & | from, |
| const std::string & | conversationId | ||
| ) |
Called when a peer needs an invite for a conversation (generally after that they received a commit notification for a conversation they don't have yet)
| from | |
| conversationId |
Definition at line 2044 of file conversation_module.cpp.
References JAMI_LOG.
| void jami::ConversationModule::onSyncData | ( | const SyncMsg & | msg, |
| const std::string & | peerId, | ||
| const std::string & | deviceId | ||
| ) |
Detect new conversations and request from other devices.
| msg | Received data |
| peerId | Sender |
| deviceId |
Definition at line 2397 of file conversation_module.cpp.
References addConvInfo(), cloneConversationFrom(), jami::emitSignal(), getConversationMembers(), JAMI_DEBUG, JAMI_LOG, and JAMI_WARNING.

| void jami::ConversationModule::onTrustRequest | ( | const std::string & | uri, |
| const std::string & | conversationId, | ||
| const std::vector< uint8_t > & | payload, | ||
| time_t | received | ||
| ) |
Called when detecting a new trust request with linked one to one.
| uri | Sender's URI |
| conversationId | Related conversation's id |
| payload | VCard |
| received | Received time |
Definition at line 1947 of file conversation_module.cpp.
References jami::ConversationRequest::conversationId, jami::emitSignal(), jami::ConversationRequest::from, jami::ConversationRepository::infosFromVCard(), JAMI_DEBUG, JAMI_LOG, jami::ConversationRequest::metadatas, jami::ConversationRequest::received, jami::ConversationRequest::toMap(), jami::vCard::utils::toMap(), and updateConvForContact().

| std::string jami::ConversationModule::peerFromConversationRequest | ( | const std::string & | convId | ) | const |
Retrieve author of a conversation request.
| convId | Conversation's id |
Definition at line 2033 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::reactToMessage | ( | const std::string & | conversationId, |
| const std::string & | newBody, | ||
| const std::string & | reactToId | ||
| ) |
Definition at line 2195 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::reloadRequests | ( | ) |
Reload requests from file.
Definition at line 1901 of file conversation_module.cpp.
References convRequests().

Remove one to one conversations related to a contact.
| uri | Of the contact |
| ban | If banned |
Definition at line 2803 of file conversation_module.cpp.
References jami::emitSignal(), getOneToOneConversation(), JAMI_DEBUG, JAMI_WARN, and jami::ONE_TO_ONE.

Remove a conversation, but not the contact.
| conversationId |
Definition at line 2875 of file conversation_module.cpp.
References jami::emitSignal(), findMatchingOneToOneConversation(), JAMI_LOG, jami::ONE_TO_ONE, and startConversation().
Referenced by jami::ConversationModule::Impl::fixStructures(), and jami::ConversationModule::Impl::handlePendingConversation().

| void jami::ConversationModule::removeConversationMember | ( | const std::string & | conversationId, |
| const dht::InfoHash & | contactUri, | ||
| bool | isDevice = false |
||
| ) |
Remove a member from a conversation (this will trigger a member event + new message on success)
| conversationId | |
| contactUri | |
| isDevice |
Definition at line 2616 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::removeGitSocket | ( | std::string_view | deviceId, |
| std::string_view | convId | ||
| ) |
Definition at line 3331 of file conversation_module.cpp.
|
static |
Definition at line 1537 of file conversation_module.cpp.
References jami::fileutils::get_data_dir(), and saveConvInfosToPath().
Referenced by jami::ConversationModule::Impl::fetchNewCommits(), and jami::ConversationModule::Impl::saveConvInfos().

|
static |
Definition at line 1544 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by saveConvInfos().

|
static |
Definition at line 1519 of file conversation_module.cpp.
References jami::fileutils::get_data_dir(), and saveConvRequestsToPath().
Referenced by jami::ConversationModule::Impl::fixStructures(), and jami::ConversationModule::Impl::saveConvRequests().

|
static |
Definition at line 1527 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by saveConvRequests().

| void jami::ConversationModule::search | ( | uint32_t | req, |
| const std::string & | convId, | ||
| const Filter & | filter | ||
| ) | const |
Search in conversations via a filter.
| req | Id of the request |
| convId | Leave empty to search in all conversation, else add the conversation's id |
| filter | Parameters for the search |
Definition at line 2654 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::sendMessage | ( | const std::string & | conversationId, |
| Json::Value && | value, | ||
| const std::string & | replyTo = "", |
||
| bool | announce = true, |
||
| OnCommitCb && | onCommit = {}, |
||
| OnDoneCb && | cb = {} |
||
| ) |
Definition at line 2176 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by addCallHistoryMessage(), jami::ConversationModule::Impl::editMessage(), and jami::ConversationModule::Impl::sendMessage().

| void jami::ConversationModule::sendMessage | ( | const std::string & | conversationId, |
| std::string | message, | ||
| const std::string & | replyTo = "", |
||
| const std::string & | type = "text/plain", |
||
| bool | announce = true, |
||
| OnCommitCb && | onCommit = {}, |
||
| OnDoneCb && | cb = {} |
||
| ) |
Definition at line 2164 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::setAccountManager | ( | std::shared_ptr< AccountManager > | accountManager | ) |
Definition at line 1575 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::setConversationPreferences | ( | const std::string & | conversationId, |
| const std::map< std::string, std::string > & | prefs | ||
| ) |
Update user's preferences (like color, notifications, etc) to be synced across devices.
| conversationId | |
| preferences |
Definition at line 2729 of file conversation_module.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| void jami::ConversationModule::setFetched | ( | const std::string & | conversationId, |
| const std::string & | deviceId, | ||
| const std::string & | commit | ||
| ) |
Notify that a peer fetched a commit.
| conversationId | Related conv |
| deviceId | Device who synced |
| commit | HEAD synced |
Definition at line 2551 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::shutdownConnections | ( | ) |
Clear all connection (swarm channels)
Definition at line 3337 of file conversation_module.cpp.
| std::string jami::ConversationModule::startConversation | ( | ConversationMode | mode = ConversationMode::INVITES_ONLY, |
| const dht::InfoHash & | otherMember = {} |
||
| ) |
Starts a new conversation.
| mode | Wanted mode |
| otherMember | If needed (one to one) |
Definition at line 2099 of file conversation_module.cpp.
References addConvInfo(), jami::emitSignal(), and JAMI_ERROR.
Referenced by jami::ConversationModule::Impl::cloneConversation(), jami::ConversationModule::Impl::cloneConversationFrom(), jami::ConversationModule::Impl::cloneConversationFrom(), and removeConversation().

| void jami::ConversationModule::syncConversations | ( | const std::string & | peer, |
| const std::string & | deviceId | ||
| ) |
Sync conversations with detected peer.
Definition at line 2370 of file conversation_module.cpp.
References jami::emitSignal().

| void jami::ConversationModule::updateConversationInfos | ( | const std::string & | conversationId, |
| const std::map< std::string, std::string > & | infos, | ||
| bool | sync = true |
||
| ) |
Update metadatas from conversations (like title, avatar, etc)
| conversationId | |
| infos | |
| sync | If we need to sync with others (used for tests) |
Definition at line 2677 of file conversation_module.cpp.
References jami::emitSignal(), JAMI_ERROR, and JAMI_WARNING.

| bool jami::ConversationModule::updateConvForContact | ( | const std::string & | uri, |
| const std::string & | oldConv, | ||
| const std::string & | newConv | ||
| ) |
Replace linked conversation in contact's details.
| uri | Of the contact |
| oldConv | Current conversation |
| newConv |
Definition at line 1927 of file conversation_module.cpp.
References jami::emitSignal().
Referenced by jami::ConversationModule::Impl::fixStructures(), onConversationRequest(), and onTrustRequest().
