aboutsummaryrefslogtreecommitdiff
path: root/src/olm.cpp
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-09-04 23:34:24 +0100
committerRichard van der Hoff <richard@matrix.org>2016-09-04 23:41:10 +0100
commit2e9021c2e73786e9045c0634c43efa86f18ac8de (patch)
treec6296948704c35edad11eb0474aaf51c7d15698a /src/olm.cpp
parent0c3f527dfd46d3056d5b3690836c102f0e0adfb4 (diff)
OlmSession.has_received_message
I find myself wanting to know if an OlmSession is in the pre-key state or not, to help debugging at the application level.
Diffstat (limited to 'src/olm.cpp')
-rw-r--r--src/olm.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/olm.cpp b/src/olm.cpp
index 682a84c..7f68ad0 100644
--- a/src/olm.cpp
+++ b/src/olm.cpp
@@ -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