Publish {info what=call} to topic subscribers's sessions on subscriber's 'me'.
(from string, target types.Uid, event string, seq int, sdp json.RawMessage, skipSid string, offlineOnly bool)
| 502 | |
| 503 | // Publish {info what=call} to topic subscribers's sessions on subscriber's 'me'. |
| 504 | func (t *Topic) infoCallSubsOffline(from string, target types.Uid, event string, seq int, |
| 505 | sdp json.RawMessage, skipSid string, offlineOnly bool) { |
| 506 | if target.IsZero() { |
| 507 | logs.Err.Printf("callSubs could not find target: topic %s - from %s", t.name, from) |
| 508 | return |
| 509 | } |
| 510 | pud := t.perUser[target] |
| 511 | mode := pud.modeGiven & pud.modeWant |
| 512 | if pud.deleted || !mode.IsPresencer() || !mode.IsReader() { |
| 513 | return |
| 514 | } |
| 515 | msg := &ServerComMessage{ |
| 516 | Info: &MsgServerInfo{ |
| 517 | Topic: "me", |
| 518 | Src: t.original(target), |
| 519 | From: from, |
| 520 | What: "call", |
| 521 | Event: event, |
| 522 | SeqId: seq, |
| 523 | Payload: sdp, |
| 524 | }, |
| 525 | RcptTo: target.UserId(), |
| 526 | SkipSid: skipSid, |
| 527 | } |
| 528 | if offlineOnly { |
| 529 | msg.Info.SkipTopic = t.name |
| 530 | } |
| 531 | globals.hub.routeSrv <- msg |
| 532 | } |
| 533 | |
| 534 | // Same as presSubsOffline, but the topic has not been loaded/initialized first: offline topic, offline subscribers |
| 535 | func presSubsOfflineOffline(topic string, cat types.TopicCat, subs []types.Subscription, what string, |
no test coverage detected