Skip to content

Commit

Permalink
FBS: Remove unneeded message type member
Browse files Browse the repository at this point in the history
It's not needed since the body contained in the message is aleady typed.
  • Loading branch information
jmillan committed Oct 30, 2023
1 parent 54731fa commit 50ac392
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 92 deletions.
10 changes: 4 additions & 6 deletions node/src/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ export class Channel extends EnhancedEventEmitter

try
{
switch (message.type())
switch (message.dataType())
{
case MessageType.RESPONSE:
case MessageBody.Response:
{
const response = new Response();

Expand All @@ -141,7 +141,7 @@ export class Channel extends EnhancedEventEmitter
break;
}

case MessageType.NOTIFICATION:
case MessageBody.Notification:
{
const notification = new Notification();

Expand All @@ -152,7 +152,7 @@ export class Channel extends EnhancedEventEmitter
break;
}

case MessageType.LOG:
case MessageBody.Log:
{
const log = new Log();

Expand Down Expand Up @@ -283,7 +283,6 @@ export class Channel extends EnhancedEventEmitter

const messageOffset = Message.createMessage(
this.#bufferBuilder,
MessageType.NOTIFICATION,
MessageBody.Notification,
notificationOffset
);
Expand Down Expand Up @@ -348,7 +347,6 @@ export class Channel extends EnhancedEventEmitter

const messageOffset = Message.createMessage(
this.#bufferBuilder,
MessageType.REQUEST,
MessageBody.Request,
requestOffset
);
Expand Down
Loading

0 comments on commit 50ac392

Please sign in to comment.