Following events are suggested to be gathered from various parts of our system.
Allowed channel types:
- 1-1
- bulk
- announcement
- group
Allowed content types:
- photo
- video
- text
- poll
- event
- video-broadcast
- ...
Event creator: Ejabberd
Note: whenever a message is sent on different channels, no matter what the channel type is, one message_sent
event is fired off.
Note 1: receiver_type is assumed to be always User.
Note 2: if channel_type is group/announcement, receiver_uuid
will be null
.
channel_id
event: "message_sent"
receiver_uuid
sender_org_uuid
sender_uuid
timestamp
channel_type: announcement/1-1/group
content_type
message_id: id of message object
reply_to_id: "ID of a message that this message is a reply to" (could be NULL)
Event creator: Ejabberd or Rails server
audience_filters: string
channel_id: null
event: "message_sent"
receivers_uuid: [a list off user uuids ??] (not sure this is a good way)
sender_org_uuid
sender_uuid
timestamp
channel_type: bulk
content_type
message_id: null
Note: creating a bulk message will result in creation of individiaul 1-1 message analytics. Example: if a bulk message is created with 10 people as audience, overall we will need to create 11 events. 1 for initial bulk message and 10 for individual 1-1 messages.
Event creator: Ejabberd
event: "message_read_receipt"
sender_uuid
timestamp
message_id: "id of read-receipt message"
original_message_id
Event creator: Ejabberd
event: "reaction_sent"
sender_uuid
reaction_msg: string
timestamp
message_id: "id of read-receipt message"
original_message_id
Event creator: Ejabberd
event: "poll_created"
params: { question: string, multiSelect: true/false, choices: [] }
sender_org_uuid
sender_uuid
timestamp
channel_type: announcement/group
content_type: poll ???
message_id: "message id for newly created poll"
event: "poll_responded"
user_uuid
timestamp
message_id
original_message_id: "reference to message_id for original poll"
response_text: string
event: "event_created"
params: { name: string, when: string, where: string }
sender_org_uuid
sender_uuid
timestamp
channel_type: announcement/group
content_type: event ???
message_id: "message id for newly created event"
event: "event_responded"
user_uuid
timestamp
message_id
original_message_id: "reference to message_id for original event"
response_text: string (attending|interested|declined)
event: "live_broadcast_started"
sender_org_uuid
sender_uuid
timestamp
broadcast_url: (assuming its unique to the live video - could be the URL of the HLS file)
channel_type: 1-1/announcement/group
content_type: video-broadcast ???
message_id
Note: can students initiate a live broadcast?
event: "live_broadcast_ended"
message_id
original_message_id: "referense to message_id of live_broadcast_started event"
timestamp
event: "live_broadcast_viewer_subscribed"
message_id
original_message_id: "referense to message_id of live_broadcast_started event"
timestamp
event: "live_broadcast_viewer_unsubscribed"
message_id: string
original_message_id: "referense to message_id of live_broadcast_started event"
timestamp
event: "channel-left"
user_uuid
channel_id
timestamp
event: "channel-kicked"
user_uuid
channel_id
timestamp
event: "channel-banned"
user_uuid
channel_id
timestamp
event: "channel-joined"
user_uuid
channel_id
timestamp
join_type: organic/internal-share/external-share
- join type is organic if the user joined or requested to join from the chat shelf directly
- type is in-app if they joined via a link shared in a chat.
- type is external-share if user joins thru through an external branch link
Note: When generaing invite links, we need to differentiate between in-app and out-app ones.
Ejabberd server could use the following GQL query to find
sender_org_uuid
.Query:
Sample response: