Useful comments

pull/1109/head
Vincent 5 years ago
parent b339651bda
commit 3c571770ed

@ -649,6 +649,8 @@
);
},
async updateVerified() {
console.log('[vince] conversations.js --> updateVerified()');
if (this.isPrivate()) {
await this.initialPromise;
const verified = await this.safeGetVerified();
@ -850,9 +852,12 @@
return allDeviceStatus === FriendRequestStatusEnum.friends;
},
getFriendRequestStatus() {
return this.get('friendRequestStatus');
},
async getPrimaryConversation() {
console.log('[vince] conversation.js --> getPrimaryConversation');
if (!this.isSecondaryDevice()) {
// This is already the primary conversation
return this;
@ -870,6 +875,8 @@
return this;
},
async updateTextInputState() {
console.log('[vince] conversation.js --> updateTextInputState');
if (this.isRss()) {
// or if we're an rss conversation, disable it
this.trigger('disable:input', true);
@ -919,6 +926,8 @@
return this.get('primaryDevicePubKey') || this.id;
},
async setSecondaryStatus(newStatus, primaryDevicePubKey) {
console.log('[vince] conversation.js --> setSecondaryStatus');
if (this.get('secondaryStatus') !== newStatus) {
this.set({
secondaryStatus: newStatus,
@ -930,6 +939,8 @@
}
},
async setFriendRequestStatus(newStatus, options = {}) {
console.log('[vince] conversation.js --> setFriendRequestStatus');
const { blockSync } = options;
// Ensure that the new status is a valid FriendStatusEnum value
if (!(newStatus in Object.values(FriendRequestStatusEnum))) {
@ -1536,6 +1547,13 @@
) {
this.clearTypingTimers();
console.log(`[vince] conversations.js --> body:`, body);
console.log(`[vince] conversations.js --> attachments:`, attachments);
console.log(`[vince] conversations.js --> quote:`, quote);
console.log(`[vince] conversations.js --> preview:`, preview);
console.log(`[vince] conversations.js --> groupInvitation:`, groupInvitation);
console.log(`[vince] conversations.js --> otherOptions:`, otherOptions);
const destination = this.id;
const expireTimer = this.get('expireTimer');
const recipients = this.getRecipients();

@ -40,6 +40,8 @@ class LokiMessageAPI {
}
async sendMessage(pubKey, data, messageTimeStamp, ttl, options = {}) {
console.log('[vince] outgoing_message.js --> loki_message_api.js --> sendMessage');
const {
isPublic = false,
numConnections = DEFAULT_CONNECTIONS,

@ -235,6 +235,8 @@ function initializeMigrations({
logger,
}),
upgradeMessageSchema: (message, options = {}) => {
console.log('[vince] signal.js --> upgradeMessageSchema');
const { maxVersion } = options;
return MessageType.upgradeSchema(message, {

@ -1629,6 +1629,8 @@
},
showSendConfirmationDialog(e, contacts) {
console.log('[vince] conversation_view.js --> showSendConfirmationDialog');
let message;
const isUnverified = this.model.isUnverified();
@ -1704,6 +1706,8 @@
},
async handleSubmitPressed(e, options = {}) {
console.log(`[vince] handleSubmitPressed e:`, e);
if (this.memberView.membersShown()) {
const member = this.memberView.selectedMember();
this.selectMember(member);
@ -1713,6 +1717,8 @@
},
async checkUnverifiedSendMessage(e, options = {}) {
console.log(`[vince] checkUnverifiedSendMessage e:`, e);
e.preventDefault();
this.sendStart = Date.now();
this.$messageField.attr('disabled', true);
@ -1746,6 +1752,8 @@
},
async checkUntrustedSendMessage(e, options = {}) {
console.log(`[vince] checkUntrustedSendMessage e:`, e);
_.defaults(options, { force: false });
try {
@ -1907,6 +1915,8 @@
let message = this.memberView.replaceMentions(input.val());
message = window.Signal.Emoji.replaceColons(message).trim();
const toastOptions = { type: 'info' };
// let it pass if we're still trying to read it or it's false...
if (extension.expiredStatus() === true) {
@ -2470,6 +2480,9 @@
!event.shiftKey &&
!event.ctrlKey
) {
console.log('[vince] conversation_view.hs --> handleInputEvent:', Date.now());
// enter pressed - submit the form now
event.preventDefault();
this.$('.bottom-bar form').submit();

@ -514,6 +514,8 @@ MessageSender.prototype = {
},
createSyncMessage() {
console.log('[vince] sendmessage.js --> createSyncMessage');
const syncMessage = new textsecure.protobuf.SyncMessage();
// Generate a random int from 1 and 512

Loading…
Cancel
Save