Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Implement presets at room creation #203

Merged
merged 4 commits into from
Jul 16, 2015
Merged

Conversation

erikjohnston
Copy link
Member

Adds the ability to specify a preset when creating a room. Currently defined are:

  • public_chat - for completely public rooms, where anyone can join and everyone can see history.
  • private_chat - for 1:1 and private group chats, invite only and people can only see history after they were invited.


class RoomCreationPreset(object):
PrivateChat = "private_chat"
PublicChat = "public_chat"
Copy link
Member

Choose a reason for hiding this comment

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

Would really prefer CONSTANT_NAMES here :)

@kegsay
Copy link
Member

kegsay commented Jul 14, 2015

LGTM other than in-line comments. I'm a little hesitant to use private_chat to mean "invite only and people can only see history after they were invited". What would we call rooms which you had to knock on? Or ones with a password? Are they not private? We may want to be more explicit here to avoid us having awkward situations in the future. Maybe private_invite_chat, private_knock_chat and private_password_chat? Not sure.

@erikjohnston
Copy link
Member Author

What would we call rooms which you had to knock on?

The idea behind these presets is to encourage apps to use these defaults when a user wants to create a room for a given purpose, giving a simple and consistent UX across apps. I.e., these presets are named after what the user wanted, rather than describing the actual defaults.

If the user/app wants to do something more complex they wouldn't use a preset, but would instead specify the options they want (though I haven't actually implemented that part of the API yet).

erikjohnston added a commit that referenced this pull request Jul 16, 2015
@erikjohnston erikjohnston merged commit d155b31 into develop Jul 16, 2015
@erikjohnston erikjohnston deleted the erikj/room_creation_presets branch September 10, 2015 09:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants