1
0

Compare commits

...

5 Commits

Author SHA1 Message Date
David Baker
7b79c0f08f v0.1.2 2014-08-29 18:13:34 +01:00
David Baker
8c36179d35 Give basic feedback on the state of VoIP calls in the UI (manually adding to master having added to develop) 2014-08-29 18:11:20 +01:00
Erik Johnston
52203edbce Version bump for bug fix. 2014-08-29 16:15:20 +01:00
Erik Johnston
d5c94c922f Merge branch 'hotfixes-v0.1.0' of github.com:matrix-org/synapse 2014-08-29 16:07:01 +01:00
Erik Johnston
f07f538ac7 When notifying listeners, don't do so in a serial fashion 2014-08-29 16:01:01 +01:00
7 changed files with 40 additions and 7 deletions

View File

@@ -1,3 +1,16 @@
Changes in synapse 0.1.2 (2014-08-29)
=====================================
Webclient:
* Add basic call state UI for VoIP calls.
Changes in synapse 0.1.1 (2014-08-29)
=====================================
Homeserver:
* Fix bug that caused the event stream to not notify some clients about
changes.
Changes in synapse 0.1.0 (2014-08-29)
=====================================
Presence has been reenabled in this release.

View File

@@ -1 +1 @@
0.1.0
0.1.2

View File

@@ -16,4 +16,4 @@
""" This is a reference implementation of a synapse home server.
"""
__version__ = "0.1.0"
__version__ = "0.1.2"

View File

@@ -106,7 +106,9 @@ class Notifier(object):
# TODO (erikj): Can we make this more efficient by hitting the
# db once?
for listener in listeners:
@defer.inlineCallbacks
def notify(listener):
events, end_token = yield source.get_new_events_for_user(
listener.user,
listener.from_token,
@@ -118,6 +120,13 @@ class Notifier(object):
self, events, listener.from_token, end_token
)
def eb(failure):
logger.exception("Failed to notify listener", failure)
yield defer.DeferredList(
[notify(l).addErrback(eb) for l in listeners]
)
@defer.inlineCallbacks
@log_function
def on_new_user_event(self, users=[], rooms=[]):
@@ -136,7 +145,8 @@ class Notifier(object):
for room in rooms:
listeners |= self.rooms_to_listeners.get(room, set()).copy()
for listener in listeners:
@defer.inlineCallbacks
def notify(listener):
events, end_token = yield source.get_new_events_for_user(
listener.user,
listener.from_token,
@@ -148,6 +158,13 @@ class Notifier(object):
self, events, listener.from_token, end_token
)
def eb(failure):
logger.exception("Failed to notify listener", failure)
yield defer.DeferredList(
[notify(l).addErrback(eb) for l in listeners]
)
def get_events_for(self, user, rooms, pagination_config, timeout):
""" For the given user and rooms, return any new events for them. If
there are no new events wait for up to `timeout` milliseconds for any

View File

@@ -36,7 +36,7 @@ var forAllTracksOnStream = function(s, f) {
}
angular.module('MatrixCall', [])
.factory('MatrixCall', ['matrixService', 'matrixPhoneService', function MatrixCallFactory(matrixService, matrixPhoneService) {
.factory('MatrixCall', ['matrixService', 'matrixPhoneService', '$rootScope', function MatrixCallFactory(matrixService, matrixPhoneService, $rootScope) {
var MatrixCall = function(room_id) {
this.room_id = room_id;
this.call_id = "c" + new Date().getTime();
@@ -204,6 +204,7 @@ angular.module('MatrixCall', [])
// ideally we'd consider the call to be connected when we get media but chrome doesn't implement nay of the 'onstarted' events yet
if (this.peerConn.iceConnectionState == 'completed' || this.peerConn.iceConnectionState == 'connected') {
this.state = 'connected';
$rootScope.$apply();
}
};

View File

@@ -487,7 +487,5 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
}
$scope.onCallHangup = function() {
$scope.feedback = "Call ended";
$scope.currentCall = undefined;
}
}]);

View File

@@ -105,6 +105,10 @@
<button ng-click="hangupCall()">Reject</button>
</div>
<button ng-click="hangupCall()" ng-show="currentCall && currentCall.state != 'ringing'">Hang up</button>
<span ng-show="currentCall.state == 'invite_sent'">Calling...</span>
<span ng-show="currentCall.state == 'connecting'">Call Connecting...</span>
<span ng-show="currentCall.state == 'connected'">Call Connected</span>
<span ng-show="currentCall.state == 'ended'">Call Ended</span>
<span style="display: none; ">{{ currentCall.state }}</span>
</div>