summaryrefslogtreecommitdiff
path: root/jitsi-meet/prosody-plugins/ext_events.lib.lua
blob: edc0943bc004555bc94aba0502285a31cecd4684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
-- invite will perform the trigger for external call invites.
-- This trigger is left unimplemented. The implementation is expected
-- to be specific to the deployment.
local function invite(stanza, url, call_id)
    module:log(
        "warn",
        "A module has been configured that triggers external events."
    )
    module:log("warn", "Implement this lib to trigger external events.")
end

-- cancel will perform the trigger for external call cancellation.
-- This trigger is left unimplemented. The implementation is expected
-- to be specific to the deployment.
local function cancel(stanza, url, reason, call_id)
    module:log(
        "warn",
        "A module has been configured that triggers external events."
    )
    module:log("warn", "Implement this lib to trigger external events.")
end

-- missed will perform the trigger for external call missed notification.
-- This trigger is left unimplemented. The implementation is expected
-- to be specific to the deployment.
local function missed(stanza, call_id)
    module:log(
        "warn",
        "A module has been configured that triggers external events."
    )
    module:log("warn", "Implement this lib to trigger external events.")
end

-- Event that speaker stats for a conference are available
-- this is a table where key is the jid and the value is a table:
--{
--  totalDominantSpeakerTime
--  nick
--  displayName
--}
-- This trigger is left unimplemented. The implementation is expected
-- to be specific to the deployment.
local function speaker_stats(room, speakerStats)
    module:log(
        "warn",
        "A module has been configured that triggers external events."
    )
    module:log("warn", "Implement this lib to trigger external events.")
end

local ext_events = {
    missed = missed,
    invite = invite,
    cancel = cancel,
    speaker_stats = speaker_stats
}

return ext_events