mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-14 22:27:47 +00:00
WIP: message receiver handler for unsend request
This commit is contained in:
@@ -177,6 +177,14 @@ class DatabaseAttachmentProvider(context: Context, helper: SQLCipherOpenHelper)
|
||||
DatabaseFactory.getLokiMessageDatabase(context).deleteMessage(messageID, isSms)
|
||||
}
|
||||
|
||||
override fun updateMessageAsDeleted(messageID: Long) {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun getServerHashForMessage(messageID: Long): String? {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun getDatabaseAttachment(attachmentId: Long): DatabaseAttachment? {
|
||||
val attachmentDatabase = DatabaseFactory.getAttachmentDatabase(context)
|
||||
return attachmentDatabase.getAttachment(AttachmentId(attachmentId, 0))
|
||||
|
@@ -49,6 +49,7 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
private final long expireStarted;
|
||||
private final boolean unidentified;
|
||||
public final long id;
|
||||
public final boolean deleted;
|
||||
|
||||
public abstract boolean isMms();
|
||||
public abstract boolean isMmsNotification();
|
||||
@@ -71,6 +72,7 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
this.expiresIn = expiresIn;
|
||||
this.expireStarted = expireStarted;
|
||||
this.unidentified = unidentified;
|
||||
this.deleted = false;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
@@ -103,7 +105,9 @@ public abstract class MessageRecord extends DisplayRecord {
|
||||
|
||||
@Override
|
||||
public SpannableString getDisplayBody(@NonNull Context context) {
|
||||
if (isGroupUpdateMessage()) {
|
||||
if (this.deleted) {
|
||||
return new SpannableString("This message has been deleted."); // TODO: localize
|
||||
} else if (isGroupUpdateMessage()) {
|
||||
UpdateMessageData updateMessageData = UpdateMessageData.Companion.fromJSON(getBody());
|
||||
return new SpannableString(UpdateMessageBuilder.INSTANCE.buildGroupUpdateMessage(context, updateMessageData, getIndividualRecipient().getAddress().serialize(), isOutgoing()));
|
||||
} else if (isExpirationTimerUpdate()) {
|
||||
|
Reference in New Issue
Block a user