Class BuddyMessageRequest

java.lang.Object
sfs3.client.requests.BaseRequest
sfs3.client.requests.GenericMessageRequest
sfs3.client.requests.buddylist.BuddyMessageRequest
All Implemented Interfaces:
sfs3.client.requests.IClientRequest

public class BuddyMessageRequest extends sfs3.client.requests.GenericMessageRequest
Sends a message to a buddy in the current user's buddies list.

Messages sent to buddies using the BuddyMessageRequest request are similar to the standard private messages (see the PrivateMessageRequest request) but are specifically designed for the Buddy List system: they don't require any Room parameter, nor they require that users joined a Room. Additionally, buddy messages are subject to specific validation, such as making sure that the recipient is in the sender's buddies list and the sender is not blocked by the recipient.

If the operation is successful, a buddyMessage event is dispatched in both the sender and recipient clients.

NOTE: this request can be sent if the Buddy List system was previously initialized only (see the InitBuddyListRequest request description).

See Also:
  • Constructor Details

    • BuddyMessageRequest

      public BuddyMessageRequest(String message, Buddy targetBuddy)
      See Also:
    • BuddyMessageRequest

      public BuddyMessageRequest(String message, Buddy targetBuddy, ISFSObject params)
      Creates a new BuddyMessageRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.
      Parameters:
      message - The message to be sent to a buddy.
      targetBuddy - The Buddy object corresponding to the message recipient.
      params - An instance of SFSObject containing additional custom parameters (e.g. the message color, an emoticon id, etc).
      See Also: