From 0d70033a5db407526c37cf241a99743126b8d358 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 29 Jun 2014 11:26:34 +0300 Subject: Include the group name in group IM's When sending an ImprovedInstantMessage to a group, the IM's binary bucket is supposed to contain the group's name (this is what SL does). Singularity uses this to show the group name when it shows the message at the bottom of the viewer for a few seconds: "[Group Name] From User: Message". Before this update, the group name was empty ("[]"). This update doesn't have any visible effect in Firestorm, because it doesn't use the group name sent in the IM. --- OpenSim/Addons/Groups/GroupsMessagingModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Addons/Groups') diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index e6a4765..e95db41 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs @@ -325,6 +325,13 @@ namespace OpenSim.Groups im.RegionID = thisClient.Scene.RegionInfo.RegionID.Guid; } + if ((im.binaryBucket == null) || (im.binaryBucket.Length == 0) || ((im.binaryBucket.Length == 1 && im.binaryBucket[0] == 0))) + { + ExtendedGroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero.ToString(), groupID, null); + if (groupInfo != null) + im.binaryBucket = Util.StringToBytes256(groupInfo.GroupName); + } + // Send to self first of all im.toAgentID = im.fromAgentID; im.fromGroup = true; -- cgit v1.1