| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-12-03 16:41:03 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-12-03 16:41:24 UTC |
| parent | d9f0c842a360f104788a104b59024436b82af5f4 |
| snikket/Chat.hx | +2 | -2 |
| snikket/jingle/Session.hx | +1 | -1 |
diff --git a/snikket/Chat.hx b/snikket/Chat.hx index ee1d179..a5fb50c 100644 --- a/snikket/Chat.hx +++ b/snikket/Chat.hx @@ -466,8 +466,8 @@ abstract class Chat { } @:allow(snikket) - private function getResourceCaps(resource:String, defaultToAny = false):Caps { - return presence[resource]?.caps ?? (defaultToAny ? presence.iterator().next()?.caps : null) ?? new Caps("", [], []); + private function getResourceCaps(resource:String):Caps { + return presence[resource]?.caps ?? new Caps("", [], []); } @:allow(snikket) diff --git a/snikket/jingle/Session.hx b/snikket/jingle/Session.hx index ae47101..69271ab 100644 --- a/snikket/jingle/Session.hx +++ b/snikket/jingle/Session.hx @@ -554,7 +554,7 @@ class InitiatedSession implements Session { private function setupLocalDescription(type: String, ?filterMedia: Array<String>, ?filterOut: Bool = false, ?beforeSend: (SessionDescription)->Void) { return pc.setLocalDescription(null).then((_) -> { - final caps = client.getDirectChat(counterpart.asBare().asString()).getResourceCaps(counterpart.resource, true); + final caps = client.getDirectChat(counterpart.asBare().asString()).getResourceCaps(counterpart.resource); return if ((type == "session-initiate" || type == "session-accept") && caps.features.contains("urn:ietf:rfc:3264")) { new Promise((resolve, reject) -> { final timeout = haxe.Timer.delay(() -> {