Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Olm
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
Olm
Commits
2aad4cfa
Commit
2aad4cfa
authored
8 years ago
by
Richard van der Hoff
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #15 from matrix-org/rav/has_received_message
OlmSession.has_received_message
parents
fee1748c
2e9021c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/olm/olm.h
+4
-0
4 additions, 0 deletions
include/olm/olm.h
javascript/olm_post.js
+7
-0
7 additions, 0 deletions
javascript/olm_post.js
src/olm.cpp
+6
-0
6 additions, 0 deletions
src/olm.cpp
with
17 additions
and
0 deletions
include/olm/olm.h
+
4
−
0
View file @
2aad4cfa
...
...
@@ -300,6 +300,10 @@ size_t olm_session_id(
void
*
id
,
size_t
id_length
);
int
olm_session_has_received_message
(
OlmSession
*
session
);
/** Checks if the PRE_KEY message is for this in-bound session. This can happen
* if multiple messages are sent to this account before this account sends a
* message in reply. Returns olm_error() on failure. If the base64
...
...
This diff is collapsed.
Click to expand it.
javascript/olm_post.js
+
7
−
0
View file @
2aad4cfa
...
...
@@ -263,6 +263,13 @@ Session.prototype['session_id'] = restore_stack(function() {
return
Pointer_stringify
(
id_buffer
);
});
Session
.
prototype
[
'
has_received_message
'
]
=
function
()
{
return
session_method
(
Module
[
'
_olm_session_has_received_message
'
])(
this
.
ptr
)
?
true
:
false
;
};
Session
.
prototype
[
'
matches_inbound
'
]
=
restore_stack
(
function
(
one_time_key_message
)
{
...
...
This diff is collapsed.
Click to expand it.
src/olm.cpp
+
6
−
0
View file @
2aad4cfa
...
...
@@ -529,6 +529,12 @@ size_t olm_session_id(
}
int
olm_session_has_received_message
(
OlmSession
*
session
)
{
return
from_c
(
session
)
->
received_message
;
}
size_t
olm_matches_inbound_session
(
OlmSession
*
session
,
void
*
one_time_key_message
,
size_t
message_length
...
...
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