|
|
|
@ -1366,7 +1366,11 @@ MessageReceiver.prototype.extend({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (friendRequest) {
|
|
|
|
// If we got a friend request message or
|
|
|
|
|
|
|
|
// if we're not friends with the current user that sent this private message
|
|
|
|
|
|
|
|
// Check to see if we need to auto accept their friend request
|
|
|
|
|
|
|
|
const isGroupMessage = !!groupId;
|
|
|
|
|
|
|
|
if (friendRequest || (!isGroupMessage && !conversation.isFriend())) {
|
|
|
|
if (isMe) {
|
|
|
|
if (isMe) {
|
|
|
|
window.log.info('refusing to add a friend request to ourselves');
|
|
|
|
window.log.info('refusing to add a friend request to ourselves');
|
|
|
|
throw new Error('Cannot add a friend request for ourselves!');
|
|
|
|
throw new Error('Cannot add a friend request for ourselves!');
|
|
|
|
|