symphony.bdk.core.service.datafeed.real_time_event_listener.RealTimeEventListener#

class symphony.bdk.core.service.datafeed.real_time_event_listener.RealTimeEventListener#

Bases: object

Interface for a callback to be invoked when a RealTimeEvent is received from the datafeed real-time-events <https://docs.developers.symphony.com/building-bots-on-symphony/datafeed/real-time-events>_

__init__()#

Methods

__init__()

is_accepting_event(event, bot_info)

Checks if the event is accepted to be handled.

on_connection_accepted(initiator, event)

param initiator

Event initiator.

on_connection_requested(initiator, event)

param initiator

Event initiator.

on_instant_message_created(initiator, event)

Called when a ROOMCREATED event is received.

on_message_sent(initiator, event)

Called when a MESSAGESENT event is received.

on_message_suppressed(initiator, event)

param initiator

Event initiator.

on_room_created(initiator, event)

param initiator

Event initiator.

on_room_deactivated(initiator, event)

param initiator

Event initiator.

on_room_demoted_from_owner(initiator, event)

param initiator

Event initiator.

on_room_member_promoted_to_owner(initiator, ...)

param initiator

Event initiator.

on_room_reactivated(initiator, event)

param initiator

Event initiator.

on_room_updated(initiator, event)

param initiator

Event initiator.

on_shared_post(initiator, event)

Called when an INSTANTMESSAGECREATED event is received.

on_symphony_elements_action(initiator, event)

param initiator

Event initiator.

on_user_joined_room(initiator, event)

param initiator

Event initiator.

on_user_left_room(initiator, event)

param initiator

Event initiator.

on_user_requested_to_join_room(initiator, event)

param initiator

Event initiator.

async static is_accepting_event(event: symphony.bdk.gen.agent_model.v4_event.V4Event, bot_info: symphony.bdk.gen.pod_model.user_v2.UserV2) bool#

Checks if the event is accepted to be handled.

By default, all the events that is created by the bot itself will not be accepted to be handled by the listener. If you want to handle the self-created events or you want to apply your own filters for the events, you should override this method.

Parameters
  • event – Event to be verified.

  • bot_info – the UserV2 object containing the bot service account information

Returns

True if the event is accepted, False otherwise

async on_connection_accepted(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_connection_accepted.V4ConnectionAccepted)#
Parameters
  • initiator – Event initiator.

  • event – Connection Accepted payload.

async on_connection_requested(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_connection_requested.V4ConnectionRequested)#
Parameters
  • initiator – Event initiator.

  • event – Connection Requested payload.

async on_instant_message_created(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_instant_message_created.V4InstantMessageCreated)#

Called when a ROOMCREATED event is received.

Parameters
  • initiator – Event initiator.

  • event – Instant Message Created payload.

async on_message_sent(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_message_sent.V4MessageSent)#

Called when a MESSAGESENT event is received.

Parameters
  • initiator – Event initiator.

  • event – Message sent payload.

async on_message_suppressed(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_message_suppressed.V4MessageSuppressed)#
Parameters
  • initiator – Event initiator.

  • event – Message Suppressed payload.

async on_room_created(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_created.V4RoomCreated)#
Parameters
  • initiator – Event initiator.

  • event – Room Created payload.

async on_room_deactivated(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_deactivated.V4RoomDeactivated)#
Parameters
  • initiator – Event initiator.

  • event – Room Deactivated payload.

async on_room_demoted_from_owner(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_member_demoted_from_owner.V4RoomMemberDemotedFromOwner)#
Parameters
  • initiator – Event initiator.

  • event – Room Member Demoted From Owner payload.

async on_room_member_promoted_to_owner(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_member_promoted_to_owner.V4RoomMemberPromotedToOwner)#
Parameters
  • initiator – Event initiator.

  • event – Room Member Promoted To Owner payload.

async on_room_reactivated(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_reactivated.V4RoomReactivated)#
Parameters
  • initiator – Event initiator.

  • event – Room Reactivated payload.

async on_room_updated(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_room_updated.V4RoomUpdated)#
Parameters
  • initiator – Event initiator.

  • event – Room Updated payload.

async on_shared_post(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_shared_post.V4SharedPost)#

Called when an INSTANTMESSAGECREATED event is received.

Parameters
  • initiator – Event initiator.

  • event – Shared post payload.

async on_symphony_elements_action(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_symphony_elements_action.V4SymphonyElementsAction)#
Parameters
  • initiator – Event initiator.

  • event – Symphony Elements Action payload.

async on_user_joined_room(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_user_joined_room.V4UserJoinedRoom)#
Parameters
  • initiator – Event initiator.

  • event – User Joined Room payload.

async on_user_left_room(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_user_left_room.V4UserLeftRoom)#
Parameters
  • initiator – Event initiator.

  • event – User Left Room payload.

async on_user_requested_to_join_room(initiator: symphony.bdk.gen.agent_model.v4_initiator.V4Initiator, event: symphony.bdk.gen.agent_model.v4_user_requested_to_join_room.V4UserRequestedToJoinRoom)#
Parameters
  • initiator – Event initiator.

  • event – User Requested To Join Room payload.