Merge branch 'develop' into event_signing

This commit is contained in:
Mark Haines 2014-10-27 16:56:08 +00:00
commit 7c7d9d6326
10 changed files with 9277 additions and 20 deletions

View File

@ -169,11 +169,6 @@ class RoomCreationHandler(BaseHandler):
content=content
)
yield self.hs.get_handlers().room_member_handler.change_membership(
join_event,
do_auth=False
)
content = {"membership": Membership.INVITE}
for invitee in invite_list:
invite_event = self.event_factory.create_event(

View File

@ -1 +0,0 @@
import an_unused_module

View File

@ -30,7 +30,8 @@ var matrixWebClient = angular.module('matrixWebClient', [
'MatrixCall',
'eventStreamService',
'eventHandlerService',
'infinite-scroll'
'infinite-scroll',
'ui.bootstrap'
]);
matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',

5081
webclient/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -256,7 +256,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
// could be a membership change, display name change, etc.
// Find out which one.
var memberChanges = undefined;
if (event.prev_content && (event.prev_content.membership !== event.content.membership)) {
if ((event.prev_content === undefined && event.content.membership) || (event.prev_content && (event.prev_content.membership !== event.content.membership))) {
memberChanges = "membership";
}
else if (event.prev_content && (event.prev_content.displayname !== event.content.displayname)) {

View File

@ -5,6 +5,7 @@
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="mobile.css">
<link rel="stylesheet" href="bootstrap.css">
<link rel="icon" href="favicon.ico">
@ -16,6 +17,7 @@
<script src="js/angular-route.min.js"></script>
<script src="js/angular-sanitize.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script type='text/javascript' src="js/ui-bootstrap-tpls-0.11.2.js"></script>
<script type='text/javascript' src='js/ng-infinite-scroll-matrix.js'></script>
<script type='text/javascript' src='js/autofill-event.js'></script>
<script src="app.js"></script>

File diff suppressed because it is too large Load Diff

View File

@ -140,6 +140,9 @@ angular.module('RegisterController', ['matrixService'])
$scope.feedback = "Captcha is required on this home " +
"server.";
}
else if (error.data.error) {
$scope.feedback = error.data.error;
}
}
else if (error.status === 0) {
$scope.feedback = "Unable to talk to the server.";

View File

@ -15,8 +15,8 @@ limitations under the License.
*/
angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
.controller('RoomController', ['$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall',
function($filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall) {
.controller('RoomController', ['$modal', '$filter', '$scope', '$timeout', '$routeParams', '$location', '$rootScope', 'matrixService', 'mPresence', 'eventHandlerService', 'mFileUpload', 'matrixPhoneService', 'MatrixCall',
function($modal, $filter, $scope, $timeout, $routeParams, $location, $rootScope, matrixService, mPresence, eventHandlerService, mFileUpload, matrixPhoneService, MatrixCall) {
'use strict';
var MESSAGES_PER_PAGINATION = 30;
var THUMBNAIL_SIZE = 320;
@ -830,7 +830,7 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
$scope.userIDToInvite = "";
},
function(reason) {
$scope.feedback = "Failure: " + reason;
$scope.feedback = "Failure: " + reason.data.error;
});
};
@ -982,4 +982,11 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput'])
}
};
$scope.openJson = function(content) {
console.log("Displaying modal dialog for " + JSON.stringify(content));
var modalInstance = $modal.open({
template: "<pre>" + angular.toJson(content, true) + "</pre>"
});
};
}]);

View File

@ -84,10 +84,10 @@
</td>
<td ng-class="(!msg.content.membership && ('m.room.topic' !== msg.type && 'm.room.name' !== msg.type))? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : 'membership text'">
<div class="bubble">
<span ng-if="'join' === msg.content.membership && msg.changedKey === 'membership'">
<span ng-if="'join' === msg.content.membership && msg.changedKey === 'membership'" ng-click="openJson(msg)">
{{ members[msg.state_key].displayname || msg.state_key }} joined
</span>
<span ng-if="'leave' === msg.content.membership && msg.changedKey === 'membership'">
<span ng-if="'leave' === msg.content.membership && msg.changedKey === 'membership'" ng-click="openJson(msg)">
<span ng-if="msg.user_id === msg.state_key">
{{ members[msg.state_key].displayname || msg.state_key }} left
</span>
@ -101,7 +101,7 @@
</span>
</span>
<span ng-if="'invite' === msg.content.membership && msg.changedKey === 'membership' ||
'ban' === msg.content.membership && msg.changedKey === 'membership'">
'ban' === msg.content.membership && msg.changedKey === 'membership'" ng-click="openJson(msg)">
{{ members[msg.user_id].displayname || msg.user_id }}
{{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }}
{{ members[msg.state_key].displayname || msg.state_key }}
@ -109,23 +109,25 @@
: {{ msg.content.reason }}
</span>
</span>
<span ng-if="msg.changedKey === 'displayname'">
<span ng-if="msg.changedKey === 'displayname'" ng-click="openJson(msg)">
{{ msg.user_id }} changed their display name from {{ msg.prev_content.displayname }} to {{ msg.content.displayname }}
</span>
<span ng-show='msg.content.msgtype === "m.emote"'
ng-class="msg.echo_msg_state"
ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/>
ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"
ng-click="openJson(msg)"/>
<span ng-show='msg.content.msgtype === "m.text"'
class="message"
ng-click="openJson(msg)"
ng-class="containsBingWord(msg.content.body) && msg.user_id != state.user_id ? msg.echo_msg_state + ' messageBing' : msg.echo_msg_state"
ng-bind-html="(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message' && msg.content.format === 'org.matrix.custom.html') ?
(msg.content.formatted_body | unsanitizedLinky) :
(msg.content.msgtype === 'm.text' && msg.type === 'm.room.message') ? (msg.content.body | linky:'_blank') : '' "/>
<span ng-show='msg.type === "m.call.invite" && msg.user_id == state.user_id'>Outgoing Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>
<span ng-show='msg.type === "m.call.invite" && msg.user_id != state.user_id'>Incoming Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>
<span ng-show='msg.type === "m.call.invite" && msg.user_id == state.user_id' ng-click="openJson(msg)">Outgoing Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>
<span ng-show='msg.type === "m.call.invite" && msg.user_id != state.user_id' ng-click="openJson(msg)">Incoming Call{{ isWebRTCSupported ? '' : ' (But your browser does not support VoIP)' }}</span>
<div ng-show='msg.content.msgtype === "m.image"'>
<div ng-hide='msg.content.thumbnail_url' ng-style="msg.content.body.h && { 'height' : (msg.content.body.h < 320) ? msg.content.body.h : 320}">
@ -137,11 +139,11 @@
</div>
</div>
<span ng-if="'m.room.topic' === msg.type">
<span ng-if="'m.room.topic' === msg.type" ng-click="openJson(msg)">
{{ members[msg.user_id].displayname || msg.user_id }} changed the topic to: {{ msg.content.topic }}
</span>
<span ng-if="'m.room.name' === msg.type">
<span ng-if="'m.room.name' === msg.type" ng-click="openJson(msg)">
{{ members[msg.user_id].displayname || msg.user_id }} changed the room name to: {{ msg.content.name }}
</span>