Skip to content

Commit

Permalink
make it work with latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoroth committed Dec 23, 2019
1 parent df6f004 commit f676b68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ViberContactPhotoProvider.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ - (DDNotificationContactPhotoPromiseOffer *)contactPhotoPromiseOfferForNotificat
NSString *databasePath = [NSString stringWithFormat:@"%@/com.viber/database/Contacts.data", containerPath];
NSString *iconsPath = [NSString stringWithFormat:@"%@/com.viber/ViberIcons", containerPath];

NSString *senderName = [notification.applicationUserInfo valueForKey:@"senderName"];
NSString *memberId = [notification.applicationUserInfo valueForKey:@"srcMid"];
NSString *imageName;

const char *dbpath = [databasePath UTF8String];
sqlite3 *_viberdb;

if (sqlite3_open(dbpath, &_viberdb) == SQLITE_OK) {
const char *stmt = [[NSString stringWithFormat:@"SELECT ZICONID FROM ZMEMBER WHERE ZDISPLAYFULLNAME = '%@' AND ZICONID IS NOT NULL;", senderName] UTF8String];
const char *stmt = [[NSString stringWithFormat:@"SELECT ZICONID FROM ZMEMBER WHERE ZMEMBERID = '%@' AND ZICONID IS NOT NULL;", memberId] UTF8String];
sqlite3_stmt *statement;

if (sqlite3_prepare_v2(_viberdb, stmt, -1, &statement, NULL) == SQLITE_OK) {
Expand Down

0 comments on commit f676b68

Please sign in to comment.