Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show media thumbnail when forward a media message by file hash and size #864

Open
wants to merge 726 commits into
base: master
Choose a base branch
from

Conversation

Amirjan
Copy link

@Amirjan Amirjan commented Aug 6, 2014

show media thumbnail when forward a media message!

jonnywilliamson and others added 30 commits October 10, 2013 23:42
Repaired onProfilePictureChanged event, added onProfilePictureDeleted
Typos fixed as well as incorrectly commented function name
…urrent behavior and it fix the problem if WhatsAPI is being used from other project/path
added full path on the fopen(countries.csv) line,
onGetRequestLastSeen return an array with 4 elements, not with 3!
…urrent behavior and it fix the problem if WhatsAPI is being used from other project/path
onGetRequestLastSeen return an array with 4 elements, not with 3!
added onGetGroupMessage
mgp25 and others added 20 commits July 9, 2014 02:10
Now you can send media without downloading the file, just knowing the size and the base64 hash.

TODO: some minor fixes in func.php probably tomorrow
Now broadcast media knowing only size and hash
Send media files knowing only the size and hash - Enhancement venomous0x#826
new ping request from server is like this

```<iq from="s.whatsapp.net" id="1405327577-ping" type="get" xmlns="urn:xmpp:ping"></iq>```
ping response from server changed 
Fix from venomous0x#700
Update event to let the user get filehash
Added Simple CLI and fixes to exampleFunctional
If number add to group
profile picture update notification node now without message node
update profile picture update notification
@Amirjan
Copy link
Author

Amirjan commented Aug 6, 2014

Users must save thumbnails of media messages on (onGetVideo , onGetImage) into dbase to do this.
Usage (for example):

if ($row->thumbnail) $icon=file_get_contents('media/thumbnails/'.$row->thumbnail);
if($row->mtype=='Video')
$w->sendMessageVideo($to, $row->fname, false, $row->fsize, $row->fhash,$icon);
if($row->mtype=='Audio')
$w->sendMessageAudio($to, $row->fname, false, $row->fsize, $row->fhash);
if($row->mtype=='Image')
$w->sendMessageImage($to, $row->fname, false, $row->fsize, $row->fhash,$icon);

@Amirjan Amirjan changed the title Update whatsprot.class.php show media thumbnail when forward a media message by file hash and size Aug 6, 2014
@recoverjp
Copy link

Hmmmmm ... I'm sorry, but I did not understand how to use it.

@recoverjp
Copy link

What is this $icon?
And whatsapp provides thumbnail for images and videos?

@shirioko
Copy link
Contributor

It allows you to provide your own thumbnail instead of having WhatsAPI auto-generate it.

@recoverjp
Copy link

Hmmmmm, very good! THX

@hubail hubail force-pushed the master branch 2 times, most recently from d56e5ea to e6cf5a5 Compare May 3, 2015 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.