Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update updateTicket handler to post to websocket with channelID on successful update operation #2086

Closed
5 tasks
Tracked by #2052
humansinstitute opened this issue Dec 4, 2024 · 3 comments · Fixed by #2098
Closed
5 tasks
Tracked by #2052
Assignees
Labels

Comments

@humansinstitute
Copy link
Contributor

humansinstitute commented Dec 4, 2024

Task:

  • Create aTicket Message object and call sendTicketMessage
  • Implement a utility function sendTicketMessage - to post a Ticket Message to the session ID in the message.
  • On a successful update of a ticket, post an update message on the websocket.

Design

sendTicketMessage Function

Logic:

If BroadcastType == direct send TicketMessage to websocket where sessionID = updateRequest.metadata.id
if BroadcastType == pool return - no action. // Stub this out.

Message:

ticket_message =
{
    broadcastType: "direct",
    sourceSessionID: updateRequest.metadata.id,
    message: `Hive, has successfully updated your ticket ${updateRequest.ticket.ticketName}`,
    action: "message",        // set to message
    ticketDetails: {               // From the ticket in the original message
        featureUUID: "chjkdhu893u0qu82908394j",
        phaseUUID: "chjkdhu893u0qu09890832",
        ticketUUID: "11111-22222-33333-44444-555555",
        ticketDescription: "I'm a new ticket description"
    }
    
}

Websocket ID from:

Acceptance Criteria

  • Message object contains all required fields (broadcastType, sourceSessionID, message, action, ticketDetails)
  • sendTicketMessage function sends to correct websocket when broadcastType="direct"
  • sendTicketMessage function does nothing when broadcastType="pool"
  • Websocket message successfully delivered to session matching updateRequest.metadata.id
  • Error handling for failed message delivery and invalid websocket connections
@aliraza556
Copy link
Contributor

@humansinstitute Please assign me

@Shoaibdev7
Copy link
Contributor

@humansinstitute, assign ?

@humansinstitute
Copy link
Contributor Author

Join and post in this Sphinx Tribe for assignments:

sphinx.chat://?action=tribeV2&pubkey=0306abbf1523b90303a0b65ca3d4e1359f5079348dc4ee33625d030613875b9f47&host=tribes.v2.sphinx.chat

No Github requests / tags will be monitored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants