aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index 0883c5b..496f2ab 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -35,6 +35,7 @@ using OpenSim.Framework;
35using OpenSim.Server.Base; 35using OpenSim.Server.Base;
36using OpenSim.Framework.Servers.HttpServer; 36using OpenSim.Framework.Servers.HttpServer;
37using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; 37using FriendInfo = OpenSim.Services.Interfaces.FriendInfo;
38using OpenSim.Services.Interfaces;
38 39
39using OpenMetaverse; 40using OpenMetaverse;
40using log4net; 41using log4net;
@@ -61,7 +62,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
61 sr.Close(); 62 sr.Close();
62 body = body.Trim(); 63 body = body.Trim();
63 64
64 m_log.DebugFormat("[XXX]: query String: {0}", body); 65 //m_log.DebugFormat("[XXX]: query String: {0}", body);
65 66
66 try 67 try
67 { 68 {
@@ -115,9 +116,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
115 if (!UUID.TryParse(request["ToID"].ToString(), out toID)) 116 if (!UUID.TryParse(request["ToID"].ToString(), out toID))
116 return FailureResult(); 117 return FailureResult();
117 118
118 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, "", toID, 119 UserAccount account = m_FriendsModule.UserAccountService.GetUserAccount(m_FriendsModule.Scene.RegionInfo.ScopeID, fromID);
120 string name = (account == null) ? "Unknown" : account.FirstName + " " + account.LastName;
121
122 GridInstantMessage im = new GridInstantMessage(m_FriendsModule.Scene, fromID, name, toID,
119 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero); 123 (byte)InstantMessageDialog.FriendshipOffered, message, false, Vector3.Zero);
120 124
125 // !! HACK
126 im.imSessionID = im.fromAgentID;
127
121 if (m_FriendsModule.LocalFriendshipOffered(toID, im)) 128 if (m_FriendsModule.LocalFriendshipOffered(toID, im))
122 return SuccessResult(); 129 return SuccessResult();
123 130