TsgcWSPClient_E2EE › Methods › SendGroupMessage
Sends an encrypted message (text, stream or bytes) to all online members of a group.
function SendGroupMessage(const aGroup, aText: string): string;
| Name | Type | Description |
|---|---|---|
aGroup | const string | Name of the destination group. The local user must already be a member. |
aText | const string | Plain text payload. Content is encrypted before being sent. |
Message identifier used to correlate the send with OnE2EEGroupMessageAck. Empty when the message could not be queued (string).
Encrypts aText with the group key and asks the server to relay the encrypted payload to every online member of aGroup. Each recipient receives the decrypted text through OnE2EEGroupMessageText. When acknowledgments are enabled, the sender receives OnE2EEGroupMessageAck per recipient.
oE2EE.SendGroupMessage('TEAM01', 'Build finished');
function SendGroupMessage(const aGroup: string; const aStream: TStream): string;
| Name | Type | Description |
|---|---|---|
aGroup | const string | Name of the destination group. The local user must already be a member. |
aStream | const TStream | Stream containing the binary payload. The entire stream content is read and encrypted. |
Message identifier used to correlate the send with OnE2EEGroupMessageAck. Empty when the message could not be queued (string).
Same as the text overload, but the payload is taken from a TStream and delivered to members as binary data through OnE2EEGroupMessageBinary. Suitable for files or arbitrary binary buffers.
oStream := TFileStream.Create('report.pdf', fmOpenRead);
try
oE2EE.SendGroupMessage('TEAM01', oStream);
finally
oStream.Free;
end;