Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
Suppress exceptions while parsing the message chain
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSnowfield committed Apr 8, 2022
1 parent e227e9c commit 6d3d8c6
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions Konata.Core/Components/Services/MessageSvc/PbGetMsg.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Konata.Core.Events;
using Konata.Core.Events.Model;
using Konata.Core.Message;
Expand Down Expand Up @@ -38,27 +39,35 @@ protected override bool Parse(SSOFrame input,
{
j.GetTree("0A", _ =>
{
var type = (NotifyType) _.GetLeafVar("18");
switch (type)
try
{
case NotifyType.FriendMessage:
case NotifyType.FriendMessageSingle:
case NotifyType.FriendPttMessage:
extra.Add(OnProcessMessage(keystore.Account.Uin, j));
break;

case NotifyType.NewMember:
extra.Add(OnProcessNewMember(keystore.Account.Uin, j));
break;

case NotifyType.StrangerMessage:
break;

default:
case NotifyType.FriendFileMessage:
case NotifyType.GroupCreated:
case NotifyType.GroupRequestAccepted:
break;
var type = (NotifyType) _.GetLeafVar("18");
switch (type)
{
case NotifyType.FriendMessage:
case NotifyType.FriendMessageSingle:
case NotifyType.FriendPttMessage:
extra.Add(OnProcessMessage(keystore.Account.Uin, j));
break;

case NotifyType.NewMember:
extra.Add(OnProcessNewMember(keystore.Account.Uin, j));
break;

case NotifyType.StrangerMessage:
break;

default:
case NotifyType.FriendFileMessage:
case NotifyType.GroupCreated:
case NotifyType.GroupRequestAccepted:
break;
}
}
catch (Exception e)
{
// TODO: Droppppppp
// Fixme
}
});
}
Expand Down

0 comments on commit 6d3d8c6

Please sign in to comment.