<commit_before>import ActorAppConstants from '../constants/ActorAppConstants';

const PeerTypes = ActorAppConstants.PeerTypes;

export default {
  requestSms: function(phone, callback) {
    window.messenger.requestSms(phone, callback);
  },

  sendCode: function(code, callback) {
    window.messenger.sendCode(code, callback);
  },

  signUp: function(name, cb) {
    window.messenger.signUp(name, cb);
  },

  isLoggedIn: function() {
    return window.messenger.isLoggedIn();
  },

  bindDialogs: function(callback) {
    window.messenger.bindDialogs(callback);
  },

  unbindDialogs: function(callback) {
    window.messenger.unbindDialogs(callback);
  },

  bindChat: function(peer, callback) {
    window.messenger.bindChat(peer, callback);
  },

  unbindChat: function(peer, callback) {
    window.messenger.unbindChat(peer, callback);
  },

  bindGroup: function(groupId, callback) {
    window.messenger.bindGroup(groupId, callback);
  },

  unbindGroup: function(groupId, callback) {
    window.messenger.unbindGroup(groupId, callback);
  },

  bindUser: function(userId, callback) {
    window.messenger.bindUser(userId, callback);
  },

  unbindUser: function(userId, callback) {
    window.messenger.unbindUser(userId, callback);
  },

  bindTyping: function(peer, callback) {
    window.messenger.bindTyping(peer, callback);
  },

  unbindTyping: function(peer, callback) {
    window.messenger.unbindTyping(peer, callback);
  },

  bindContacts: function(peer, callback) {
    window.messenger.bindContacts(peer, callback);
  },

  unbindContacts: function(peer, callback) {
    window.messenger.unbindContacts(peer, callback);
  },

  getUser: function(userId) {
    return window.messenger.getUser(userId);
  },

  getUid: function() {
    return window.messenger.getUid();
  },

  getGroup: function(groupId) {
    return window.messenger.getGroup(groupId);
  },

  getInviteUrl: function(groupId) {
    return window.messenger.getInviteLink(groupId);
  },

  sendTextMessage: function(peer, text) {
    window.messenger.sendMessage(peer, text);
  },

  sendFileMessage: function(peer, file) {
    window.messenger.sendFile(peer, file);
  },

  sendPhotoMessage: function(peer, photo) {
    window.messenger.sendPhoto(peer, photo);
  },

  sendClipboardPhotoMessage: function(peer, photo) {
    window.messenger.sendClipboardPhoto(peer, photo);
  },

  onMessageShown: function(peer, message) {
    window.messenger.onMessageShown(peer, message.sortKey, message.isOut);
  },

  onChatEnd (peer) {
    window.messenger.onChatEnd(peer);
  },

  onDialogsEnd () {
    window.messenger.onDialogsEnd();
  },

  onConversationOpen: function(peer) {
    window.messenger.onConversationOpen(peer);
  },

  onConversationClosed: function(peer) {
    window.messenger.onConversationClosed(peer);
  },

  onTyping: function(peer) {
    window.messenger.onTyping(peer);
  },

  onAppHidden: function() {
    window.messenger.onAppHidden();
  },

  onAppVisible: function() {
    window.messenger.onAppVisible();
  },

  editMyName: function(string) {
    window.messenger.editMyName(string);
  },

  addContact: function(uid) {
    window.messenger.addContact(uid);
  },

  removeContact: function(uid) {
    window.messenger.removeContact(uid);
  },

  joinGroup (url) {
    console.log('Joining group by url: ' + url);
    const p = window.messenger.joinGroupViaLink(url)
      .then((r) => {
        if (typeof r.java_lang_Integer_value !== 'undefined') {
          return {type: PeerTypes.GROUP, id: r.java_lang_Integer_value};
        } else {
          return r;
        }
      });
    return p;
  },

  leaveGroup: function(groupId) {
    window.messenger.leaveGroup(groupId);
  },

  kickMember: function(memberId, groupId) {
    window.messenger.kickMember(memberId, groupId);
  },

  inviteMember: function(groupId, userId) {
    return window.messenger.inviteMember(groupId, userId);
  }
};

