Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
2aad4cfa
Commit
2aad4cfa
authored
Sep 05, 2016
by
Richard van der Hoff
Committed by
GitHub
Sep 05, 2016
Browse files
Merge pull request #15 from matrix-org/rav/has_received_message
OlmSession.has_received_message
parents
fee1748c
2e9021c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/olm/olm.h
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
...
...
javascript/olm_post.js
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
)
{
...
...
src/olm.cpp
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment