Merge pull request #18337 from gustavotrott/graphl-middleware-use-go1.20

Develop: Merge 2.7 and make graphql-middleware run with Go1.20
This commit is contained in:
Gustavo Trott 2023-07-18 09:19:24 -03:00 committed by GitHub
commit d01b4b5546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 90 additions and 50 deletions

View File

@ -10,4 +10,10 @@ require (
nhooyr.io/websocket v1.8.7
)
require github.com/evanphx/json-patch v0.5.2 // indirect
require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/evanphx/json-patch v0.5.2 // indirect
github.com/klauspost/compress v1.10.3 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
)

View File

@ -1,7 +1,5 @@
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@ -7,7 +7,12 @@ fi;
cd "$(dirname "$0")"
#Install Go
sudo apt install golang -y
#sudo apt install golang -y
wget --no-verbose https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz \
&& tar -xzf go1.20.5.linux-amd64.tar.gz \
&& ln -s ${PWD}/go/bin/go /usr/bin/go \
&& rm go1.20.5.linux-amd64.tar.gz
go version
# Build Graphql Middleware

View File

@ -1 +1 @@
git clone --branch v2.10.0-alpha.5 --depth 1 https://github.com/bigbluebutton/bbb-webrtc-sfu bbb-webrtc-sfu
git clone --branch v2.10.0-alpha.6 --depth 1 https://github.com/bigbluebutton/bbb-webrtc-sfu bbb-webrtc-sfu

View File

@ -15,6 +15,10 @@ const messages = defineMessages({
id: 'app.chat.multi.typing',
description: 'displayed when 4 or more users are typing',
},
someoneTyping: {
id: 'app.chat.someone.typing',
description: 'label used when one user is typing with disabled name',
},
});
class TypingIndicator extends PureComponent {
@ -26,62 +30,85 @@ class TypingIndicator extends PureComponent {
renderTypingElement() {
const {
typingUsers, indicatorEnabled, intl,
typingUsers, indicatorEnabled, indicatorShowNames, intl,
} = this.props;
if (!indicatorEnabled || !typingUsers) return null;
const { length } = typingUsers;
const isSingleTyper = length === 1;
const isCoupleTyper = length === 2;
const isMultiTypers = length > 2;
let element = null;
if (isSingleTyper) {
const { name } = typingUsers[0];
element = (
<FormattedMessage
id="app.chat.one.typing"
description="label used when one user is typing"
values={{
0: <Styled.SingleTyper>
{`${name}`}
&nbsp;
</Styled.SingleTyper>,
}}
/>
);
}
if (indicatorShowNames) {
const isSingleTyper = length === 1;
const isCoupleTyper = length === 2;
const isMultiTypers = length > 2;
if (isCoupleTyper) {
const { name } = typingUsers[0];
const { name: name2 } = typingUsers[1];
element = (
<FormattedMessage
id="app.chat.two.typing"
description="label used when two users are typing"
values={{
0: <Styled.CoupleTyper>
{`${name}`}
if (isSingleTyper) {
const { name } = typingUsers[0];
element = (
<FormattedMessage
id="app.chat.one.typing"
description="label used when one user is typing"
values={{
0: <Styled.SingleTyper>
{`${name}`}
&nbsp;
</Styled.CoupleTyper>,
1: <Styled.CoupleTyper>
&nbsp;
{`${name2}`}
&nbsp;
</Styled.CoupleTyper>,
}}
/>
);
}
</Styled.SingleTyper>,
}}
/>
);
}
if (isMultiTypers) {
element = (
<span>
{`${intl.formatMessage(messages.severalPeople)}`}
</span>
);
if (isCoupleTyper) {
const {name} = typingUsers[0];
const {name: name2} = typingUsers[1];
element = (
<FormattedMessage
id="app.chat.two.typing"
description="label used when two users are typing"
values={{
0: <Styled.CoupleTyper>
{`${name}`}
&nbsp;
</Styled.CoupleTyper>,
1: <Styled.CoupleTyper>
&nbsp;
{`${name2}`}
&nbsp;
</Styled.CoupleTyper>,
}}
/>
);
}
if (isMultiTypers) {
element = (
<span>
{`${intl.formatMessage(messages.severalPeople)}`}
</span>
);
}
} else {
// Show no names in typing indicator
const isSingleTyper = length === 1;
const isMultiTypers = length > 1;
if (isSingleTyper) {
element = (
<span>
{`${intl.formatMessage(messages.someoneTyping)}`}
</span>
);
}
if (isMultiTypers) {
element = (
<span>
{`${intl.formatMessage(messages.severalPeople)}`}
</span>
);
}
}
return element;

View File

@ -10,6 +10,7 @@ const CHAT_CONFIG = Meteor.settings.public.chat;
const USER_CONFIG = Meteor.settings.public.user;
const PUBLIC_CHAT_KEY = CHAT_CONFIG.public_id;
const TYPING_INDICATOR_ENABLED = CHAT_CONFIG.typingIndicator.enabled;
const TYPING_SHOW_NAMES = CHAT_CONFIG.typingIndicator.showNames;
const TypingIndicatorContainer = props => <TypingIndicator {...props} />;
@ -48,5 +49,6 @@ export default withTracker(({ idChatOpen }) => {
return {
typingUsers,
indicatorEnabled: TYPING_INDICATOR_ENABLED,
indicatorShowNames: TYPING_SHOW_NAMES,
};
})(TypingIndicatorContainer);

View File

@ -572,6 +572,7 @@ public:
chat_status_message: PUBLIC_CHAT_STATUS
typingIndicator:
enabled: true
showNames: true
moderatorChatEmphasized: true
autoConvertEmoji: true
emojiPicker:

View File

@ -30,6 +30,7 @@
"app.chat.notAway": "Is not away anymore",
"app.chat.clearPublicChatMessage": "The public chat history was cleared by a moderator",
"app.chat.multi.typing": "Multiple users are typing",
"app.chat.someone.typing": "Someone is typing",
"app.chat.one.typing": "{0} is typing",
"app.chat.two.typing": "{0} and {1} are typing",
"app.chat.copySuccess": "Copied chat transcript",