MCPcopy
hub / github.com/tinode/chat / getCallOriginator

Method getCallOriginator

server/calls.go:208–218  ·  view source on GitHub ↗

Returns Uid and session of the present video call originator if a call is being established or in progress.

()

Source from the content-addressed store, hash-verified

206// Returns Uid and session of the present video call originator
207// if a call is being established or in progress.
208func (t *Topic) getCallOriginator() (types.Uid, *Session) {
209 if t.currentCall == nil {
210 return types.ZeroUid, nil
211 }
212 for _, p := range t.currentCall.parties {
213 if p.isOriginator {
214 return p.uid, p.sess
215 }
216 }
217 return types.ZeroUid, nil
218}
219
220// Handles video call invite (initiation)
221// (in response to msg = {pub head=[mime: application/x-tinode-webrtc]}).

Callers 3

handleCallEventMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected