diff --git a/SlackAPI/SlackSocketClient.cs b/SlackAPI/SlackSocketClient.cs index 5aff2a3..fa8202f 100644 --- a/SlackAPI/SlackSocketClient.cs +++ b/SlackAPI/SlackSocketClient.cs @@ -12,6 +12,7 @@ public class SlackSocketClient : SlackClient public event Action OnMessageReceived; public event Action OnReactionAdded; public event Action OnPongReceived; + public event Action OnUserTyping; bool HelloReceived; public const int PingInterval = 3000; @@ -203,9 +204,10 @@ public void HandleGroupRename(GroupRename rename) GroupLookup[rename.channel.id].created = rename.channel.created; } - public void UserTyping(Typing t) + public void HandleUserTyping(UserTyping userTyping) { - + if (OnUserTyping != null) + OnUserTyping(userTyping); } public void Message(NewMessage m) diff --git a/SlackAPI/WebSocketMessages/Typing.cs b/SlackAPI/WebSocketMessages/Typing.cs index 2979409..0917e4f 100644 --- a/SlackAPI/WebSocketMessages/Typing.cs +++ b/SlackAPI/WebSocketMessages/Typing.cs @@ -3,7 +3,6 @@ namespace SlackAPI.WebSocketMessages { [SlackSocketRouting("typing")] - [SlackSocketRouting("user_typing")] public class Typing : SlackSocketMessage { public string user; diff --git a/SlackAPI/WebSocketMessages/UserTyping.cs b/SlackAPI/WebSocketMessages/UserTyping.cs new file mode 100644 index 0000000..5d44c81 --- /dev/null +++ b/SlackAPI/WebSocketMessages/UserTyping.cs @@ -0,0 +1,11 @@ +using System; + +namespace SlackAPI.WebSocketMessages +{ + [SlackSocketRouting("user_typing")] + public class UserTyping : SlackSocketMessage + { + public string user; + public string channel; + } +}