models/messages.initialize: If no ourConversationId, skip migration
This commit is contained in:
@@ -226,15 +226,19 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const sendStateByConversationId = migrateLegacySendAttributes(
|
const ourConversationId =
|
||||||
this.attributes,
|
window.ConversationController.getOurConversationId();
|
||||||
window.ConversationController.get.bind(window.ConversationController),
|
if (ourConversationId) {
|
||||||
window.ConversationController.getOurConversationIdOrThrow()
|
const sendStateByConversationId = migrateLegacySendAttributes(
|
||||||
);
|
this.attributes,
|
||||||
if (sendStateByConversationId) {
|
window.ConversationController.get.bind(window.ConversationController),
|
||||||
this.set('sendStateByConversationId', sendStateByConversationId, {
|
ourConversationId
|
||||||
silent: true,
|
);
|
||||||
});
|
if (sendStateByConversationId) {
|
||||||
|
this.set('sendStateByConversationId', sendStateByConversationId, {
|
||||||
|
silent: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CURRENT_PROTOCOL_VERSION = Proto.DataMessage.ProtocolVersion.CURRENT;
|
this.CURRENT_PROTOCOL_VERSION = Proto.DataMessage.ProtocolVersion.CURRENT;
|
||||||
|
Reference in New Issue
Block a user