Commit 8ea3b613 authored by Drake Arconis's avatar Drake Arconis
Browse files

Change to non-static function for LLAvatarTracker::formFriendship

parent 9a656b10
......@@ -740,16 +740,15 @@ void LLAvatarTracker::formFriendship(const LLUUID& id)
{
if(id.notNull())
{
LLRelationship* buddy_info = get_ptr_in_map(instance().mBuddyInfo, id);
LLRelationship* buddy_info = get_ptr_in_map(mBuddyInfo, id);
if(!buddy_info)
{
LLAvatarTracker& at = LLAvatarTracker::instance();
//The default for relationship establishment is to have both parties
//visible online to each other.
buddy_info = new LLRelationship(LLRelationship::GRANT_ONLINE_STATUS,LLRelationship::GRANT_ONLINE_STATUS, false);
at.mBuddyInfo[id] = buddy_info;
at.addChangedMask(LLFriendObserver::ADD, id);
at.notifyObservers();
mBuddyInfo[id] = buddy_info;
addChangedMask(LLFriendObserver::ADD, id);
notifyObservers();
}
}
}
......
......@@ -164,7 +164,7 @@ public:
// buddy list in the functor or bad things will happen.
void applyFunctor(LLRelationshipFunctor& f);
static void formFriendship(const LLUUID& friend_id);
void formFriendship(const LLUUID& friend_id);
protected:
void deleteTrackingData();
......
......@@ -173,14 +173,14 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
if (notification_ptr)
{
// add friend to recent people list
LLRecentPeople::instance().add(payload["from_id"]);
LLRecentPeople::instance().add(payload["from_id"].asUUID());
switch (option)
{
case 0:
{
// accept
LLAvatarTracker::formFriendship(payload["from_id"]);
LLAvatarTracker::instance().formFriendship(payload["from_id"].asUUID());
const LLUUID fid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD);
......@@ -3322,7 +3322,7 @@ void process_improved_im(LLMessageSystem* msg, void** user_data)
// In the case of an offline IM, the formFriendship() may be extraneous
// as the database should already include the relationship. But it
// doesn't hurt for dupes.
LLAvatarTracker::formFriendship(from_id);
LLAvatarTracker::instance().formFriendship(from_id);
std::vector<std::string> strings;
strings.push_back(from_id.asString());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment