VcNarrator: Add 'Narrate Self' option (#1120)

* Add 'Narrate Self' option

if anyone wishes to hear their own name on join this should work

* Apply suggestions from code review

Co-authored-by: V <vendicated@riseup.net>

* Update vcNarrator.tsx

---------

Co-authored-by: V <vendicated@riseup.net>
main
Kay Alizer 1 year ago committed by GitHub
parent fc943b7778
commit d53476a32a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -165,7 +165,7 @@ export default definePlugin({
if (!type) continue;
const template = Settings.plugins.VcNarrator[type + "Message"];
const user = isMe ? "" : UserStore.getUser(userId).username;
const user = isMe && !Settings.plugins.VcNarrator.sayOwnName ? "" : UserStore.getUser(userId).username;
const channel = ChannelStore.getChannel(id).name;
speak(formatText(template, user, channel));
@ -230,6 +230,11 @@ export default definePlugin({
markers: [0.1, 0.5, 1, 2, 5, 10],
stickToMarkers: false
},
sayOwnName: {
description: "Say own name",
type: OptionType.BOOLEAN,
default: false
},
joinMessage: {
type: OptionType.STRING,
description: "Join Message",

Loading…
Cancel
Save