aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-05-19 22:06:41 +0100
committerJustin Clark-Casey (justincc)2014-05-19 22:06:41 +0100
commit3a6f3124841ee91778df1d7fa2fbda9893079c6d (patch)
treeec3f2e69b5199c448475f0e62893751ea523aa68 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
parentTell QueryAccess explicitly whether the user is coming in via Teleport or Cro... (diff)
downloadopensim-SC-3a6f3124841ee91778df1d7fa2fbda9893079c6d.zip
opensim-SC-3a6f3124841ee91778df1d7fa2fbda9893079c6d.tar.gz
opensim-SC-3a6f3124841ee91778df1d7fa2fbda9893079c6d.tar.bz2
opensim-SC-3a6f3124841ee91778df1d7fa2fbda9893079c6d.tar.xz
Fix recent regression from 77e7bbc where an attachment on a received group notice with XmlRpcGroups messaging did not appear in the user's inventory.
This was because the "session ID" when the message template was copied was always replaced with the group ID, whereas a notice requires this to be the notice ID. Instead just copy the "session ID" as is - other callers already have this set properly so replacing with group ID was redundant anyway. Relates to http://opensimulator.org/mantis/view.php?id=7037
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
index b5a10af..d944087 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs
@@ -132,6 +132,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
132 MessageTransferModule mtm = new MessageTransferModule(); 132 MessageTransferModule mtm = new MessageTransferModule();
133 GroupsModule gm = new GroupsModule(); 133 GroupsModule gm = new GroupsModule();
134 GroupsMessagingModule gmm = new GroupsMessagingModule(); 134 GroupsMessagingModule gmm = new GroupsMessagingModule();
135 MockGroupsServicesConnector mgsc = new MockGroupsServicesConnector();
135 136
136 IConfigSource configSource = new IniConfigSource(); 137 IConfigSource configSource = new IniConfigSource();
137 138
@@ -149,7 +150,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
149 config.Set("MessagingEnabled", true); 150 config.Set("MessagingEnabled", true);
150 } 151 }
151 152
152 SceneHelpers.SetupSceneModules(scene, configSource, new MockGroupsServicesConnector(), mtm, gm, gmm); 153 SceneHelpers.SetupSceneModules(scene, configSource, mgsc, mtm, gm, gmm);
153 154
154 UUID userId = TestHelpers.ParseTail(0x1); 155 UUID userId = TestHelpers.ParseTail(0x1);
155 string subjectText = "newman"; 156 string subjectText = "newman";
@@ -185,6 +186,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
185 Assert.That(spReceivedMessages.Count, Is.EqualTo(1)); 186 Assert.That(spReceivedMessages.Count, Is.EqualTo(1));
186 Assert.That(spReceivedMessages[0].message, Is.EqualTo(combinedSubjectMessage)); 187 Assert.That(spReceivedMessages[0].message, Is.EqualTo(combinedSubjectMessage));
187 188
189 List<GroupNoticeData> notices = mgsc.GetGroupNotices(UUID.Zero, groupID);
190 Assert.AreEqual(1, notices.Count);
191
192 // OpenSimulator (possibly also SL) transport the notice ID as the session ID!
193 Assert.AreEqual(notices[0].NoticeID.Guid, spReceivedMessages[0].imSessionID);
194
188 Assert.That(sp2ReceivedMessages.Count, Is.EqualTo(0)); 195 Assert.That(sp2ReceivedMessages.Count, Is.EqualTo(0));
189 } 196 }
190 197