|
@@ -196,7 +196,7 @@ export default class ChatRoom extends Listenable {
|
196
|
196
|
sendPresence(fromJoin) {
|
197
|
197
|
const to = this.presMap.to;
|
198
|
198
|
|
199
|
|
- if (!to || (!this.joined && !fromJoin)) {
|
|
199
|
+ if (!this.connection || !this.connection.connected || !to || (!this.joined && !fromJoin)) {
|
200
|
200
|
// Too early to send presence - not initialized
|
201
|
201
|
return;
|
202
|
202
|
}
|
|
@@ -1273,9 +1273,9 @@ export default class ChatRoom extends Listenable {
|
1273
|
1273
|
*/
|
1274
|
1274
|
sendAudioInfoPresence(mute, callback) {
|
1275
|
1275
|
this.addAudioInfoToPresence(mute);
|
1276
|
|
- if (this.connection) {
|
1277
|
|
- this.sendPresence();
|
1278
|
|
- }
|
|
1276
|
+
|
|
1277
|
+ // FIXME resend presence on CONNECTED
|
|
1278
|
+ this.sendPresence();
|
1279
|
1279
|
if (callback) {
|
1280
|
1280
|
callback();
|
1281
|
1281
|
}
|
|
@@ -1301,9 +1301,6 @@ export default class ChatRoom extends Listenable {
|
1301
|
1301
|
*/
|
1302
|
1302
|
sendVideoInfoPresence(mute) {
|
1303
|
1303
|
this.addVideoInfoToPresence(mute);
|
1304
|
|
- if (!this.connection) {
|
1305
|
|
- return;
|
1306
|
|
- }
|
1307
|
1304
|
this.sendPresence();
|
1308
|
1305
|
}
|
1309
|
1306
|
|