From 8728bddc7c23490c56f477a27225bc71c49bea9c Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 9 Dec 2009 18:00:55 +0200 Subject: =?UTF-8?q?mplemented=20EXT-2798=20=E2=80=9CRecord=20online/offlin?= =?UTF-8?q?e=20notifications=20into=20IM=20history=20only=E2=80=9D,=20excl?= =?UTF-8?q?uded=20FriendOnline,=20FriendOffline=20notifications=20from=20l?= =?UTF-8?q?ogging=20to=20nearby=20chat;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 6748bd7982..749786a829 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -37,6 +37,8 @@ #include "llnotifications.h" #include "llimview.h" #include "llagent.h" +#include "llfloaterreg.h" +#include "llnearbychat.h" using namespace LLNotificationsUI; @@ -47,7 +49,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"), FRIENDSHIP_ACCEPTED("FriendshipAccepted"), - FRIENDSHIP_OFFERED("FriendshipOffered"); + FRIENDSHIP_OFFERED("FriendshipOffered"), + FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) @@ -58,6 +61,14 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) || FRIENDSHIP_OFFERED == notification->getName(); } +// static +bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification) +{ + return notification->getType() == "notifytip" + && FRIEND_ONLINE != notification->getName() + && FRIEND_OFFLINE != notification->getName(); +} + // static bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) { @@ -144,3 +155,15 @@ void LLHandlerUtil::logGroupNoticeToIMGroup( payload["group_id"], sender_id); } +// static +void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChatSourceType type) +{ + LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("nearby_chat", LLSD()); + if(nearby_chat) + { + LLChat chat_msg(notification->getMessage()); + chat_msg.mSourceType = type; + nearby_chat->addMessage(chat_msg); + } +} + -- cgit v1.2.3 From e9afce6786877778abc24924865b586d5c5f4581 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Thu, 10 Dec 2009 12:36:28 +0200 Subject: =?UTF-8?q?mplemented=20EXT-2801=20=E2=80=9CRecord=20"object=20ret?= =?UTF-8?q?urn"=20notification=20into=20IM=20history,=20not=20chat=20histo?= =?UTF-8?q?ry=E2=80=9D,=20added=20logging=20to=20IM=20for=20ServerObjectMe?= =?UTF-8?q?ssage=20notification;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 749786a829..5b54092c5c 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -50,7 +50,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"), FRIENDSHIP_ACCEPTED("FriendshipAccepted"), FRIENDSHIP_OFFERED("FriendshipOffered"), - FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"); + FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"), + SERVER_OBJECT_MESSAGE("ServerObjectMessage"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) @@ -58,7 +59,8 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() || PAYMENT_RECIVED == notification->getName() - || FRIENDSHIP_OFFERED == notification->getName(); + || FRIENDSHIP_OFFERED == notification->getName() + || SERVER_OBJECT_MESSAGE == notification->getName(); } // static -- cgit v1.2.3