mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
reparing ring indicator for webrtc
This commit is contained in:
parent
9084ca4196
commit
7b689d0343
@ -4586,7 +4586,6 @@ components:
|
|||||||
- callerToken
|
- callerToken
|
||||||
- calleeToken
|
- calleeToken
|
||||||
- keepAlive
|
- keepAlive
|
||||||
- sturnPort
|
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
@ -4599,9 +4598,6 @@ components:
|
|||||||
keepAlive:
|
keepAlive:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
sturnPort:
|
|
||||||
type: integer
|
|
||||||
format: int32
|
|
||||||
|
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
|
@ -103,7 +103,7 @@ func Status(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getRevision(account *store.Account) Revision {
|
func getRevision(account *store.Account) Activity {
|
||||||
var r Revision
|
var r Revision
|
||||||
r.Account = account.AccountRevision
|
r.Account = account.AccountRevision
|
||||||
r.Profile = account.ProfileRevision
|
r.Profile = account.ProfileRevision
|
||||||
@ -111,7 +111,10 @@ func getRevision(account *store.Account) Revision {
|
|||||||
r.Channel = account.ChannelRevision
|
r.Channel = account.ChannelRevision
|
||||||
r.Group = account.GroupRevision
|
r.Group = account.GroupRevision
|
||||||
r.Card = account.CardRevision
|
r.Card = account.CardRevision
|
||||||
return r
|
|
||||||
|
var a Activity
|
||||||
|
a.Revision = r
|
||||||
|
return a
|
||||||
}
|
}
|
||||||
|
|
||||||
//ExitStatus closes websocket handler
|
//ExitStatus closes websocket handler
|
||||||
|
@ -393,6 +393,13 @@ type ProfileData struct {
|
|||||||
Location string `json:"location,omitempty"`
|
Location string `json:"location,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Activity listener for account
|
||||||
|
type Activity struct {
|
||||||
|
Revision Revision `json:"revision,emitempty"`
|
||||||
|
|
||||||
|
Ring Ring `json:"ring",omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
//Revision revision of each account module
|
//Revision revision of each account module
|
||||||
type Revision struct {
|
type Revision struct {
|
||||||
Account int64 `json:"account"`
|
Account int64 `json:"account"`
|
||||||
@ -408,6 +415,13 @@ type Revision struct {
|
|||||||
Card int64 `json:"card"`
|
Card int64 `json:"card"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Ring from contact initiating call
|
||||||
|
type Ring struct {
|
||||||
|
CardID string `json:"cardId"`
|
||||||
|
|
||||||
|
CalleeToken string `json:"calleeToken"`
|
||||||
|
}
|
||||||
|
|
||||||
//Seal key for channel sealing
|
//Seal key for channel sealing
|
||||||
type Seal struct {
|
type Seal struct {
|
||||||
PasswordSalt string `json:"passwordSalt"`
|
PasswordSalt string `json:"passwordSalt"`
|
||||||
|
@ -797,13 +797,6 @@ var endpoints = routes{
|
|||||||
Status,
|
Status,
|
||||||
},
|
},
|
||||||
|
|
||||||
route{
|
|
||||||
"Activity",
|
|
||||||
strings.ToUpper("Get"),
|
|
||||||
"/activity",
|
|
||||||
Activity,
|
|
||||||
},
|
|
||||||
|
|
||||||
route{
|
route{
|
||||||
"AddCall",
|
"AddCall",
|
||||||
strings.ToUpper("Post"),
|
strings.ToUpper("Post"),
|
||||||
|
@ -170,9 +170,11 @@ export function useAppContext(websocket) {
|
|||||||
ws.current = createWebsocket(protocol + window.location.host + "/status");
|
ws.current = createWebsocket(protocol + window.location.host + "/status");
|
||||||
ws.current.onmessage = (ev) => {
|
ws.current.onmessage = (ev) => {
|
||||||
try {
|
try {
|
||||||
let rev = JSON.parse(ev.data);
|
let activity = JSON.parse(ev.data);
|
||||||
updateState({ status: 'connected' });
|
updateState({ status: 'connected' });
|
||||||
setAppRevision(rev);
|
if (activity.revision) {
|
||||||
|
setAppRevision(activity.revision);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user