<commit_before>/**
 * Created by kamalnrf
 */

'use strict';

const msg_me = require('../../msg-me');

const Connection = {
    estConnection (convo, payload, bot){
        console.log("Entered establishing connection");

        const question = "Enter the username you want to connect with.";

        const answer = (payload, chat) => {
            const userName = payload.message.text;
            const senderID = payload.sender.id;

            msg_me.isExiting(userName)
                .then(existense => {
                    //Checks if the usersname exists. if so finds the users fbID.
                    if (existense)
                        msg_me.findUser(userName)
                            .then(recieverID => {
                                msg_me.isOnline(recieverID)
                                    .then(isOnline => {
                                        //Checks whether the user is online.
                                        if (isOnline)
                                            msg_me.isConnected(recieverID)
                                                .then(conected => {
                                                    console.log(`Connected: ${conected}`);
                                                    //Checks if the user is not connected to anyone.
                                                    if (conected !== true || conected !== "true")
                                                        if (msg_me.connect(senderID, recieverID) === true) {<commit_msg>patch<commit_after>/**
 * Created by kamalnrf
 */

'use strict';

const msg_me = require('../../msg-me');

const Connection = {
    estConnection (convo, payload, bot){
        console.log("Entered establishing connection");

        const question = "Enter the username you want to connect with.";

        const answer = (payload, chat) => {
            const userName = payload.message.text;
            const senderID = payload.sender.id;

            msg_me.isExiting(userName)
                .then(existense => {
                    //Checks if the usersname exists. if so finds the users fbID.
                    if (existense)
                        msg_me.findUser(userName)
                            .then(recieverID => {
                                msg_me.isOnline(recieverID)
                                    .then(isOnline => {
                                        //Checks whether the user is online.
                                        if (isOnline === 'true' || isOnline === true)
                                            msg_me.isConnected(recieverID)
                                                .then(conected => {
                                                    console.log(`Connected: ${conected}`);
                                                    //Checks if the user is not connected to anyone.
                                                    if (conected !== true || conected !== "true")
                                                        if (msg_me.connect(senderID, recieverID) === true) {
{'fraction_non_alphanumeric': 0.0912621359223301, 'fraction_numerical': 0.0, 'mean_word_length': 0.9801409352978859, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3294119', 'n_tokens_mistral': 675, 'n_tokens_neox': 645, 'n_words': 177}