mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
adding setting of active_at to hide unapproved messages.
This commit is contained in:
parent
cb5551c1e9
commit
e5a203a48e
|
@ -1407,6 +1407,10 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
|
|||
this.set({
|
||||
isApproved: value,
|
||||
});
|
||||
|
||||
// to exclude the conversation from left pane messages list and message requests
|
||||
if (value === false) this.set({ active_at: undefined });
|
||||
|
||||
await this.commit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -314,8 +314,8 @@ async function handleRegularMessage(
|
|||
if (type === 'outgoing') {
|
||||
handleSyncedReceipts(message, conversation);
|
||||
|
||||
// TODO: Can we assume sync receipts are always from linked device outgoings?
|
||||
if (dataMessage.body !== 'unapprove') conversation.setIsApproved(true);
|
||||
// assumes sync receipts are always from linked device outgoings?
|
||||
conversation.setIsApproved(true);
|
||||
}
|
||||
|
||||
const conversationActiveAt = conversation.get('active_at');
|
||||
|
|
Loading…
Reference in a new issue