equal
deleted
inserted
replaced
100 |
100 |
101 module:hook("enable-bind-features", function (event) |
101 module:hook("enable-bind-features", function (event) |
102 local session, features = event.session, event.features; |
102 local session, features = event.session, event.features; |
103 |
103 |
104 -- Carbons |
104 -- Carbons |
105 session.want_carbons = not not features:get_child("enable", "urn:xmpp:carbons:2"); |
105 if features:get_child("enable", "urn:xmpp:carbons:2") then |
|
106 session.want_carbons = true; |
|
107 event.result:tag("enabled", { xmlns = "urn:xmpp:carbons:2" }):up(); |
|
108 end |
106 |
109 |
107 -- CSI |
110 -- CSI |
108 local csi_state_tag = features:child_with_ns("urn:xmpp:csi:0"); |
111 local csi_state_tag = features:child_with_ns("urn:xmpp:csi:0"); |
109 if csi_state_tag then |
112 if csi_state_tag then |
110 session.state = csi_state_tag.name; |
113 session.state = csi_state_tag.name; |