Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
Nheko Reborn
nheko
Commits
4514d139
Commit
4514d139
authored
6 years ago
by
Konstantinos Sideris
Browse files
Options
Downloads
Patches
Plain Diff
Improve logging a bit
parent
87042659
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Olm.cpp
+5
-1
5 additions, 1 deletion
src/Olm.cpp
src/timeline/TimelineView.cc
+3
-2
3 additions, 2 deletions
src/timeline/TimelineView.cc
with
8 additions
and
3 deletions
src/Olm.cpp
+
5
−
1
View file @
4514d139
...
@@ -82,7 +82,8 @@ handle_pre_key_olm_message(const std::string &sender,
...
@@ -82,7 +82,8 @@ handle_pre_key_olm_message(const std::string &sender,
OlmSessionPtr
inbound_session
=
nullptr
;
OlmSessionPtr
inbound_session
=
nullptr
;
try
{
try
{
inbound_session
=
olm
::
client
()
->
create_inbound_session
(
content
.
body
);
inbound_session
=
olm
::
client
()
->
create_inbound_session_from
(
sender_key
,
content
.
body
);
// We also remove the one time key used to establish that
// We also remove the one time key used to establish that
// session so we'll have to update our copy of the account object.
// session so we'll have to update our copy of the account object.
...
@@ -154,6 +155,9 @@ try_olm_decryption(const std::string &sender_key, const OlmCipherContent &msg)
...
@@ -154,6 +155,9 @@ try_olm_decryption(const std::string &sender_key, const OlmCipherContent &msg)
{
{
auto
session_ids
=
cache
::
client
()
->
getOlmSessions
(
sender_key
);
auto
session_ids
=
cache
::
client
()
->
getOlmSessions
(
sender_key
);
nhlog
::
crypto
()
->
info
(
"attempt to decrypt message with {} known session_ids"
,
session_ids
.
size
());
for
(
const
auto
&
id
:
session_ids
)
{
for
(
const
auto
&
id
:
session_ids
)
{
auto
session
=
cache
::
client
()
->
getOlmSession
(
sender_key
,
id
);
auto
session
=
cache
::
client
()
->
getOlmSession
(
sender_key
,
id
);
...
...
This diff is collapsed.
Click to expand it.
src/timeline/TimelineView.cc
+
3
−
2
View file @
4514d139
...
@@ -331,7 +331,8 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events:
...
@@ -331,7 +331,8 @@ TimelineView::parseEncryptedEvent(const mtx::events::EncryptedEvent<mtx::events:
body
[
"origin_server_ts"
]
=
e
.
origin_server_ts
;
body
[
"origin_server_ts"
]
=
e
.
origin_server_ts
;
body
[
"unsigned"
]
=
e
.
unsigned_data
;
body
[
"unsigned"
]
=
e
.
unsigned_data
;
nhlog
::
crypto
()
->
info
(
"decrypted data:
\n
{}"
,
body
.
dump
(
2
));
nhlog
::
crypto
()
->
info
(
"decrypted event: {}"
,
e
.
event_id
);
nhlog
::
crypto
()
->
debug
(
"decrypted data:
\n
{}"
,
body
.
dump
(
2
));
json
event_array
=
json
::
array
();
json
event_array
=
json
::
array
();
event_array
.
push_back
(
body
);
event_array
.
push_back
(
body
);
...
@@ -673,8 +674,8 @@ TimelineView::sendNextPendingMessage()
...
@@ -673,8 +674,8 @@ TimelineView::sendNextPendingMessage()
nhlog
::
ui
()
->
info
(
"[{}] sending next queued message"
,
m
.
txn_id
);
nhlog
::
ui
()
->
info
(
"[{}] sending next queued message"
,
m
.
txn_id
);
if
(
m
.
is_encrypted
)
{
if
(
m
.
is_encrypted
)
{
prepareEncryptedMessage
(
std
::
move
(
m
));
nhlog
::
ui
()
->
info
(
"[{}] sending encrypted event"
,
m
.
txn_id
);
nhlog
::
ui
()
->
info
(
"[{}] sending encrypted event"
,
m
.
txn_id
);
prepareEncryptedMessage
(
std
::
move
(
m
));
return
;
return
;
}
}
...
...
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