mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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
This commit is contained in:
@@ -132,6 +132,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
|
||||
MessageTransferModule mtm = new MessageTransferModule();
|
||||
GroupsModule gm = new GroupsModule();
|
||||
GroupsMessagingModule gmm = new GroupsMessagingModule();
|
||||
MockGroupsServicesConnector mgsc = new MockGroupsServicesConnector();
|
||||
|
||||
IConfigSource configSource = new IniConfigSource();
|
||||
|
||||
@@ -149,7 +150,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
|
||||
config.Set("MessagingEnabled", true);
|
||||
}
|
||||
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, new MockGroupsServicesConnector(), mtm, gm, gmm);
|
||||
SceneHelpers.SetupSceneModules(scene, configSource, mgsc, mtm, gm, gmm);
|
||||
|
||||
UUID userId = TestHelpers.ParseTail(0x1);
|
||||
string subjectText = "newman";
|
||||
@@ -185,6 +186,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests
|
||||
Assert.That(spReceivedMessages.Count, Is.EqualTo(1));
|
||||
Assert.That(spReceivedMessages[0].message, Is.EqualTo(combinedSubjectMessage));
|
||||
|
||||
List<GroupNoticeData> notices = mgsc.GetGroupNotices(UUID.Zero, groupID);
|
||||
Assert.AreEqual(1, notices.Count);
|
||||
|
||||
// OpenSimulator (possibly also SL) transport the notice ID as the session ID!
|
||||
Assert.AreEqual(notices[0].NoticeID.Guid, spReceivedMessages[0].imSessionID);
|
||||
|
||||
Assert.That(sp2ReceivedMessages.Count, Is.EqualTo(0));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user