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
63f4e204
Commit
63f4e204
authored
1 month ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
message channel: route messages through onTextMessage
Change-Id: I4f39abfb8cba90b428554b1972cf6ed72b7682e5
parent
b7be61ef
Branches
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/message_channel_handler.cpp
+3
-3
3 additions, 3 deletions
src/jamidht/message_channel_handler.cpp
with
3 additions
and
3 deletions
src/jamidht/message_channel_handler.cpp
+
3
−
3
View file @
63f4e204
...
...
@@ -145,6 +145,7 @@ MessageChannelHandler::onReady(const std::shared_ptr<dht::crypto::Certificate>&
socket
->
setOnRecv
([
acc
=
pimpl_
->
account_
.
lock
(),
peerId
,
deviceId
=
device
.
toString
(),
ctx
=
std
::
make_shared
<
DecodingContext
>
()](
const
uint8_t
*
buf
,
size_t
len
)
{
if
(
!
buf
||
!
acc
)
return
len
;
...
...
@@ -158,12 +159,11 @@ MessageChannelHandler::onReady(const std::shared_ptr<dht::crypto::Certificate>&
while
(
ctx
->
pac
.
next
(
oh
))
{
Message
msg
;
oh
.
get
().
convert
(
msg
);
acc
->
handle
Message
(
peerId
,
{
msg
.
t
,
msg
.
c
});
acc
->
onText
Message
(
""
,
peerId
,
deviceId
,
{
{
msg
.
t
,
msg
.
c
}
}
);
}
}
catch
(
const
std
::
exception
&
e
)
{
JAMI_WARNING
(
"[convInfo]
e
rror
on sync
: {:s}"
,
e
.
what
());
JAMI_WARNING
(
"[convInfo]
E
rror
parsing message
: {:s}"
,
e
.
what
());
}
return
len
;
});
}
...
...
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