<commit_msg>fix(web): fixed joining by url<commit_after>export default {
  requestSms: function(phone, callback) {
    window.messenger.requestSms(phone, callback);
  },

  sendCode: function(code, callback) {
    window.messenger.sendCode(code, callback);
  },

  signUp: function(name, cb) {
    window.messenger.signUp(name, cb);
  },

  isLoggedIn: function() {
    return window.messenger.isLoggedIn();
  },

  bindDialogs: function(callback) {
    window.messenger.bindDialogs(callback);
  },

  unbindDialogs: function(callback) {
    window.messenger.unbindDialogs(callback);
  },

  bindChat: function(peer, callback) {
    window.messenger.bindChat(peer, callback);
  },

  unbindChat: function(peer, callback) {
    window.messenger.unbindChat(peer, callback);
  },

  bindGroup: function(groupId, callback) {
    window.messenger.bindGroup(groupId, callback);
  },

  unbindGroup: function(groupId, callback) {
    window.messenger.unbindGroup(groupId, callback);
  },

  bindUser: function(userId, callback) {
    window.messenger.bindUser(userId, callback);
  },

  unbindUser: function(userId, callback) {
    window.messenger.unbindUser(userId, callback);
  },

  bindTyping: function(peer, callback) {
    window.messenger.bindTyping(peer, callback);
  },

  unbindTyping: function(peer, callback) {
    window.messenger.unbindTyping(peer, callback);
  },

  bindContacts: function(peer, callback) {
    window.messenger.bindContacts(peer, callback);
  },

  unbindContacts: function(peer, callback) {
    window.messenger.unbindContacts(peer, callback);
  },

  getUser: function(userId) {
    return window.messenger.getUser(userId);
  },

  getUid: function() {
    return window.messenger.getUid();
  },

  getGroup: function(groupId) {
    return window.messenger.getGroup(groupId);
  },

  getInviteUrl: function(groupId) {
    return window.messenger.getInviteLink(groupId);
  },

  sendTextMessage: function(peer, text) {
    window.messenger.sendMessage(peer, text);
  },

  sendFileMessage: function(peer, file) {
    window.messenger.sendFile(peer, file);
  },

  sendPhotoMessage: function(peer, photo) {
    window.messenger.sendPhoto(peer, photo);
  },

  sendClipboardPhotoMessage: function(peer, photo) {
    window.messenger.sendClipboardPhoto(peer, photo);
  },

  onMessageShown: function(peer, message) {
    window.messenger.onMessageShown(peer, message.sortKey, message.isOut);
  },

  onChatEnd (peer) {
    window.messenger.onChatEnd(peer);
  },

  onDialogsEnd () {
    window.messenger.onDialogsEnd();
  },

  onConversationOpen: function(peer) {
    window.messenger.onConversationOpen(peer);
  },

  onConversationClosed: function(peer) {
    window.messenger.onConversationClosed(peer);
  },

  onTyping: function(peer) {
    window.messenger.onTyping(peer);
  },

  onAppHidden: function() {
    window.messenger.onAppHidden();
  },

  onAppVisible: function() {
    window.messenger.onAppVisible();
  },

  editMyName: function(string) {
    window.messenger.editMyName(string);
  },

  addContact: function(uid) {
    window.messenger.addContact(uid);
  },

  removeContact: function(uid) {
    window.messenger.removeContact(uid);
  },

  joinGroup (url) {
    console.log('Joining group by url: ' + url);
    const p = window.messenger.joinGroupViaLink(url);

    return p;
  },

  leaveGroup: function(groupId) {
    window.messenger.leaveGroup(groupId);
  },

  kickMember: function(memberId, groupId) {
    window.messenger.kickMember(memberId, groupId);
  },

  inviteMember: function(groupId, userId) {
    return window.messenger.inviteMember(groupId, userId);
  }
};


{'fraction_non_alphanumeric': 0.13413825129361814, 'fraction_numerical': 0.0, 'mean_word_length': 4.032042723631509, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4031553', 'n_tokens_mistral': 2611, 'n_tokens_neox': 2439, 'n_words': 372}