mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
Merge pull request #1083 from strukturag/getincall-interface
Add interface for method "GetInCall".
This commit is contained in:
commit
7e3be8f8a4
2 changed files with 6 additions and 8 deletions
10
room.go
10
room.go
|
|
@ -957,14 +957,8 @@ func (r *Room) NotifySessionChanged(session Session, flags SessionChangeFlag) {
|
|||
|
||||
if flags&SessionChangeInCall != 0 {
|
||||
joinLeave := 0
|
||||
if clientSession, ok := session.(*ClientSession); ok {
|
||||
if clientSession.GetInCall()&FlagInCall != 0 {
|
||||
joinLeave = 1
|
||||
} else {
|
||||
joinLeave = 2
|
||||
}
|
||||
} else if virtual, ok := session.(*VirtualSession); ok {
|
||||
if virtual.GetInCall()&FlagInCall != 0 {
|
||||
if session, ok := session.(SessionWithInCall); ok {
|
||||
if session.GetInCall()&FlagInCall != 0 {
|
||||
joinLeave = 1
|
||||
} else {
|
||||
joinLeave = 2
|
||||
|
|
|
|||
|
|
@ -76,6 +76,10 @@ type Session interface {
|
|||
SendMessage(message *ServerMessage) bool
|
||||
}
|
||||
|
||||
type SessionWithInCall interface {
|
||||
GetInCall() int
|
||||
}
|
||||
|
||||
func parseUserData(data json.RawMessage) func() (api.StringMap, error) {
|
||||
return sync.OnceValues(func() (api.StringMap, error) {
|
||||
if len(data) == 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue