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
911b461e
Commit
911b461e
authored
4 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Fix corrupt channel + add additional debugging
parent
cea7f457
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
io.github.NhekoReborn.Nheko.json
+1
-1
1 addition, 1 deletion
io.github.NhekoReborn.Nheko.json
src/Olm.cpp
+9
-0
9 additions, 0 deletions
src/Olm.cpp
with
11 additions
and
2 deletions
CMakeLists.txt
+
1
−
1
View file @
911b461e
...
...
@@ -340,7 +340,7 @@ if(USE_BUNDLED_MTXCLIENT)
FetchContent_Declare
(
MatrixClient
GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG
da9958e14e035fbf22d498074d381b2ea0092a9d
GIT_TAG
6432e89a3465e58ed838dd2abdcb0f91bd4f05b0
)
FetchContent_MakeAvailable
(
MatrixClient
)
else
()
...
...
This diff is collapsed.
Click to expand it.
io.github.NhekoReborn.Nheko.json
+
1
−
1
View file @
911b461e
...
...
@@ -146,7 +146,7 @@
"name"
:
"mtxclient"
,
"sources"
:
[
{
"commit"
:
"
da9958e14e035fbf22d498074d381b2ea0092a9d
"
,
"commit"
:
"
6432e89a3465e58ed838dd2abdcb0f91bd4f05b0
"
,
"type"
:
"git"
,
"url"
:
"https://github.com/Nheko-Reborn/mtxclient.git"
}
...
...
This diff is collapsed.
Click to expand it.
src/Olm.cpp
+
9
−
0
View file @
911b461e
...
...
@@ -246,6 +246,8 @@ handle_pre_key_olm_message(const std::string &sender,
nhlog
::
crypto
()
->
debug
(
"decrypted message:
\n
{}"
,
plaintext
.
dump
(
2
));
try
{
nhlog
::
crypto
()
->
debug
(
"New olm session: {}"
,
mtx
::
crypto
::
session_id
(
inbound_session
.
get
()));
cache
::
saveOlmSession
(
sender_key
,
std
::
move
(
inbound_session
),
QDateTime
::
currentMSecsSinceEpoch
());
}
catch
(
const
lmdb
::
error
&
e
)
{
...
...
@@ -315,6 +317,8 @@ try_olm_decryption(const std::string &sender_key, const mtx::events::msg::OlmCip
try
{
text
=
olm
::
client
()
->
decrypt_message
(
session
->
get
(),
msg
.
type
,
msg
.
body
);
nhlog
::
crypto
()
->
debug
(
"Updated olm session: {}"
,
mtx
::
crypto
::
session_id
(
session
->
get
()));
cache
::
saveOlmSession
(
id
,
std
::
move
(
session
.
value
()),
QDateTime
::
currentMSecsSinceEpoch
());
}
catch
(
const
mtx
::
crypto
::
olm_exception
&
e
)
{
...
...
@@ -651,6 +655,8 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s
.
get
<
mtx
::
events
::
msg
::
OlmEncrypted
>
();
try
{
nhlog
::
crypto
()
->
debug
(
"Updated olm session: {}"
,
mtx
::
crypto
::
session_id
(
session
->
get
()));
cache
::
saveOlmSession
(
d
.
keys
.
at
(
"curve25519:"
+
device
),
std
::
move
(
*
session
),
QDateTime
::
currentMSecsSinceEpoch
());
...
...
@@ -722,6 +728,9 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s
.
get
<
mtx
::
events
::
msg
::
OlmEncrypted
>
();
try
{
nhlog
::
crypto
()
->
debug
(
"Updated olm session: {}"
,
mtx
::
crypto
::
session_id
(
session
.
get
()));
cache
::
saveOlmSession
(
id_key
,
std
::
move
(
session
),
...
...
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