fix: proper sending of join URL and removing server timestamp in proto parsing

This commit is contained in:
jubb 2021-05-05 17:46:53 +10:00
parent e8bac5005e
commit 14a02a8511
2 changed files with 1 additions and 2 deletions

View File

@ -39,7 +39,7 @@ data class OpenGroupV2(
} }
fun toJoinUrl(): String = "$server/$id?public_key=$publicKey" fun toJoinUrl(): String = "$server/$room?public_key=$publicKey"
fun toJson(): Map<String,String> = mapOf( fun toJson(): Map<String,String> = mapOf(
"room" to room, "room" to room,

View File

@ -97,7 +97,6 @@ class OpenGroupV2Poller(private val openGroups: List<OpenGroupV2>, private val e
builder.source = senderPublicKey builder.source = senderPublicKey
builder.sourceDevice = 1 builder.sourceDevice = 1
builder.content = message.toProto().toByteString() builder.content = message.toProto().toByteString()
builder.serverTimestamp = message.serverID ?: 0
builder.timestamp = message.sentTimestamp builder.timestamp = message.sentTimestamp
val envelope = builder.build() val envelope = builder.build()
val job = MessageReceiveJob(envelope.toByteArray(), isBackgroundPoll, message.serverID, serverRoomId) val job = MessageReceiveJob(envelope.toByteArray(), isBackgroundPoll, message.serverID, serverRoomId)