Filter out announcement type IMs (incoming IMs, autoresponse sent...) from Growl - the important message might not be shown due to message throttle otherwise

Sun, 24 Apr 2016 00:35:34 +0200

author
Ansariel
date
Sun, 24 Apr 2016 00:35:34 +0200
changeset 48978
283a2fb899b4
parent 48977
09948de7055a
child 48979
d8cfb7ee122d

Filter out announcement type IMs (incoming IMs, autoresponse sent...) from Growl - the important message might not be shown due to message throttle otherwise

indra/newview/growlmanager.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/growlmanager.cpp	Sat Apr 23 22:41:58 2016 +0200
     1.2 +++ b/indra/newview/growlmanager.cpp	Sun Apr 24 00:35:34 2016 +0200
     1.3 @@ -238,7 +238,7 @@
     1.4  		{
     1.5  			if (mTitleTimers[title] > now - GROWL_THROTTLE_TIME)
     1.6  			{
     1.7 -				LL_WARNS("GrowlNotify") << "Discarded notification with title '" << title << "' - spam ._." << LL_ENDL;
     1.8 +				LL_WARNS("GrowlNotify") << "Discarded notification with title '" << title << "' due to throttle" << LL_ENDL;
     1.9  				mTitleTimers[title] = now;
    1.10  				return;
    1.11  			}
    1.12 @@ -317,7 +317,9 @@
    1.13  void GrowlManager::onInstantMessage(const LLSD& im)
    1.14  {
    1.15  	LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(im["session_id"].asUUID());
    1.16 -	if (session->isP2PSessionType() && (!im["keyword_alert_performed"].asBoolean() || !gSavedSettings.getBOOL("FSFilterGrowlKeywordDuplicateIMs")))
    1.17 +	if (session->isP2PSessionType() && // Must be P2P
    1.18 +		!im["is_announcement"].asBoolean() && // Not an announcement (incoming IM, autoresponse sent info...)
    1.19 +		(!im["keyword_alert_performed"].asBoolean() || !gSavedSettings.getBOOL("FSFilterGrowlKeywordDuplicateIMs"))) // Not keyword or show duplicate IMs due to keywords
    1.20  	{
    1.21  		// Don't show messages from ourselves or the system.
    1.22  		const LLUUID from_id = im["from_id"].asUUID();

mercurial