diff options
author | Diva Canto | 2010-06-04 10:59:59 -0700 |
---|---|---|
committer | Diva Canto | 2010-06-04 10:59:59 -0700 |
commit | 952029380a6a038e382dd3b2c312b3e16ff08625 (patch) | |
tree | 400586c159859d0ff437685d4c37179e8cba89f1 /OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-952029380a6a038e382dd3b2c312b3e16ff08625.zip opensim-SC_OLD-952029380a6a038e382dd3b2c312b3e16ff08625.tar.gz opensim-SC_OLD-952029380a6a038e382dd3b2c312b3e16ff08625.tar.bz2 opensim-SC_OLD-952029380a6a038e382dd3b2c312b3e16ff08625.tar.xz |
Fixed a couple of buglets in Friendship offers / acceptance / decline when avies are in different sims.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | 13 |
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; | |||
35 | using OpenSim.Server.Base; | 35 | using OpenSim.Server.Base; |
36 | using OpenSim.Framework.Servers.HttpServer; | 36 | using OpenSim.Framework.Servers.HttpServer; |
37 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; | 37 | using FriendInfo = OpenSim.Services.Interfaces.FriendInfo; |
38 | using OpenSim.Services.Interfaces; | ||
38 | 39 | ||
39 | using OpenMetaverse; | 40 | using OpenMetaverse; |
40 | using log4net; | 41 | using 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 | ||