Skip to content

Commit

Permalink
Add pronouns to Jitsi and Zoom calls (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Feb 6, 2022
1 parent 9f2b67c commit cf83805
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ instead of version numbers.
## 2022-02-06

* Rooms now have a dropdown list of users (first button after room title).
* This list shows the users' pronouns, as set in Settings.
* This list shows the users' pronouns, which can now be set in Settings.
Pronouns are also part of a user's display name in Jitsi and Zoom calls.
[[#189](https://github.com/edemaine/comingle/issues/189)]
* Admins can kick a user from the current room (e.g. to remove idle users).
Users can still rejoin the room if they want, unless the room is locked.
Expand Down
8 changes: 8 additions & 0 deletions client/Name.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,11 @@ export Pronouns = React.memo ->
</Card.Body>
</Card>
Pronouns.displayName = 'Pronouns'

export concatNamePronouns = (name, pronouns) ->
name += " (#{pronouns})" if pronouns
name
export useNameWithPronouns = ->
concatNamePronouns useName(), usePronouns()
export getNameWithPronouns = ->
concatNamePronouns getName(), getPronouns()
4 changes: 2 additions & 2 deletions client/TabJitsi.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import useScript from 'react-script-hook'
import {Alert, Button, Card} from 'react-bootstrap'

import {Loading} from './Loading'
import {useName} from './Name'
import {useNameWithPronouns} from './Name'
import {getDark} from './Settings'
import {Tabs} from '/lib/tabs'

Expand Down Expand Up @@ -41,7 +41,7 @@ export TabJitsi = React.memo ({tabId, room}) ->
ref = useRef() # div container for Jitsi iframe
[joined, setJoined] = useState lastJitsiStatus.joined # joined call?
[api, setApi] = useState() # JitsiMeetExternalAPI object
name = useName()
name = useNameWithPronouns()

## Jitsi API
useEffect ->
Expand Down
6 changes: 3 additions & 3 deletions client/TabZoom.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {useTracker} from 'meteor/react-meteor-data'
import {Alert, Button, Card, Row, Col} from 'react-bootstrap'

import {allow} from './TabIFrame'
import {getName} from './Name'
import {getNameWithPronouns} from './Name'
import {Tabs, zoomRegExp} from '/lib/tabs'
import {meteorCallPromise} from '/lib/meteorPromise'

Expand Down Expand Up @@ -35,7 +35,7 @@ export TabZoom = React.memo ({tabId}) ->
prefix = if ua.getDevice().type == 'mobile' then 'zoomus' else 'zoommtg'
url = "#{prefix}://zoom.us/join?confno=#{zoomID}"
url += "&pwd=#{zoomPwd}" if zoomPwd
name = getName()
name = getNameWithPronouns()
url += "&uname=#{encodeURIComponent name}" if name
window.location.replace url

Expand All @@ -47,7 +47,7 @@ export TabZoom = React.memo ({tabId}) ->
[embedUrl, setEmbedUrl] = useState()
zoomWeb = ->
{signature, apiKey} = await meteorCallPromise 'zoomSign', zoomID
setEmbedUrl "/zoom.html?name=#{base64 getName() ? ''}&mn=#{zoomID}&email=&pwd=#{zoomPwd ? ''}&role=0&lang=en-US&signature=#{signature}&china=0&apiKey=#{apiKey}"
setEmbedUrl "/zoom.html?name=#{base64 getNameWithPronouns() ? ''}&mn=#{zoomID}&email=&pwd=#{zoomPwd ? ''}&role=0&lang=en-US&signature=#{signature}&china=0&apiKey=#{apiKey}"
return <iframe src={embedUrl} allow={allow}/> if embedUrl

<Card>
Expand Down

0 comments on commit cf83805

Please sign in to comment.