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.
bullet-2.82
Oren Hurvitz 2014-06-29 11:26:34 +03:00
parent 528704bc04
commit 0d70033a5d
1 changed files with 7 additions and 0 deletions

View File

@ -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;