Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
a0fafe5c
Unverified
Commit
a0fafe5c
authored
4 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
contactmodel: buddy subscriptions must check related account
Change-Id: I69a2e9f23b3a4cb5ce33bdcdb69fc2dce853d9f5
parent
87124a9d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/callbackshandler.cpp
+1
-2
1 addition, 2 deletions
src/callbackshandler.cpp
src/callbackshandler.h
+2
-1
2 additions, 1 deletion
src/callbackshandler.h
src/contactmodel.cpp
+7
-2
7 additions, 2 deletions
src/contactmodel.cpp
with
10 additions
and
5 deletions
src/callbackshandler.cpp
+
1
−
2
View file @
a0fafe5c
...
...
@@ -263,10 +263,9 @@ CallbacksHandler::slotNewBuddySubscription(const QString& accountId,
bool
status
,
const
QString
&
message
)
{
Q_UNUSED
(
accountId
)
Q_UNUSED
(
status
)
Q_UNUSED
(
message
)
emit
newBuddySubscription
(
uri
,
status
);
emit
newBuddySubscription
(
accountId
,
uri
,
status
);
}
void
...
...
This diff is collapsed.
Click to expand it.
src/callbackshandler.h
+
2
−
1
View file @
a0fafe5c
...
...
@@ -62,10 +62,11 @@ Q_SIGNALS:
const
MapStringString
&
payloads
);
/**
* Connect this signal to get information when a peer is online.
* @param accountId related account.
* @param contactUri the peer.
* @param present if the peer is online.
*/
void
newBuddySubscription
(
const
QString
&
contactUri
,
bool
present
);
void
newBuddySubscription
(
const
QString
&
accountId
,
const
QString
&
contactUri
,
bool
present
);
/**
* Connect this signal to get information when peer discovery changes.
* @param contactUri the peer.
...
...
This diff is collapsed.
Click to expand it.
src/contactmodel.cpp
+
7
−
2
View file @
a0fafe5c
...
...
@@ -123,10 +123,11 @@ public:
public
Q_SLOTS
:
/**
* Listen CallbacksHandler when a presence update occurs
* @param accountId
* @param contactUri
* @param status
*/
void
slotNewBuddySubscription
(
const
QString
&
uri
,
bool
status
);
void
slotNewBuddySubscription
(
const
QString
&
accountId
,
const
QString
&
uri
,
bool
status
);
/**
* Listen CallbacksHandler when a contact is added
...
...
@@ -714,8 +715,12 @@ ContactModelPimpl::fillWithJamiContacts()
}
void
ContactModelPimpl
::
slotNewBuddySubscription
(
const
QString
&
contactUri
,
bool
status
)
ContactModelPimpl
::
slotNewBuddySubscription
(
const
QString
&
accountId
,
const
QString
&
contactUri
,
bool
status
)
{
if
(
accountId
!=
linked
.
owner
.
id
)
return
;
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
contactsMtx_
);
auto
it
=
contacts
.
find
(
contactUri
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment