mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:37:26 +00:00
Update copy
This commit is contained in:
@@ -1059,7 +1059,7 @@ open class Storage @Inject constructor(
|
||||
}
|
||||
|
||||
override fun insertGroupInviteControlMessage(sentTimestamp: Long, senderPublicKey: String, closedGroup: AccountId, groupName: String): Long? {
|
||||
val updateData = UpdateMessageData(UpdateMessageData.Kind.GroupInvitation(senderPublicKey, groupName))
|
||||
val updateData = UpdateMessageData(UpdateMessageData.Kind.GroupInvitation(closedGroup.hexString, senderPublicKey, groupName))
|
||||
return insertUpdateControlMessage(updateData, sentTimestamp, senderPublicKey, closedGroup)
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@ import android.text.style.StyleSpan;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import org.session.libsession.messaging.MessagingModuleConfiguration;
|
||||
import org.session.libsession.messaging.calls.CallMessageType;
|
||||
import org.session.libsession.messaging.sending_receiving.data_extraction.DataExtractionNotificationInfoMessage;
|
||||
import org.session.libsession.messaging.utilities.UpdateMessageBuilder;
|
||||
@@ -118,7 +119,16 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
public CharSequence getDisplayBody(@NonNull Context context) {
|
||||
if (isGroupUpdateMessage()) {
|
||||
UpdateMessageData updateMessageData = UpdateMessageData.Companion.fromJSON(getBody());
|
||||
return new SpannableString(UpdateMessageBuilder.INSTANCE.buildGroupUpdateMessage(context, updateMessageData, getIndividualRecipient().getAddress().serialize(), isOutgoing(), true));
|
||||
if (updateMessageData == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return new SpannableString(UpdateMessageBuilder.buildGroupUpdateMessage(
|
||||
context,
|
||||
updateMessageData,
|
||||
MessagingModuleConfiguration.getShared().getConfigFactory(),
|
||||
isOutgoing())
|
||||
);
|
||||
} else if (isExpirationTimerUpdate()) {
|
||||
int seconds = (int) (getExpiresIn() / 1000);
|
||||
boolean isGroup = DatabaseComponent.get(context).threadDatabase().getRecipientForThreadId(getThreadId()).isGroupRecipient();
|
||||
|
@@ -556,7 +556,6 @@ class GroupManagerV2Impl @Inject constructor(
|
||||
val responseData = GroupUpdateMessage.newBuilder()
|
||||
.setInviteResponse(inviteResponse)
|
||||
val responseMessage = GroupUpdated(responseData.build())
|
||||
storage.clearMessages(threadId)
|
||||
// this will fail the first couple of times :)
|
||||
MessageSender.send(
|
||||
responseMessage,
|
||||
|
@@ -404,11 +404,12 @@ class DefaultConversationRepository @Inject constructor(
|
||||
destination = Destination.from(recipient.address),
|
||||
isSyncMessage = recipient.isLocalNumber
|
||||
).await()
|
||||
|
||||
// add a control message for our user
|
||||
storage.insertMessageRequestResponseFromYou(threadId)
|
||||
}
|
||||
|
||||
threadDb.setHasSent(threadId, true)
|
||||
// add a control message for our user
|
||||
storage.insertMessageRequestResponseFromYou(threadId)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user