Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User typing additions #204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions SlackAPI/SlackSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class SlackSocketClient : SlackClient
public event Action<NewMessage> OnMessageReceived;
public event Action<ReactionAdded> OnReactionAdded;
public event Action<Pong> OnPongReceived;
public event Action<UserTyping> OnUserTyping;

bool HelloReceived;
public const int PingInterval = 3000;
Expand Down Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion SlackAPI/WebSocketMessages/Typing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace SlackAPI.WebSocketMessages
{
[SlackSocketRouting("typing")]
[SlackSocketRouting("user_typing")]
public class Typing : SlackSocketMessage
{
public string user;
Expand Down
11 changes: 11 additions & 0 deletions SlackAPI/WebSocketMessages/UserTyping.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace SlackAPI.WebSocketMessages
{
[SlackSocketRouting("user_typing")]
public class UserTyping : SlackSocketMessage
{
public string user;
public string channel;
}
}