Reintroduce transactionID to the parameter list for SendInstantMessage.

It is required by group IM and also for a proper implementation of item
give, group notice attachments and offline IM.
0.6.1-post-fixes
Melanie Thielker 2008-11-09 01:16:42 +00:00
parent 62bc9c2e8e
commit bdf9add8d1
7 changed files with 21 additions and 13 deletions

View File

@ -39,7 +39,9 @@ namespace OpenSim.Framework.Client
void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, void SendInstantMessage(UUID fromAgent, string message, UUID toAgent,
string fromName, byte dialog, uint timeStamp, string fromName, byte dialog, uint timeStamp,
bool fromGroup, byte[] binaryBucket); UUID transactionID, bool fromGroup,
byte[] binaryBucket);
event ImprovedInstantMessage OnInstantMessage; event ImprovedInstantMessage OnInstantMessage;
} }
} }

View File

@ -741,7 +741,7 @@ namespace OpenSim.Framework
uint timeStamp); uint timeStamp);
void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog,
uint timeStamp, bool fromGroup, byte[] binaryBucket); uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket);
void SendGenericMessage(string method, List<string> message); void SendGenericMessage(string method, List<string> message);

View File

@ -1067,15 +1067,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary> /// </summary>
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp) public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
{ {
SendInstantMessage(fromAgent, message, toAgent, fromName, dialog, timeStamp, false, new byte[0]); SendInstantMessage(fromAgent, message, toAgent, fromName, dialog, timeStamp, UUID.Zero, false, new byte[0]);
} }
/// <summary> /// <summary>
/// Send an instant message to this client /// Send an instant message to this client
/// </summary> /// </summary>
//
// Don't remove transaction ID! Groups and item gives need to set it!
//
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent,
string fromName, byte dialog, uint timeStamp, string fromName, byte dialog, uint timeStamp,
bool fromGroup, byte[] binaryBucket) UUID transactionID, bool fromGroup, byte[] binaryBucket)
{ {
if (((Scene)(m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent)) if (((Scene)(m_scene)).ExternalChecks.ExternalChecksCanInstantMessage(fromAgent, toAgent))
{ {
@ -1087,7 +1090,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName); msg.MessageBlock.FromAgentName = Utils.StringToBytes(fromName);
msg.MessageBlock.Dialog = dialog; msg.MessageBlock.Dialog = dialog;
msg.MessageBlock.FromGroup = fromGroup; msg.MessageBlock.FromGroup = fromGroup;
msg.MessageBlock.ID = fromAgent ^ toAgent; if (transactionID == UUID.Zero)
msg.MessageBlock.ID = fromAgent ^ toAgent;
else
msg.MessageBlock.ID = transactionID;
msg.MessageBlock.Offline = 0; msg.MessageBlock.Offline = 0;
msg.MessageBlock.ParentEstateID = 0; msg.MessageBlock.ParentEstateID = 0;
msg.MessageBlock.Position = new Vector3(); msg.MessageBlock.Position = new Vector3();

View File

@ -162,7 +162,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
{ {
user.ControllingClient.SendInstantMessage(fromAgentID, message, user.ControllingClient.SendInstantMessage(fromAgentID, message,
toAgentID, fromAgentName, dialog, toAgentID, fromAgentName, dialog,
timestamp, fromGroup, binaryBucket); timestamp, UUID.Zero, fromGroup, binaryBucket);
// Message sent // Message sent
return; return;
} }
@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
user.ControllingClient.SendInstantMessage(fromAgentID, message, user.ControllingClient.SendInstantMessage(fromAgentID, message,
toAgentID, fromAgentName, dialog, toAgentID, fromAgentName, dialog,
timestamp, fromGroup, binaryBucket); timestamp, UUID.Zero, fromGroup, binaryBucket);
// Message sent // Message sent
return; return;
} }

View File

@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, message, toAgentID, fromAgentName, fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket); dialog, timestamp, UUID.Zero, false, binaryBucket);
return; return;
} }
@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
{ {
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, message, toAgentID, fromAgentName, fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket); dialog, timestamp, UUID.Zero, false, binaryBucket);
if (m_pendingOffers.ContainsKey(imSessionID)) if (m_pendingOffers.ContainsKey(imSessionID))
{ {
@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Transfer
{ {
user.ControllingClient.SendInstantMessage( user.ControllingClient.SendInstantMessage(
fromAgentID, message, toAgentID, fromAgentName, fromAgentID, message, toAgentID, fromAgentName,
dialog, timestamp, false, binaryBucket); dialog, timestamp, UUID.Zero, false, binaryBucket);
if (m_pendingOffers.ContainsKey(imSessionID)) if (m_pendingOffers.ContainsKey(imSessionID))
{ {

View File

@ -476,7 +476,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
} }
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool fromGroup, byte[] binaryBucket) public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transationID, bool fromGroup, byte[] binaryBucket)
{ {
} }

View File

@ -388,7 +388,7 @@ namespace OpenSim.Region.Examples.SimpleModule
} }
public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, bool fromGroup, byte[] binaryBucket) public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
{ {
} }