Skip to content

Lower case PresenceMessage.Action enum #90

@mattheworiordan

Description

@mattheworiordan

If you look at ConnectionState, the enums are all lowercase allowing something like:

switch (state) {
  case connected:
  case failed:
}

and the following:

connection.on(ConnectionState.connected, listener) { ... }

Same applies for ChannelState.

However, PresenceMessage.Action uses upper case making the API interface for devs consistent. For example, a user will now need to do the following (once #21 is resolved):

presence.subscribe(PresenceMessage.Action.ENTER, listener) { ... }

and

switch (action) {
  case ENTER:
  case LEAVE:
}

I believe we should aim for consistency in these public enums and should probably just go lowercase.

WDYT @paddybyers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. It's clear that this does need to be fixed.enhancementNew feature or improved functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions