Move link notification to the conversation hero
This commit is contained in:
parent
5f3a62cbb6
commit
2f44e33c9c
26 changed files with 174 additions and 350 deletions
|
@ -219,8 +219,6 @@ export class ConversationModel extends window.Backbone
|
|||
|
||||
private isFetchingUUID?: boolean;
|
||||
|
||||
private hasAddedHistoryDisclaimer?: boolean;
|
||||
|
||||
private lastIsTyping?: boolean;
|
||||
|
||||
private muteTimer?: NodeJS.Timer;
|
||||
|
@ -4578,38 +4576,6 @@ export class ConversationModel extends window.Backbone
|
|||
return message;
|
||||
}
|
||||
|
||||
async addMessageHistoryDisclaimer(): Promise<void> {
|
||||
const timestamp = Date.now();
|
||||
|
||||
if (this.hasAddedHistoryDisclaimer) {
|
||||
log.warn(
|
||||
`addMessageHistoryDisclaimer/${this.idForLogging()}: Refusing to add another this session`
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.hasAddedHistoryDisclaimer = true;
|
||||
|
||||
const model = new window.Whisper.Message({
|
||||
type: 'message-history-unsynced',
|
||||
readStatus: ReadStatus.Read,
|
||||
seenStatus: SeenStatus.NotApplicable,
|
||||
conversationId: this.id,
|
||||
sent_at: timestamp,
|
||||
received_at: window.Signal.Util.incrementMessageCounter(),
|
||||
received_at_ms: timestamp,
|
||||
// TODO: DESKTOP-722
|
||||
} as unknown as MessageAttributesType);
|
||||
|
||||
const id = await window.Signal.Data.saveMessage(model.attributes, {
|
||||
ourUuid: window.textsecure.storage.user.getCheckedUuid().toString(),
|
||||
});
|
||||
|
||||
model.set({ id });
|
||||
|
||||
const message = window.MessageController.register(id, model);
|
||||
this.addSingleMessage(message);
|
||||
}
|
||||
|
||||
isSearchable(): boolean {
|
||||
return !this.get('left');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue