Skip to content

Better handling of JOIN/PART events. #76

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nolanlum
Copy link
Owner

@nolanlum nolanlum commented Mar 9, 2023

  • Channels joined by a particular IRC client connection are now tracked at that level. This way, if a client locally PARTs a Slack channel (even though the state does not update on the Slack side), we can allow the client to re-join a channel (once) without having to reconnect. Previously there was no way to re-join a channel you left on an IRC client (we would never send the JOIN echo since we checked joined channels against Slack).
  • Add handling for channel_joined and channel_left. This information was duplicated by member_joined_channel and member_left_channel, with the sole exception of channel archiving, which does not generate member_left_channel. We now ignore the member_* variant for the self user.
  • Replace chan interface{} and map[x]interface{} with struct{} lmbo.
  • Ignore known and unimportant unmarshalling errors.

case "unmarshalling_error":
unmarshallingErrorEvent := event.Data.(*slack.UnmarshallingErrorEvent)

switch err := unmarshallingErrorEvent.ErrorObj.(type) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use errors.Is here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants