Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mtxclient
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
mtxclient
Commits
5cc8bced
Verified
Commit
5cc8bced
authored
5 years ago
by
Joe Donofry
Browse files
Options
Downloads
Patches
Plain Diff
Fix wrong integer size on previous commit
parent
8f17f050
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/mtx/events/encrypted.hpp
+1
-1
1 addition, 1 deletion
include/mtx/events/encrypted.hpp
lib/structs/events/encrypted.cpp
+9
-9
9 additions, 9 deletions
lib/structs/events/encrypted.cpp
with
10 additions
and
10 deletions
include/mtx/events/encrypted.hpp
+
1
−
1
View file @
5cc8bced
...
...
@@ -129,7 +129,7 @@ struct KeyVerificationRequest
//! The POSIX timestamp in milliseconds for when the request was made. If the request is in
//! the future by more than 5 minutes or more than 10 minutes in the past, the message
//! should be ignored by the receiver.
uint
32
_t
timestamp
;
uint
64
_t
timestamp
;
//! The type of the event.
mtx
::
events
::
EventType
type
;
};
...
...
This diff is collapsed.
Click to expand it.
lib/structs/events/encrypted.cpp
+
9
−
9
View file @
5cc8bced
...
...
@@ -135,21 +135,21 @@ to_json(json &obj, const KeyRequest &event)
void
from_json
(
const
json
&
obj
,
KeyVerificationRequest
&
event
)
{
event
.
from_device
=
obj
.
at
(
"from_device"
).
get
<
std
::
string
>
();
event
.
methods
=
obj
.
at
(
"methods"
).
get
<
std
::
vector
<
std
::
string
>>
();
event
.
timestamp
=
obj
.
at
(
"timestamp"
).
get
<
uint
32
_t
>
();
event
.
transaction_id
=
obj
.
at
(
"transaction_id"
).
get
<
std
::
string
>
();
event
.
from_device
=
obj
.
at
(
"
content"
).
at
(
"
from_device"
).
get
<
std
::
string
>
();
event
.
methods
=
obj
.
at
(
"
content"
).
at
(
"
methods"
).
get
<
std
::
vector
<
std
::
string
>>
();
event
.
timestamp
=
obj
.
at
(
"
content"
).
at
(
"
timestamp"
).
get
<
uint
64
_t
>
();
event
.
transaction_id
=
obj
.
at
(
"
content"
).
at
(
"
transaction_id"
).
get
<
std
::
string
>
();
event
.
type
=
mtx
::
events
::
getEventType
(
obj
.
at
(
"type"
).
get
<
std
::
string
>
());
}
void
to_json
(
json
&
obj
,
const
KeyVerificationRequest
&
event
)
{
obj
[
"from_device"
]
=
event
.
from_device
;
obj
[
"methods"
]
=
event
.
methods
;
obj
[
"timestamp"
]
=
event
.
timestamp
;
obj
[
"transaction_id"
]
=
event
.
transaction_id
;
obj
[
"type"
]
=
to_string
(
event
.
type
);
obj
[
"
content"
][
"
from_device"
]
=
event
.
from_device
;
obj
[
"
content"
][
"
methods"
]
=
event
.
methods
;
obj
[
"
content"
][
"
timestamp"
]
=
event
.
timestamp
;
obj
[
"
content"
][
"
transaction_id"
]
=
event
.
transaction_id
;
obj
[
"type"
]
=
to_string
(
event
.
type
);
}
}
// namespace msg
...
...
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