FIRE-29943: Fix item shared messaged logging to wrong IM logfile if user is offline
parent
5733658f32
commit
0f4933e2fc
|
|
@ -1936,6 +1936,7 @@ void LLPostponedNotification::lookupName(const LLUUID& id,
|
|||
}
|
||||
else
|
||||
{
|
||||
mFromId = id; // <FS:Ansariel> FIRE-29943: Item shared messaged logging to wrong IM logfile if user is offline
|
||||
fetchAvatarName(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,8 @@ protected:
|
|||
LLPostponedNotification()
|
||||
: mParams(),
|
||||
mName(),
|
||||
mAvatarNameCacheConnection()
|
||||
mAvatarNameCacheConnection(),
|
||||
mFromId(LLUUID::null) // <FS:Ansariel> FIRE-29943: Item shared messaged logging to wrong IM logfile if user is offline
|
||||
{}
|
||||
|
||||
virtual ~LLPostponedNotification()
|
||||
|
|
@ -1064,6 +1065,7 @@ protected:
|
|||
LLNotification::Params mParams;
|
||||
std::string mName;
|
||||
boost::signals2::connection mAvatarNameCacheConnection;
|
||||
LLUUID mFromId; // <FS:Ansariel> FIRE-29943: Item shared messaged logging to wrong IM logfile if user is offline
|
||||
};
|
||||
|
||||
// Stores only persistent notifications.
|
||||
|
|
|
|||
|
|
@ -183,7 +183,22 @@ protected:
|
|||
void modifyNotificationParams()
|
||||
{
|
||||
LLSD payload = mParams.payload;
|
||||
payload["SESSION_NAME"] = mName;
|
||||
// <FS:Ansariel> FIRE-29943: Item shared messaged logging to wrong IM logfile if user is offline
|
||||
//payload["SESSION_NAME"] = mName;
|
||||
LLAvatarName av_name;
|
||||
// This should work since modifyNotificationParams() is invoked after we already
|
||||
// retrieved the avatar name
|
||||
if (mFromId.notNull() && LLAvatarNameCache::instance().getName(mFromId, &av_name))
|
||||
{
|
||||
// LLHandlerUtil::logToIM() will transform this into the correct filename
|
||||
payload["SESSION_NAME"] = av_name.getLegacyName();
|
||||
}
|
||||
else
|
||||
{
|
||||
payload["SESSION_NAME"] = mName;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
mParams.payload = payload;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue