rename respondToAll.. FR to updateAll...Messages at is does not send any messages

pull/1137/head
Audric Ackermann 5 years ago
parent 8512c2307b
commit a857406728
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -1769,13 +1769,6 @@
details details
); );
libloki.api.debug.logContactSync(
'Got sync contact message with',
id,
' details:',
details
);
if (id === textsecure.storage.user.getNumber()) { if (id === textsecure.storage.user.getNumber()) {
// special case for syncing details about ourselves // special case for syncing details about ourselves
if (details.profileKey) { if (details.profileKey) {

@ -975,7 +975,7 @@
Conversation: Whisper.Conversation, Conversation: Whisper.Conversation,
}); });
}, },
async respondToAllFriendRequests(options) { async updateAllFriendRequestsMessages(options) {
const { response, status, direction = null } = options; const { response, status, direction = null } = options;
// Ignore if no response supplied // Ignore if no response supplied
if (!response) { if (!response) {
@ -1029,8 +1029,8 @@
}) })
); );
}, },
async respondToAllPendingFriendRequests(options) { async updateAllPendingFriendRequestsMessages(options) {
return this.respondToAllFriendRequests({ return this.updateAllFriendRequestsMessages({
...options, ...options,
status: 'pending', status: 'pending',
}); });
@ -1045,7 +1045,7 @@
// We have declined an incoming friend request // We have declined an incoming friend request
async onDeclineFriendRequest() { async onDeclineFriendRequest() {
this.setFriendRequestStatus(FriendRequestStatusEnum.none); this.setFriendRequestStatus(FriendRequestStatusEnum.none);
await this.respondToAllPendingFriendRequests({ await this.updateAllPendingFriendRequestsMessages({
response: 'declined', response: 'declined',
direction: 'incoming', direction: 'incoming',
}); });
@ -1068,7 +1068,7 @@
if (this.hasReceivedFriendRequest()) { if (this.hasReceivedFriendRequest()) {
this.setFriendRequestStatus(FriendRequestStatusEnum.friends, options); this.setFriendRequestStatus(FriendRequestStatusEnum.friends, options);
await this.respondToAllFriendRequests({ await this.updateAllFriendRequestsMessages({
response: 'accepted', response: 'accepted',
direction: 'incoming', direction: 'incoming',
status: ['pending', 'expired'], status: ['pending', 'expired'],
@ -1096,7 +1096,7 @@
} }
if (this.hasSentFriendRequest()) { if (this.hasSentFriendRequest()) {
this.setFriendRequestStatus(FriendRequestStatusEnum.friends); this.setFriendRequestStatus(FriendRequestStatusEnum.friends);
await this.respondToAllFriendRequests({ await this.updateAllFriendRequestsMessages({
response: 'accepted', response: 'accepted',
status: ['pending', 'expired'], status: ['pending', 'expired'],
}); });
@ -1128,7 +1128,7 @@
} }
// Change any pending outgoing friend requests to expired // Change any pending outgoing friend requests to expired
await this.respondToAllPendingFriendRequests({ await this.updateAllPendingFriendRequestsMessages({
response: 'expired', response: 'expired',
direction: 'outgoing', direction: 'outgoing',
}); });
@ -1141,7 +1141,7 @@
await Promise.all([ await Promise.all([
this.setFriendRequestStatus(FriendRequestStatusEnum.friends), this.setFriendRequestStatus(FriendRequestStatusEnum.friends),
// Accept all outgoing FR // Accept all outgoing FR
this.respondToAllPendingFriendRequests({ this.updateAllPendingFriendRequestsMessages({
direction: 'outgoing', direction: 'outgoing',
response: 'accepted', response: 'accepted',
}), }),

@ -46,7 +46,7 @@
} }
function logContactSync(...args) { function logContactSync(...args) {
if (debugFlags & DebugFlagsEnum.GROUP_CONTACT_MESSAGES) { if (debugFlags & DebugFlagsEnum.CONTACT_SYNC_MESSAGES) {
debugLogFn(...args); debugLogFn(...args);
} }
} }

Loading…
Cancel
Save