Class MemberJoinedChannelEvent

java.lang.Object
com.slack.api.model.event.MemberJoinedChannelEvent
All Implemented Interfaces:
Event, java.io.Serializable

public class MemberJoinedChannelEvent
extends java.lang.Object
implements Event
The member_joined_channel event is sent to all WebSocket connections and event subscriptions when users join public or private channels. It's also triggered upon creating a new channel.

The provided user value is a user ID belonging to the user that joined the channel.

The channel value is the ID for a public channel or private channel (AKA group).

The channel_type value is a single letter indicating the type of channel used in channel:

C - typically a public channel G - private channels (or groups) return this channel_type The team identifies which workspace the user is from.

If the user was invited, the message will include an inviter property containing the user ID of the inviting user. The property will be absent when a user manually joins a channel, or a user is added by default (e.g. #general channel). Also, the property is not available when a channel is converted from a public to private, where the channel history is not shared with the user.

This example illustrates an absent inviter property, a result of a channel converting from public to private:

{ "type": "member_joined_channel", "user": "W06GH7XHN", "channel": "G0698JE0H", "channel_type": "G", "team": "T8MPF7EHL" } This event is supported as a bot user subscription in the Events API. Workspace event subscriptions are also available for tokens holding at least one of the channels:read or groups:read scopes. Which events your app will receive depends on the scopes and their context. For instance, you'll only receive member_joined_channel events for private channels if your app has the groups:read permission.

Even bot users receive this delightful event via Bot User subscription, when joining a channel.

https://api.slack.com/events/member_joined_channel

See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String TYPE_NAME  
  • Constructor Summary

    Constructors 
    Constructor Description
    MemberJoinedChannelEvent()  
  • Method Summary

    Modifier and Type Method Description
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.lang.String getChannel()  
    java.lang.String getChannelType()  
    java.lang.String getEventTs()  
    java.lang.String getInviter()  
    java.lang.String getTeam()  
    java.lang.String getType()  
    java.lang.String getUser()  
    int hashCode()  
    void setChannel​(java.lang.String channel)  
    void setChannelType​(java.lang.String channelType)  
    void setEventTs​(java.lang.String eventTs)  
    void setInviter​(java.lang.String inviter)  
    void setTeam​(java.lang.String team)  
    void setUser​(java.lang.String user)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.slack.api.model.event.Event

    getSubtype
  • Field Details

  • Constructor Details

  • Method Details

    • getType

      public java.lang.String getType()
      Specified by:
      getType in interface Event
    • getUser

      public java.lang.String getUser()
    • getChannel

      public java.lang.String getChannel()
    • getChannelType

      public java.lang.String getChannelType()
    • getTeam

      public java.lang.String getTeam()
    • getInviter

      public java.lang.String getInviter()
    • getEventTs

      public java.lang.String getEventTs()
    • setUser

      public void setUser​(java.lang.String user)
    • setChannel

      public void setChannel​(java.lang.String channel)
    • setChannelType

      public void setChannelType​(java.lang.String channelType)
    • setTeam

      public void setTeam​(java.lang.String team)
    • setInviter

      public void setInviter​(java.lang.String inviter)
    • setEventTs

      public void setEventTs​(java.lang.String eventTs)
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object