User:Baba/Group Chat

From libsecondlife

Jump to: navigation, search

Starting a Session

Send ImprovedInstantMessage packet with ToAgentID and ID fields as group key with Dialog: 15

Receive ChatterBoxSessionStartReply capability to confirm the session has started.

Send ImprovedInstantMessage packet with Dialog: 17 and Message fields filled with your chat message. The BinaryBucket must be set to \0

You should then get back your own message as an Instant Message with the group packed into the BinaryBucket All messages from yourself or others should be sent to the client in this format.


The ID field is always the group key. When sending messages ToAgentID is the group key and when receiving messages the key should be that of the recipient.

SLProxy Capture

############
# Sent
############


-->     8.4.129.201:13006  1048 [        Rel Zer]
--- ImprovedInstantMessage ---
-- AgentData --
AgentID: 81b12141142547f690ebf4160ba7ab69
SessionID: dcf3a973d1a046d09b7a34b193b498d4
-- MessageBlock --
FromGroup: False
ToAgentID: fab228893448049826ffa2f403158fc5
ParentEstateID: 0
RegionID: 00000000000000000000000000000000
Position: <227.319, 152.993, 2.434701>
Offline: 0
Dialog: 15
ID: fab228893448049826ffa2f403158fc5
Timestamp: 0
FromAgentName: Alternate Clip

BinaryBucket:



##############
# Received
##############

[16] Response from https://sim1051.agni.lindenlab.com:12043/cap/399721b0-5410-fbef-df42-dc03f0b0189c
Status: 200 OK
Content-Type: text/html
Date: Fri, 04 Jan 2008 00:07:22 GMT
Server: BaseHTTP/0.3 Python/2.3.5

<llsd><map><key>events</key><array><map><key>body</key><map><key>agents</key><array><uuid>15054fa7-3a9f-4c23-9603-c0129ad43f5e</uuid><uuid>81b12141-1425-47f6-90eb-f4160ba7ab69</uuid></array><key>session_id</key><uuid>fab22889-3448-0498-26ff-a2f403158fc5</uuid><key>success</key><boolean>1</boolean><key>temp_session_id</key><uuid>fab22889-3448-0498-26ff-a2f403158fc5</uuid></map><key>message</key><string>ChatterBoxSessionStartReply</string></map></array><key>id</key><integer>437574468</integer></map></llsd>
--------
[16] Fixed-up response:
<llsd><map><key>events</key><array><map><key>body</key><map><key>agents</key><array><uuid>15054fa7-3a9f-4c23-9603-c0129ad43f5e</uuid><uuid>81b12141-1425-47f6-90eb-f4160ba7ab69</uuid></array><key>session_id</key><uuid>fab22889-3448-0498-26ff-a2f403158fc5</uuid><key>success</key><boolean>1</boolean><key>temp_session_id</key><uuid>fab22889-3448-0498-26ff-a2f403158fc5</uuid></map><key>message</key><string>ChatterBoxSessionStartReply</string></map></array><key>id</key><integer>437574468</integer></map></llsd>
--------
[20] POST: /https://sim1051.agni.lindenlab.com:12043/cap/399721b0-5410-fbef-df42-dc03f0b0189c
[20] request length = 102:
<llsd><map><key>ack</key><integer>437574468</integer><key>done</key><boolean>0</boolean></map></llsd>

##########
# Sent
##########



-->     8.4.129.201:13006  1107 [        Rel Zer]
--- ImprovedInstantMessage ---
-- AgentData --
AgentID: 81b12141142547f690ebf4160ba7ab69
SessionID: dcf3a973d1a046d09b7a34b193b498d4
-- MessageBlock --
FromGroup: False
ToAgentID: fab228893448049826ffa2f403158fc5
ParentEstateID: 0
RegionID: 00000000000000000000000000000000
Position: <0, 0, 0>
Offline: 0
Dialog: 17
ID: fab228893448049826ffa2f403158fc5
Timestamp: 0
FromAgentName: Alternate Clip
Message: KAY HAI
BinaryBucket:


##############
# Received
##############

<--     8.4.129.201:13006  1493 [        Rel Zer]
--- ImprovedInstantMessage ---
-- AgentData --
AgentID: 81b12141142547f690ebf4160ba7ab69
SessionID: 00000000000000000000000000000000
-- MessageBlock --
FromGroup: False
ToAgentID: 81b12141142547f690ebf4160ba7ab69
ParentEstateID: 1
RegionID: ba17a2f6a25ac592f8acd414ee0a7dcc
Position: <227.319, 152.993, 2.434701>
Offline: 0
Dialog: 17
ID: fab228893448049826ffa2f403158fc5
Timestamp: 0
FromAgentName: Alternate Clip
Message: KAY HAI
BinaryBucket: Pleiades Test Group #1