From ec473b50196a5d04bd0fbcf67f465b5703b5138a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 5 Jul 2016 17:58:47 +0000 Subject: Facebook: Prepare for showing reaction icons for notifications (needs support in Popup+ and YAPP) git-svn-id: http://svn.miranda-ng.org/main/trunk@17061 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/entities.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'protocols/FacebookRM/src/entities.h') diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h index 8cd50f590b..a12404de74 100644 --- a/protocols/FacebookRM/src/entities.h +++ b/protocols/FacebookRM/src/entities.h @@ -110,6 +110,7 @@ struct facebook_notification std::string text; std::string link; std::string id; + const char *icon; time_t time; bool seen; HWND hWndPopup; @@ -120,6 +121,24 @@ struct facebook_notification this->seen = false; this->hWndPopup = NULL; } + + void setIcon(std::string iconUrl) + { + if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yj/r/6WffvhOaXGY.png") + icon = "like"; + else if (iconUrl == "https://www.facebook.com/rsrc.php/v2/y1/r/RvGKklgAefT.png") + icon = "love"; + else if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yV/r/McJA2ZjdJmf.png") + icon = "haha"; + else if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yL/r/IfsimazVjj4.png") + icon = "wow"; + else if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yH/r/jOeSrGlcPLG.png") + icon = "sad"; + else if (iconUrl == "https://www.facebook.com/rsrc.php/v2/yL/r/IfsimazVjj4.png") + icon = "angry"; + else + icon = NULL; + } }; struct facebook_newsfeed -- cgit v1.2.3