Method

PurpleConversationadd_member

since: 3.0

Declaration [src]

PurpleConversationMember*
purple_conversation_add_member (
  PurpleConversation* conversation,
  PurpleContactInfo* info,
  gboolean announce,
  const char* message
)

Description [src]

Looks for an existing PurpleConversationMember for info in conversation and returns it if found. If not, a new PurpleConversationMember is created.

This method is intended to be called by a protocol plugin to directly manage the membership state of the conversation.

This will also emit the PurpleConversation::member-added signal if an existing member was not found.

The announce and message parameters will be used when emitting the PurpleConversation::member-added signal. Announce and message are meant for protocols to more properly define their behavior. For example, on IRC you will typically be told when a user joins a chat but on Twitch this isn’t announced.

Available since: 3.0

Parameters

info

Type: PurpleContactInfo

The PurpleContactInfo of the person joining.

The data is owned by the caller of the function.
announce

Type: gboolean

Whether this addition should be announced or not.

message

Type: const char*

An optional message to be used with announce.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: PurpleConversationMember

The PurpleConversationMember that was created or found.

The data is owned by the instance.