Skip to content

importContacts and getFullUser methods#34

Open
denistex wants to merge 12 commits intoenricostara:masterfrom
denistex:master
Open

importContacts and getFullUser methods#34
denistex wants to merge 12 commits intoenricostara:masterfrom
denistex:master

Conversation

@denistex
Copy link
Copy Markdown

Hi guys and thanks for the great project!

I've added a couple of API methods, review them please. Comments are welcome.

Thanks,
Denis.

@denistex denistex mentioned this pull request Sep 23, 2016
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.05%) to 90.217% when pulling f56704c on denis-it:master into 37c4a98 on enricostara:master.

@FragsterAt
Copy link
Copy Markdown

using importContacts with non-latin first or last name causes 404 error :(
how can i fix that?

@denistex
Copy link
Copy Markdown
Author

Hi @FragsterAt,

It looks like request with non-latin characters constructed incorrectly, so the server returns 404. I think good points to start research are following:

Hope this helps.

@FragsterAt
Copy link
Copy Markdown

@denis-it At first glance, this solves the problem:

// Write the `string` value given as argument
TypeObject.prototype.writeString = function (str) {
    //return this.writeBytes(str);
    return this.writeBytes(Buffer.from(str));
};

you can use it same way in https://github.com/goodmind/telegram-mtproto and https://github.com/zerobias/telegram-mtproto if they're buggy. I can not check, because I can't call importContacts with any arguments: zerobias/telegram-mtproto#6

cc @zerobias

@denistex
Copy link
Copy Markdown
Author

I've checked it, working fine with Buffer.from(str). Good work, @FragsterAt! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants