aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs7
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs15
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs9
3 files changed, 27 insertions, 4 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
index 26b70a1..3724a2c 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs
@@ -315,7 +315,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
315 315
316 // Copy Message 316 // Copy Message
317 GridInstantMessage msg = new GridInstantMessage(); 317 GridInstantMessage msg = new GridInstantMessage();
318 msg.imSessionID = groupID.Guid; 318 msg.imSessionID = im.imSessionID;
319 msg.fromAgentName = im.fromAgentName; 319 msg.fromAgentName = im.fromAgentName;
320 msg.message = im.message; 320 msg.message = im.message;
321 msg.dialog = im.dialog; 321 msg.dialog = im.dialog;
@@ -420,7 +420,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
420 420
421 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) 421 private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client)
422 { 422 {
423 if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Session message from {0} going to agent {1}", msg.fromAgentName, msg.toAgentID); 423 if (m_debugEnabled)
424 m_log.DebugFormat(
425 "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}",
426 msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog);
424 427
425 UUID AgentID = new UUID(msg.fromAgentID); 428 UUID AgentID = new UUID(msg.fromAgentID);
426 UUID GroupID = new UUID(msg.imSessionID); 429 UUID GroupID = new UUID(msg.imSessionID);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index f34152c..8a9e4d2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -357,7 +357,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
357 357
358 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) 358 private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im)
359 { 359 {
360 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 360 if (m_debugEnabled)
361 m_log.DebugFormat(
362 "[GROUPS]: {0} called for {1}, message type {2}",
363 System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog);
361 364
362 // Group invitations 365 // Group invitations
363 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline)) 366 if ((im.dialog == (byte)InstantMessageDialog.GroupInvitationAccept) || (im.dialog == (byte)InstantMessageDialog.GroupInvitationDecline))
@@ -551,6 +554,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
551 554
552 UUID noticeID = new UUID(im.imSessionID); 555 UUID noticeID = new UUID(im.imSessionID);
553 556
557 if (m_debugEnabled)
558 m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId);
559
554 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); 560 GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID);
555 if (notice != null) 561 if (notice != null)
556 { 562 {
@@ -572,6 +578,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
572 578
573 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0); 579 remoteClient.SendInventoryItemCreateUpdate(itemCopy, 0);
574 } 580 }
581 else
582 {
583 if (m_debugEnabled)
584 m_log.DebugFormat(
585 "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.",
586 noticeID, remoteClient.AgentId);
587 }
575 } 588 }
576 589
577 // Interop, received special 210 code for ejecting a group member 590 // Interop, received special 210 code for ejecting a group member
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