mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
fix: only set syncTarget if it's included and not empty
This commit is contained in:
parent
6f2bad9b59
commit
0fa62d1b2a
@ -29,7 +29,9 @@ class VisibleMessage : Message() {
|
|||||||
fun fromProto(proto: SignalServiceProtos.Content): VisibleMessage? {
|
fun fromProto(proto: SignalServiceProtos.Content): VisibleMessage? {
|
||||||
val dataMessage = if (proto.hasDataMessage()) proto.dataMessage else return null
|
val dataMessage = if (proto.hasDataMessage()) proto.dataMessage else return null
|
||||||
val result = VisibleMessage()
|
val result = VisibleMessage()
|
||||||
|
if (dataMessage.hasSyncTarget()) {
|
||||||
result.syncTarget = dataMessage.syncTarget
|
result.syncTarget = dataMessage.syncTarget
|
||||||
|
}
|
||||||
result.text = dataMessage.body
|
result.text = dataMessage.body
|
||||||
// Attachments are handled in MessageReceiver
|
// Attachments are handled in MessageReceiver
|
||||||
val quoteProto = if (dataMessage.hasQuote()) dataMessage.quote else null
|
val quoteProto = if (dataMessage.hasQuote()) dataMessage.quote else null
|
||||||
|
Loading…
Reference in New Issue
Block a user