Merge branches 'develop' and 't3chguy/m.relates_to' of github.com:matrix-org/matrix-react-sdk into t3chguy/m.relates_to

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	src/i18n/strings/en_EN.json
#	src/i18n/strings/eu.json
#	src/i18n/strings/fr.json
#	src/i18n/strings/lv.json
#	src/i18n/strings/ru.json
#	src/i18n/strings/zh_Hant.json
This commit is contained in:
Michael Telatynski 2018-04-12 09:48:06 +01:00
commit c77807bd22
No known key found for this signature in database
GPG key ID: 3F879DA5AD802A5E
41 changed files with 2135 additions and 359 deletions

View file

@ -252,6 +252,8 @@ export default class GroupStore extends EventEmitter {
acceptGroupInvite() {
return MatrixClientPeg.get().acceptGroupInvite(this.groupId)
// The user should now be able to access (personal) group settings
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.Summary))
// The user might be able to see more rooms now
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupRooms))
// The user should now appear as a member
@ -260,6 +262,28 @@ export default class GroupStore extends EventEmitter {
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupInvitedMembers));
}
joinGroup() {
return MatrixClientPeg.get().joinGroup(this.groupId)
// The user should now be able to access (personal) group settings
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.Summary))
// The user might be able to see more rooms now
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupRooms))
// The user should now appear as a member
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupMembers))
// The user should now not appear as an invited member
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupInvitedMembers));
}
leaveGroup() {
return MatrixClientPeg.get().leaveGroup(this.groupId)
// The user should now not be able to access group settings
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.Summary))
// The user might only be able to see a subset of rooms now
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupRooms))
// The user should now not appear as a member
.then(this._fetchResource.bind(this, GroupStore.STATE_KEY.GroupMembers));
}
addRoomToGroupSummary(roomId, categoryId) {
return MatrixClientPeg.get()
.addRoomToGroupSummary(this.groupId, roomId, categoryId)