mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
resend invitation if send has failed
This commit is contained in:
parent
2f0509a03b
commit
e1b8f10eec
@ -38,11 +38,12 @@ import androidx.loader.content.Loader;
|
||||
|
||||
|
||||
import org.session.libsession.messaging.messages.visible.LinkPreview;
|
||||
import org.session.libsession.messaging.messages.visible.OpenGroupInvitation;
|
||||
import org.session.libsession.messaging.messages.visible.Quote;
|
||||
import org.session.libsession.messaging.messages.visible.VisibleMessage;
|
||||
import org.session.libsession.messaging.open_groups.OpenGroup;
|
||||
import org.session.libsession.messaging.sending_receiving.MessageSender;
|
||||
import org.session.libsession.messaging.sending_receiving.attachments.Attachment;
|
||||
import org.session.libsession.messaging.utilities.UpdateMessageData;
|
||||
import org.thoughtcrime.securesms.MessageDetailsRecipientAdapter.RecipientDeliveryStatus;
|
||||
import org.session.libsession.utilities.color.MaterialColor;
|
||||
import org.thoughtcrime.securesms.conversation.ConversationItem;
|
||||
@ -448,7 +449,18 @@ public class MessageDetailsActivity extends PassphraseRequiredActionBarActivity
|
||||
Recipient recipient = messageRecord.getRecipient();
|
||||
VisibleMessage message = new VisibleMessage();
|
||||
message.setId(messageRecord.getId());
|
||||
if (messageRecord.isOpenGroupInvitation()) {
|
||||
OpenGroupInvitation openGroupInvitation = new OpenGroupInvitation();
|
||||
UpdateMessageData updateMessageData = UpdateMessageData.Companion.fromJSON(messageRecord.getBody());
|
||||
if (updateMessageData.getKind() instanceof UpdateMessageData.Kind.OpenGroupInvitation) {
|
||||
UpdateMessageData.Kind.OpenGroupInvitation data = (UpdateMessageData.Kind.OpenGroupInvitation)updateMessageData.getKind();
|
||||
openGroupInvitation.setGroupName(data.getGroupName());
|
||||
openGroupInvitation.setGroupUrl(data.getGroupUrl());
|
||||
}
|
||||
message.setOpenGroupInvitation(openGroupInvitation);
|
||||
} else {
|
||||
message.setText(messageRecord.getBody());
|
||||
}
|
||||
message.setSentTimestamp(messageRecord.getTimestamp());
|
||||
if (recipient.isGroupRecipient()) {
|
||||
message.setGroupPublicKey(recipient.getAddress().toGroupString());
|
||||
|
@ -65,7 +65,6 @@ import org.session.libsession.messaging.threads.recipients.Recipient;
|
||||
import org.session.libsession.messaging.threads.recipients.RecipientModifiedListener;
|
||||
import org.session.libsession.messaging.utilities.UpdateMessageData;
|
||||
import org.session.libsession.utilities.GroupUtil;
|
||||
import org.session.libsession.utilities.OpenGroupUrlParser;
|
||||
import org.session.libsession.utilities.TextSecurePreferences;
|
||||
import org.session.libsession.utilities.ThemeUtil;
|
||||
import org.session.libsession.utilities.Util;
|
||||
|
Loading…
x
Reference in New Issue
Block a user