@@ -134,7 +134,7 @@ session::config::contact_info deserialize_contact(JNIEnv *env, jobject info, ses
134
134
135
135
jobject serialize_blinded_contact (JNIEnv *env, const session::config::blinded_contact_info &info) {
136
136
jni_utils::JavaLocalRef<jclass> clazz (env, env->FindClass (" network/loki/messenger/libsession_util/util/BlindedContact" ));
137
- auto constructor = env->GetMethodID (clazz.get (), " <init>" , " (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JLnetwork /loki/messenger/libsession_util/util/UserPic;)V" );
137
+ auto constructor = env->GetMethodID (clazz.get (), " <init>" , " (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJLnetwork /loki/messenger/libsession_util/util/UserPic;)V" );
138
138
139
139
return env->NewObject (
140
140
clazz.get (),
@@ -144,6 +144,7 @@ jobject serialize_blinded_contact(JNIEnv *env, const session::config::blinded_co
144
144
jni_utils::JavaLocalRef (env, env->NewStringUTF (info.community_pubkey_hex ().data ())).get (),
145
145
jni_utils::JavaLocalRef (env, env->NewStringUTF (info.name .c_str ())).get (),
146
146
(jlong) (info.created .time_since_epoch ().count ()),
147
+ (jlong) (info.profile_updated .time_since_epoch ().count ()),
147
148
jni_utils::JavaLocalRef (env, util::serialize_user_pic (env, info.profile_picture )).get ()
148
149
);
149
150
}
@@ -155,6 +156,7 @@ session::config::blinded_contact_info deserialize_blinded_contact(JNIEnv *env, j
155
156
auto getCommunityServerPubKey = env->GetMethodID (clazz.get (), " getCommunityServerPubKey" , " ()[B" );
156
157
auto nameField = env->GetFieldID (clazz.get (), " name" , " Ljava/lang/String;" );
157
158
auto createdEpochSecondsField = env->GetFieldID (clazz.get (), " createdEpochSeconds" , " J" );
159
+ auto profileUpdatedEpochSecondsField = env->GetFieldID (clazz.get (), " profileUpdatedEpochSeconds" , " J" );
158
160
auto profilePicField = env->GetFieldID (clazz.get (), " profilePic" , " Lnetwork/loki/messenger/libsession_util/util/UserPic;" );
159
161
160
162
session::config::blinded_contact_info info (
@@ -165,6 +167,7 @@ session::config::blinded_contact_info deserialize_blinded_contact(JNIEnv *env, j
165
167
info.created = std::chrono::sys_seconds{std::chrono::seconds{env->GetLongField (jInfo, createdEpochSecondsField)}};
166
168
info.profile_picture = util::deserialize_user_pic (env, jni_utils::JavaLocalRef (env, env->GetObjectField (jInfo, profilePicField)).get ());
167
169
info.name = jni_utils::JavaStringRef (env, jni_utils::JavaLocalRef (env, (jstring) env->GetObjectField (jInfo, nameField)).get ()).view ();
170
+ info.profile_updated = std::chrono::sys_seconds{std::chrono::seconds{env->GetLongField (jInfo, profileUpdatedEpochSecondsField)}};
168
171
169
172
return info;
170
173
}
0 commit comments