Skip to content

Commit

Permalink
Merge pull request #128 from Bukk94/feature/RemoveUnsupportedFollow
Browse files Browse the repository at this point in the history
Remove unsupported follow topic
  • Loading branch information
Syzuna authored Jan 3, 2024
2 parents de56046 + fdd67a4 commit 03f933b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 109 deletions.
28 changes: 0 additions & 28 deletions TwitchLib.PubSub/Events/OnFollowArgs.cs

This file was deleted.

9 changes: 0 additions & 9 deletions TwitchLib.PubSub/Interfaces/ITwitchPubSub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public interface ITwitchPubSub
/// </summary>
event EventHandler<OnEmoteOnlyOffArgs> OnEmoteOnlyOff;
/// <summary>
/// Occurs when [on follow].
/// </summary>
event EventHandler<OnFollowArgs> OnFollow;
/// <summary>
/// Occurs when [on host].
/// </summary>
event EventHandler<OnHostArgs> OnHost;
Expand Down Expand Up @@ -226,11 +222,6 @@ public interface ITwitchPubSub
/// <param name="channelTwitchId">The channel twitch identifier.</param>
void ListenToChatModeratorActions(string myTwitchId, string channelTwitchId);
/// <summary>
/// Listens to follows.
/// </summary>
/// <param name="channelId">The channel twitch identifier.</param>
void ListenToFollows(string channelId);
/// <summary>
/// Listens to subscriptions.
/// </summary>
/// <param name="channelId">The channel identifier.</param>
Expand Down
3 changes: 0 additions & 3 deletions TwitchLib.PubSub/Models/Responses/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ internal Message(JObject jsonObject)
case "channel-ext-v1":
MessageData = new ChannelExtensionBroadcast(encodedJsonMessage);
break;
case "following":
MessageData = new Following(encodedJsonMessage);
break;
case "community-points-channel-v1":
MessageData = new CommunityPointsChannel(encodedJsonMessage);
break;
Expand Down
46 changes: 0 additions & 46 deletions TwitchLib.PubSub/Models/Responses/Messages/Following.cs

This file was deleted.

23 changes: 0 additions & 23 deletions TwitchLib.PubSub/TwitchPubSub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ public class TwitchPubSub : ITwitchPubSub, IDisposable
public event EventHandler<OnChannelExtensionBroadcastArgs> OnChannelExtensionBroadcast;
/// <inheritdoc />
/// <summary>
/// Fires when PubSub receives notice when a user follows the designated channel.
/// </summary>
public event EventHandler<OnFollowArgs> OnFollow;
/// <inheritdoc />
/// <summary>
/// Fires when PubSub receives notice when a custom reward has been created on the specified channel.
///</summary>
[Obsolete("This event fires on an undocumented/retired/obsolete topic.", false)]
Expand Down Expand Up @@ -626,11 +621,6 @@ private async Task ParseMessageAsync(string message)
return;
}
break;
case "following":
var f = (Following)msg.MessageData;
f.FollowedChannelId = msg.Topic.Split('.')[1];
OnFollow?.Invoke(this, new OnFollowArgs { FollowedChannelId = f.FollowedChannelId, DisplayName = f.DisplayName, UserId = f.UserId, Username = f.Username });
return;
case "community-points-channel-v1":
var cpc = msg.MessageData as CommunityPointsChannel;
switch (cpc?.Type)
Expand Down Expand Up @@ -823,19 +813,6 @@ private void UnaccountedFor(string message)
}

#region Listeners
/// <inheritdoc />
/// <summary>
/// Sends a request to listenOn follows coming into a specified channel.
/// </summary>
/// <param name="channelId">The channel identifier.</param>
public void ListenToFollows(string channelId)
{
// This topic is not documented
var topic = $"following.{channelId}";
_topicToChannelId[topic] = channelId;
ListenToTopic(topic);
}

/// <inheritdoc />
/// <summary>
/// Sends a request to listenOn timeouts and bans in a specific channel
Expand Down

0 comments on commit 03f933b

Please sign in to comment.