Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
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
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
feb232f0
Commit
feb232f0
authored
4 months ago
by
Adrien Béraud
Committed by
Adrien Béraud
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
ConversationChannelHandler: add log to know why a channel is refused
Change-Id: I2655eb16f9a6e6cbee6bdb8ae620ec3102cf0c94
parent
d577a1ae
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/conversation_channel_handler.cpp
+12
-2
12 additions, 2 deletions
src/jamidht/conversation_channel_handler.cpp
with
12 additions
and
2 deletions
src/jamidht/conversation_channel_handler.cpp
+
12
−
2
View file @
feb232f0
...
...
@@ -52,12 +52,22 @@ ConversationChannelHandler::onRequest(const std::shared_ptr<dht::crypto::Certifi
auto
sep
=
name
.
find_last_of
(
'/'
);
auto
conversationId
=
name
.
substr
(
sep
+
1
);
if
(
auto
acc
=
account_
.
lock
())
if
(
auto
acc
=
account_
.
lock
())
{
if
(
auto
convModule
=
acc
->
convModule
(
true
))
{
auto
res
=
!
convModule
->
isBanned
(
conversationId
,
cert
->
issuer
->
getId
().
toString
());
res
&=
!
convModule
->
isBanned
(
conversationId
,
cert
->
getLongId
().
toString
());
if
(
!
res
)
{
JAMI_WARNING
(
"Received ConversationChannel request for '{}' but user {} is banned"
,
name
,
cert
->
issuer
->
getId
().
toString
());
}
else
{
res
&=
!
convModule
->
isBanned
(
conversationId
,
cert
->
getLongId
().
toString
());
if
(
!
res
)
{
JAMI_WARNING
(
"Received ConversationChannel request for '{}' but device {} is banned"
,
name
,
cert
->
getLongId
().
toString
());
}
}
return
res
;
}
else
{
JAMI_ERROR
(
"Received ConversationChannel request but conversation module is unavailable"
);
}
}
return
false
;
}
...
...
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