From 53c925a148d8d8f024bda5a2cc180855d5847897 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Tue, 3 Jul 2018 15:43:36 -0400 Subject: [PATCH 1/2] check for dataset content in triggeractive (#544) --- app/javascript/chat/chat.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/javascript/chat/chat.jsx b/app/javascript/chat/chat.jsx index d7a1142fe..8bda4a315 100644 --- a/app/javascript/chat/chat.jsx +++ b/app/javascript/chat/chat.jsx @@ -452,9 +452,11 @@ export default class Chat extends Component { } triggerActiveContent = e => { - e.preventDefault(); - e.stopPropagation(); const target = e.target + if (target.dataset.content || (target.href && target.href.startsWith('https://dev.to/'))) { + e.preventDefault(); + e.stopPropagation(); + } let newActiveContent = this.state.activeContent if (target.dataset.content === 'channel-details') { newActiveContent[this.state.activeChannelId] = { From 4638768d79a80228e9e5979679465957ccb87957 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Tue, 3 Jul 2018 16:50:53 -0400 Subject: [PATCH 2/2] Remove channel member count limit (#545) * check for dataset content in triggeractive * Remove channel member count limit --- app/javascript/chat/channelDetails.jsx | 2 +- app/models/chat_channel_membership.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/javascript/chat/channelDetails.jsx b/app/javascript/chat/channelDetails.jsx index 1ac780558..b0d4df339 100644 --- a/app/javascript/chat/channelDetails.jsx +++ b/app/javascript/chat/channelDetails.jsx @@ -101,7 +101,7 @@ export default class ChannelDetails extends Component { {searchedUsers}

Pending Invites:

{pendingInvites} -
Channels can have a maximum of 128 members, including outstanding invites. All functionality is early beta. Contact us if you need help with anything or to have any restrictions lifted.
+
All functionality is early beta. Contact us if you need help with anything.
} return
diff --git a/app/models/chat_channel_membership.rb b/app/models/chat_channel_membership.rb index 9594e70ad..d5505855c 100644 --- a/app/models/chat_channel_membership.rb +++ b/app/models/chat_channel_membership.rb @@ -14,8 +14,9 @@ class ChatChannelMembership < ApplicationRecord if chat_channel.channel_type == "direct" && chat_channel.slug.split("/").exclude?(user.username) errors.add(:user_id, "is not allowed in chat") end - if chat_channel.users.size > 128 - errors.add(:base, "too many members in channel") - end + # To be possibly implemented in future + # if chat_channel.users.size > 128 + # errors.add(:base, "too many members in channel") + # end end end