Add unblocked timeline event

This commit is contained in:
Jamie Kyle 2024-04-12 10:07:57 -07:00 committed by GitHub
parent 92eb036196
commit ad8020848f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 333 additions and 10 deletions

View file

@ -2170,6 +2170,9 @@ export class ConversationModel extends window.Backbone
const didResponseChange = response !== currentMessageRequestState;
const wasPreviouslyAccepted = this.getAccepted();
const didUnblock =
response === messageRequestEnum.ACCEPT && this.isBlocked();
if (didResponseChange) {
if (response === messageRequestEnum.ACCEPT) {
// Only add a message when the user took an explicit action to accept
@ -2177,7 +2180,9 @@ export class ConversationModel extends window.Backbone
if (!viaStorageServiceSync) {
drop(
this.addMessageRequestResponseEventMessage(
MessageRequestResponseEvent.ACCEPT
didUnblock
? MessageRequestResponseEvent.UNBLOCK
: MessageRequestResponseEvent.ACCEPT
)
);
}