botman / driver-facebook

BotMan Facebook Messenger Driver
MIT License
71 stars 72 forks source link

Feature/add media template #40

Closed christophrumpel closed 6 years ago

christophrumpel commented 6 years ago

This PR adds the new Media template form Facebook. It also adds the missing setText method in the IncomingMessage class.

I also added two types of elements (attachemnt and url) because I think this way it is to not the set the wrong values. (For attachment url would not be valid and for url attachment id would not be valid.

codecov[bot] commented 6 years ago

Codecov Report

Merging #40 into master will increase coverage by 0.45%. The diff coverage is 77.58%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #40      +/-   ##
============================================
+ Coverage      70.9%   71.36%   +0.45%     
- Complexity      307      330      +23     
============================================
  Files            29       32       +3     
  Lines           794      852      +58     
============================================
+ Hits            563      608      +45     
- Misses          231      244      +13
Impacted Files Coverage Δ Complexity Δ
src/FacebookDriver.php 82.6% <ø> (ø) 60 <0> (ø) :arrow_down:
src/Extensions/MediaTemplate.php 50% <50%> (ø) 5 <5> (?)
src/Extensions/MediaUrlElement.php 81.81% <81.81%> (ø) 9 <9> (?)
src/Extensions/MediaAttachmentElement.php 90.9% <90.9%> (ø) 9 <9> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0641f47...d7538cf. Read the comment docs.