* Add initial invitation framework for chat channels * Update chat_channel specs * Add DIY concept of accepting invite * Add some js and fix spec * Add full invite accept functionality * Remove console.log from chat
13 lines
No EOL
286 B
Ruby
13 lines
No EOL
286 B
Ruby
class ChatChannelCreationService
|
|
attr_accessor :user, :params
|
|
|
|
def initialize(user, params)
|
|
@user = user
|
|
@params = params
|
|
end
|
|
|
|
def create
|
|
user.chat_channels.create(channel_type: "invite_only",
|
|
channel_name: params[:channel_name], slug: params[:slug])
|
|
end
|
|
end |