mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
parent
759ecbc7b8
commit
d61e5094de
@ -29,7 +29,7 @@ public class OutgoingMediaMessage {
|
|||||||
public OutgoingMediaMessage(Recipients recipients, SlideDeck slideDeck, String message, long sentTimeMillis, int distributionType)
|
public OutgoingMediaMessage(Recipients recipients, SlideDeck slideDeck, String message, long sentTimeMillis, int distributionType)
|
||||||
{
|
{
|
||||||
this(recipients,
|
this(recipients,
|
||||||
TextUtils.isEmpty(message) ? slideDeck.getBody() : slideDeck.getBody() + "\n\n" + message,
|
buildMessage(slideDeck, message),
|
||||||
slideDeck.asAttachments(),
|
slideDeck.asAttachments(),
|
||||||
sentTimeMillis,
|
sentTimeMillis,
|
||||||
distributionType);
|
distributionType);
|
||||||
@ -71,4 +71,13 @@ public class OutgoingMediaMessage {
|
|||||||
return sentTimeMillis;
|
return sentTimeMillis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static String buildMessage(SlideDeck slideDeck, String message) {
|
||||||
|
if (!TextUtils.isEmpty(message) && !TextUtils.isEmpty(slideDeck.getBody())) {
|
||||||
|
return slideDeck.getBody() + "\n\n" + message;
|
||||||
|
} else if (!TextUtils.isEmpty(message)) {
|
||||||
|
return message;
|
||||||
|
} else {
|
||||||
|
return slideDeck.getBody();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user