botman / driver-telegram

BotMan Telegram Driver
MIT License
87 stars 75 forks source link

added contact driver #52

Closed hanc2006 closed 5 years ago

holtkamp commented 5 years ago

Nice contribution @hanc2006 !

@mpociot are you considering a new minor release for this?

holtkamp commented 5 years ago

mmm, when looking closer it seems some files are missing?

So I suppose this is work-in-progress πŸ˜„

hanc2006 commented 5 years ago

Hi @holtkamp, BotMan\BotMan\Messages\Attachments\Contact is not in this repository. Is a part of botman/botman project. You can use the contact attachment inside a conversation like:

...

$this->askForContact('Please send us your phone number.', function (Contact $contact) {
     $this->say('Thank you. Your contact has been linked.');
},
null,
Keyboard::create()
   ->type(Keyboard::TYPE_KEYBOARD)
   ->oneTimeKeyboard()
   ->resizeKeyboard()
   ->addRow(KeyboardButton::create('Phone number')->requestContact())
   ->toArray()
);

...
holtkamp commented 5 years ago

@hanc2006 thanks for the swift heads-up!

Aah, yeah, found it here: https://github.com/botman/botman/blob/cfa07d5734fdaf2b6cc4c8eb501b747d93c1f2b3/src/Messages/Attachments/Contact.php

But what about BotMan\Drivers\Telegram\TelegramContactDriver?

When looking at the master branch of this repo https://github.com/botman/driver-telegram, no such class is currently part of it...

https://github.com/botman/driver-telegram/tree/5ced1597ed9c7eae842ca9c09ef61478821172db/src

hence my doubt...

hanc2006 commented 5 years ago

Yes right. It’s for manual loading the driver. I will pull the new file with changes πŸ‘

holtkamp commented 5 years ago

@hanc2006 I noticed you updated the feature branch: https://github.com/hanc2006/driver-telegram/tree/contact-driver

with the TelegramContactDriver

Looking forward to work with this! So would a new Pull Request be applicable?

holtkamp commented 5 years ago

@hanc2006 and @mpociot bump on this?

the TelegramContactDriver

is still missing from https://github.com/botman/driver-telegram/tree/master/src

It seems this PR never got merged in the fork and this repo

https://github.com/hanc2006/driver-telegram/pull/1