Skip to content

Commit

Permalink
chore: deprecate hosts due to twitch announcement (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
iProdigy committed Sep 7, 2022
1 parent efac0a2 commit b8ad2d9
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 0 deletions.
Expand Up @@ -551,6 +551,7 @@ public void onNoticeEvent(IRCMessageEvent event) {
}
}

@Deprecated
public void onHostOnEvent(IRCMessageEvent event) {
if (event.getCommandType().equals("NOTICE")) {
EventChannel channel = event.getChannel();
Expand All @@ -565,6 +566,7 @@ public void onHostOnEvent(IRCMessageEvent event) {
}
}

@Deprecated
public void onHostOffEvent(IRCMessageEvent event) {
if (event.getCommandType().equals("NOTICE")) {
EventChannel channel = event.getChannel();
Expand All @@ -576,6 +578,7 @@ public void onHostOffEvent(IRCMessageEvent event) {
}
}

@Deprecated
public void onInboundHostEvent(IRCMessageEvent event) {
if ("PRIVMSG".equals(event.getCommandType()) && "jtv".equals(event.getClientName().orElse(null)) && event.getChannelName().isPresent() && event.getRawTags().isEmpty()) {
final String hostMessage = " is now hosting you";
Expand Down
Expand Up @@ -8,10 +8,13 @@

/**
* This event gets called when the user stops hosting someone.
*
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Value
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Deprecated
public class HostOffEvent extends AbstractChannelEvent {

/**
Expand Down
Expand Up @@ -8,10 +8,13 @@

/**
* This event gets called when the user starts hosting someone.
*
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Value
@Getter
@EqualsAndHashCode(callSuper = false)
@Deprecated
public class HostOnEvent extends AbstractChannelEvent {

/**
Expand Down
Expand Up @@ -9,10 +9,13 @@
* Fired when the authenticated channel to the TwitchChat instance was hosted by another user.
* <p>
* Not officially documented by Twitch so this could stop working at any time.
*
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Value
@EqualsAndHashCode(callSuper = true)
@Unofficial
@Deprecated
public class InboundHostEvent extends TwitchEvent {

/**
Expand Down
Expand Up @@ -269,11 +269,17 @@ public enum ModerationAction {
UNMOD,
/**
* Another channel was hosted
*
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Deprecated
HOST,
/**
* Channel exited host mode
*
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Deprecated
UNHOST,
/**
* A raid on another channel was initiated
Expand Down
Expand Up @@ -94,7 +94,9 @@ HystrixCommand<Chatters> getChatters(
*
* @param channelIds A list containing a user ID for each channel to check.
* @return Host information for each channel ID passed.
* @deprecated Twitch is removing host mode on October 3, 2022
*/
@Deprecated
@RequestLine("GET /hosts?include_logins=1&host={id}")
HystrixCommand<HostList> getHosts(
@Param("id") List<String> channelIds
Expand Down
Expand Up @@ -8,6 +8,7 @@
@Data
@Setter(AccessLevel.PRIVATE)
@NoArgsConstructor
@Deprecated
public class Host {

private String hostId;
Expand Down
Expand Up @@ -10,6 +10,7 @@
@Data
@Setter(AccessLevel.PRIVATE)
@NoArgsConstructor
@Deprecated
public class HostList {

private List<Host> hosts;
Expand Down

0 comments on commit b8ad2d9

Please sign in to comment.