Skip to content

Commit c073c5f

Browse files
committed
Fix invalid StreamingMessage parse
1 parent 8bdbcc0 commit c073c5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

TootNet/Streaming/StreamingMessage.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public StreamingMessage(MessageType msgType, Status status) : this(msgType)
3333
case MessageType.StatusUpdate:
3434
UpdatedStatus = status;
3535
break;
36+
default:
37+
throw new ArgumentException("Invalid message type received");
3638
}
37-
38-
throw new ArgumentException("Invalid message type received");
3939
}
4040

4141
public StreamingMessage(MessageType msgType, Notification notification) : this(msgType)
@@ -80,9 +80,9 @@ public StreamingMessage(MessageType msgType, long id) : this(msgType)
8080
case MessageType.AnnouncementDelete:
8181
DeletedAnnouncementId = id;
8282
break;
83+
default:
84+
throw new ArgumentException("Invalid message type received");
8385
}
84-
85-
throw new ArgumentException("Invalid message type received");
8686
}
8787

8888
public MessageType Type { get; set; }

0 commit comments

Comments
 (0)