Skip to content

Commit

Permalink
Merge pull request stakwork#750 from jordan-ae/update-websocket
Browse files Browse the repository at this point in the history
chore: Update websocket on phase planner to console.log messages
  • Loading branch information
humansinstitute authored Dec 12, 2024
2 parents a119975 + 82cfc04 commit ec4152a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/people/widgetViews/PhasePlannerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ const PhasePlannerView: React.FC = observer(() => {
};

socket.onmessage = async (event: MessageEvent) => {
// Log raw message data
console.log('Raw websocket message received:', event.data);

try {
const data = JSON.parse(event.data);
// Log parsed data
console.log('Parsed websocket message:', data);

if (data.msg === SOCKET_MSG.user_connect) {
const sessionId = data.body;
Expand All @@ -71,6 +76,8 @@ const PhasePlannerView: React.FC = observer(() => {
}

const ticketMessage = data as TicketMessage;
// Log ticket message before processing
console.log('Ticket message before processing:', ticketMessage);

switch (ticketMessage.action) {
case 'message':
Expand Down

0 comments on commit ec4152a

Please sign in to comment.