From 2c81588937cdd3a5763e8aa133a3a74efbb8952c Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Mon, 19 Mar 2018 12:11:08 +0000
Subject: [PATCH 01/40] bump js-sdk version

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index bb8db64d28..c33babceb0 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
     "isomorphic-fetch": "^2.2.1",
     "linkifyjs": "^2.1.3",
     "lodash": "^4.13.1",
-    "matrix-js-sdk": "0.9.2",
+    "matrix-js-sdk": "0.10.0-rc.1",
     "optimist": "^0.6.1",
     "prop-types": "^15.5.8",
     "querystring": "^0.2.0",

From 85f81e81539f5782993957441b9acf2f6cbd2ee9 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Mon, 19 Mar 2018 12:16:32 +0000
Subject: [PATCH 02/40] Prepare changelog for v0.12.0-rc.1

---
 CHANGELOG.md | 335 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 335 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 055e25b805..a0ad559922 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,338 @@
+Changes in [0.12.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.1) (2018-03-19)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.4...v0.12.0-rc.1)
+
+ * Remove the message on migrating crypto data
+   [\#1803](https://github.com/matrix-org/matrix-react-sdk/pull/1803)
+ * Update from Weblate.
+   [\#1804](https://github.com/matrix-org/matrix-react-sdk/pull/1804)
+ * Improve room list performance when receiving messages
+   [\#1801](https://github.com/matrix-org/matrix-react-sdk/pull/1801)
+ * Add change delay warning in GroupView settings
+   [\#1802](https://github.com/matrix-org/matrix-react-sdk/pull/1802)
+ * Only use `dangerouslySetInnerHTML` for HTML messages
+   [\#1799](https://github.com/matrix-org/matrix-react-sdk/pull/1799)
+ * Limit group requests to 3 at once
+   [\#1798](https://github.com/matrix-org/matrix-react-sdk/pull/1798)
+ * Show GroupMemberList after inviting a group member
+   [\#1796](https://github.com/matrix-org/matrix-react-sdk/pull/1796)
+ * Fix syntax fail
+   [\#1794](https://github.com/matrix-org/matrix-react-sdk/pull/1794)
+ * Use TintableSvg for TagPanel clear filter button
+   [\#1793](https://github.com/matrix-org/matrix-react-sdk/pull/1793)
+ * Fix missing space between "...is a" and user ID
+   [\#1792](https://github.com/matrix-org/matrix-react-sdk/pull/1792)
+ * E2E "fudge-button"
+   [\#1791](https://github.com/matrix-org/matrix-react-sdk/pull/1791)
+ * Remove spurious console.trace
+   [\#1790](https://github.com/matrix-org/matrix-react-sdk/pull/1790)
+ * Don't reset the presence timer on every dispatch
+   [\#1789](https://github.com/matrix-org/matrix-react-sdk/pull/1789)
+ * Potentially fix a memory leak in FlairStore
+   [\#1788](https://github.com/matrix-org/matrix-react-sdk/pull/1788)
+ * Implement transparent RoomTile for use in some places
+   [\#1785](https://github.com/matrix-org/matrix-react-sdk/pull/1785)
+ * Fix varying default group avatar colour for given group
+   [\#1784](https://github.com/matrix-org/matrix-react-sdk/pull/1784)
+ * Fix bug where avatar change not reflected in LLP
+   [\#1783](https://github.com/matrix-org/matrix-react-sdk/pull/1783)
+ * Workaround for atlassian/react-beautiful-dnd#273
+   [\#1782](https://github.com/matrix-org/matrix-react-sdk/pull/1782)
+ * Add setting to disable TagPanel
+   [\#1781](https://github.com/matrix-org/matrix-react-sdk/pull/1781)
+ * [DO NOT MERGE] Tests proven to fail
+   [\#1780](https://github.com/matrix-org/matrix-react-sdk/pull/1780)
+ * Fix room power level settings
+   [\#1779](https://github.com/matrix-org/matrix-react-sdk/pull/1779)
+ * fix shouldHideEvent saying an event is a leave/join when a profile ch…
+   [\#1769](https://github.com/matrix-org/matrix-react-sdk/pull/1769)
+ * Add "Did you know:..." microcopy to groups view
+   [\#1777](https://github.com/matrix-org/matrix-react-sdk/pull/1777)
+ * Give emptySubListTip a container for correct bg colour
+   [\#1753](https://github.com/matrix-org/matrix-react-sdk/pull/1753)
+ * Do proper null-checks on decypted events to fix NPEs
+   [\#1776](https://github.com/matrix-org/matrix-react-sdk/pull/1776)
+ * Reorder the RoomListStore lists on Event.decrypted
+   [\#1775](https://github.com/matrix-org/matrix-react-sdk/pull/1775)
+ * Fix bug where global "Never send to unverified..." is ignored
+   [\#1772](https://github.com/matrix-org/matrix-react-sdk/pull/1772)
+ * Fix bug that prevented tint updates
+   [\#1767](https://github.com/matrix-org/matrix-react-sdk/pull/1767)
+ * Fix group member spinner being out of flex order
+   [\#1765](https://github.com/matrix-org/matrix-react-sdk/pull/1765)
+ * Allow widget iframes to request camera and microphone permissions.
+   [\#1766](https://github.com/matrix-org/matrix-react-sdk/pull/1766)
+ * Change icon from "R" to "X"
+   [\#1764](https://github.com/matrix-org/matrix-react-sdk/pull/1764)
+ * Regenerate room lists on Room event
+   [\#1762](https://github.com/matrix-org/matrix-react-sdk/pull/1762)
+ *  Fix DMs being marked as with the current user ("me")
+   [\#1761](https://github.com/matrix-org/matrix-react-sdk/pull/1761)
+ * Make RoomListStore aware of Room.timeline events
+   [\#1756](https://github.com/matrix-org/matrix-react-sdk/pull/1756)
+ * improve origin check of ScalarMessaging postmessage API.
+   [\#1760](https://github.com/matrix-org/matrix-react-sdk/pull/1760)
+ * Implement global filter to deselect all tags
+   [\#1759](https://github.com/matrix-org/matrix-react-sdk/pull/1759)
+ * Don't show empty custom tags when filtering tags
+   [\#1758](https://github.com/matrix-org/matrix-react-sdk/pull/1758)
+ * Do not assume that tags have been removed
+   [\#1757](https://github.com/matrix-org/matrix-react-sdk/pull/1757)
+ * Change CSS class for message panel spinner
+   [\#1747](https://github.com/matrix-org/matrix-react-sdk/pull/1747)
+ * Remove RoomListStore listener
+   [\#1752](https://github.com/matrix-org/matrix-react-sdk/pull/1752)
+ * Implement GroupTile avatar dragging to TagPanel
+   [\#1751](https://github.com/matrix-org/matrix-react-sdk/pull/1751)
+ * Fix custom tags not being ordered manually
+   [\#1750](https://github.com/matrix-org/matrix-react-sdk/pull/1750)
+ * Store component state for editors
+   [\#1746](https://github.com/matrix-org/matrix-react-sdk/pull/1746)
+ * Give the login page its spinner back
+   [\#1745](https://github.com/matrix-org/matrix-react-sdk/pull/1745)
+ * Add context menu to TagTile
+   [\#1743](https://github.com/matrix-org/matrix-react-sdk/pull/1743)
+ * If a tag is unrecognised, assume manual ordering
+   [\#1748](https://github.com/matrix-org/matrix-react-sdk/pull/1748)
+ * Move RoomList state to RoomListStore
+   [\#1719](https://github.com/matrix-org/matrix-react-sdk/pull/1719)
+ * Move groups button to TagPanel
+   [\#1744](https://github.com/matrix-org/matrix-react-sdk/pull/1744)
+ * Add seconds to timestamp on hover
+   [\#1738](https://github.com/matrix-org/matrix-react-sdk/pull/1738)
+ * Do not truncate autocompleted users in composer
+   [\#1739](https://github.com/matrix-org/matrix-react-sdk/pull/1739)
+ * RoomView: guard against unmounting during peeking
+   [\#1737](https://github.com/matrix-org/matrix-react-sdk/pull/1737)
+ * Fix HS/IS URL reset when switching to Registration
+   [\#1736](https://github.com/matrix-org/matrix-react-sdk/pull/1736)
+ * Fix the reject/accept call buttons in canary (mk2)
+   [\#1734](https://github.com/matrix-org/matrix-react-sdk/pull/1734)
+ * Make ratelimitedfunc time from the function's end
+   [\#1731](https://github.com/matrix-org/matrix-react-sdk/pull/1731)
+ * Give dialogs a matrixClient context
+   [\#1735](https://github.com/matrix-org/matrix-react-sdk/pull/1735)
+ * Fix key bindings in address picker dialog
+   [\#1732](https://github.com/matrix-org/matrix-react-sdk/pull/1732)
+ * Try upgrading eslint-plugin-react
+   [\#1712](https://github.com/matrix-org/matrix-react-sdk/pull/1712)
+ * Fix display name change text
+   [\#1730](https://github.com/matrix-org/matrix-react-sdk/pull/1730)
+ * Persist contentState when sending SlashCommand via MessageComposerInput
+   [\#1721](https://github.com/matrix-org/matrix-react-sdk/pull/1721)
+ * This is actually MFileBody not MImageBody, change classname
+   [\#1726](https://github.com/matrix-org/matrix-react-sdk/pull/1726)
+ * Use invite_3pid prop of createRoom instead of manual invite after create
+   [\#1717](https://github.com/matrix-org/matrix-react-sdk/pull/1717)
+ * guard against m.room.aliases events with no keys (redaction?)
+   [\#1729](https://github.com/matrix-org/matrix-react-sdk/pull/1729)
+ * Fix not showing Invited section if all invites are 3PID
+   [\#1718](https://github.com/matrix-org/matrix-react-sdk/pull/1718)
+ * Fix Rich Replies on files
+   [\#1720](https://github.com/matrix-org/matrix-react-sdk/pull/1720)
+ * Update from Weblate.
+   [\#1728](https://github.com/matrix-org/matrix-react-sdk/pull/1728)
+ * Null guard against falsey (non-null) props.node, to make react happy
+   [\#1724](https://github.com/matrix-org/matrix-react-sdk/pull/1724)
+ * Use correct condition for getting account data after first sync
+   [\#1722](https://github.com/matrix-org/matrix-react-sdk/pull/1722)
+ * Fix order calculation logic when reordering a room
+   [\#1725](https://github.com/matrix-org/matrix-react-sdk/pull/1725)
+ * Linear Rich Quoting
+   [\#1715](https://github.com/matrix-org/matrix-react-sdk/pull/1715)
+ * Fix CreateGroupDialog issues
+   [\#1714](https://github.com/matrix-org/matrix-react-sdk/pull/1714)
+ * Show a warning if the user attempts to leave a room that is invite only
+   [\#1713](https://github.com/matrix-org/matrix-react-sdk/pull/1713)
+ * Swap RoomList to react-beautiful-dnd
+   [\#1711](https://github.com/matrix-org/matrix-react-sdk/pull/1711)
+ * don't pass back {} when we have no `org.matrix.room.color_scheme`
+   [\#1710](https://github.com/matrix-org/matrix-react-sdk/pull/1710)
+ * Don't paginate whilst decrypting events
+   [\#1700](https://github.com/matrix-org/matrix-react-sdk/pull/1700)
+ * Fall back for missing i18n plurals
+   [\#1699](https://github.com/matrix-org/matrix-react-sdk/pull/1699)
+ * Fix group store redundant requests
+   [\#1709](https://github.com/matrix-org/matrix-react-sdk/pull/1709)
+ * Ignore remote echos caused by this client
+   [\#1708](https://github.com/matrix-org/matrix-react-sdk/pull/1708)
+ * Replace TagPanel react-dnd with react-beautiful-dnd
+   [\#1705](https://github.com/matrix-org/matrix-react-sdk/pull/1705)
+ * Only set selected tags state when updating rooms
+   [\#1704](https://github.com/matrix-org/matrix-react-sdk/pull/1704)
+ * Add formatFullDateNoTime to DateUtils and stop passing 12/24h to DateSep
+   [\#1702](https://github.com/matrix-org/matrix-react-sdk/pull/1702)
+ * Fix autofocus on QuestionDialog
+   [\#1698](https://github.com/matrix-org/matrix-react-sdk/pull/1698)
+ * Iterative fixes on Rich Quoting
+   [\#1697](https://github.com/matrix-org/matrix-react-sdk/pull/1697)
+ * Fix missing negation
+   [\#1696](https://github.com/matrix-org/matrix-react-sdk/pull/1696)
+ * Add Analytics Info and add Piwik to SdkConfig.DEFAULTS
+   [\#1625](https://github.com/matrix-org/matrix-react-sdk/pull/1625)
+ * Attempt to re-register for a scalar token if ours is invalid
+   [\#1668](https://github.com/matrix-org/matrix-react-sdk/pull/1668)
+ * Normalise dialogs
+   [\#1674](https://github.com/matrix-org/matrix-react-sdk/pull/1674)
+ * Add 'send without verifying' to status bar
+   [\#1695](https://github.com/matrix-org/matrix-react-sdk/pull/1695)
+ * Implement Rich Quoting/Replies
+   [\#1660](https://github.com/matrix-org/matrix-react-sdk/pull/1660)
+ * Revert "MD-escape URLs/alises/user IDs prior to parsing markdown"
+   [\#1694](https://github.com/matrix-org/matrix-react-sdk/pull/1694)
+ * Cache isConfCallRoom
+   [\#1693](https://github.com/matrix-org/matrix-react-sdk/pull/1693)
+ * Improve performance of tag panel selection (when tags are selected)
+   [\#1687](https://github.com/matrix-org/matrix-react-sdk/pull/1687)
+ * Hide status bar on visible->hidden transition
+   [\#1680](https://github.com/matrix-org/matrix-react-sdk/pull/1680)
+ * [revived] Singularise unsent message prompt, if applicable
+   [\#1692](https://github.com/matrix-org/matrix-react-sdk/pull/1692)
+ * small refactor && warn on self-demotion
+   [\#1683](https://github.com/matrix-org/matrix-react-sdk/pull/1683)
+ * Remove use of deprecated React.PropTypes
+   [\#1677](https://github.com/matrix-org/matrix-react-sdk/pull/1677)
+ * only save RelatedGroupSettings if it was modified. Otherwise perms issue
+   [\#1691](https://github.com/matrix-org/matrix-react-sdk/pull/1691)
+ * Fix a couple more issues with granular settings
+   [\#1675](https://github.com/matrix-org/matrix-react-sdk/pull/1675)
+ * Allow argument to op slashcommand to be negative as PLs can be -ve
+   [\#1673](https://github.com/matrix-org/matrix-react-sdk/pull/1673)
+ * Update from Weblate.
+   [\#1645](https://github.com/matrix-org/matrix-react-sdk/pull/1645)
+ * make RoomDetailRow reusable for the Room Directory
+   [\#1624](https://github.com/matrix-org/matrix-react-sdk/pull/1624)
+ * Prefetch group data for all joined groups when RoomList mounts
+   [\#1686](https://github.com/matrix-org/matrix-react-sdk/pull/1686)
+ * Remove unused selectedRoom prop
+   [\#1690](https://github.com/matrix-org/matrix-react-sdk/pull/1690)
+ * Fix shift and shift-ctrl click in TagPanel
+   [\#1684](https://github.com/matrix-org/matrix-react-sdk/pull/1684)
+ * skip direct chats which either you or the target have left
+   [\#1344](https://github.com/matrix-org/matrix-react-sdk/pull/1344)
+ * Make scroll on paste in RTE compatible with https://github.com/vector-im
+   /riot-web/pull/5900
+   [\#1682](https://github.com/matrix-org/matrix-react-sdk/pull/1682)
+ * Remove extra full stop
+   [\#1685](https://github.com/matrix-org/matrix-react-sdk/pull/1685)
+ * Dedupe requests to fetch group profile data
+   [\#1666](https://github.com/matrix-org/matrix-react-sdk/pull/1666)
+ * Get Group profile from TagTile instead of TagPanel
+   [\#1667](https://github.com/matrix-org/matrix-react-sdk/pull/1667)
+ *  Fix leaking of GroupStore listeners in RoomList
+   [\#1664](https://github.com/matrix-org/matrix-react-sdk/pull/1664)
+ * Add option to also output untranslated string
+   [\#1658](https://github.com/matrix-org/matrix-react-sdk/pull/1658)
+ * Give the current theme to widgets and the integration manager
+   [\#1669](https://github.com/matrix-org/matrix-react-sdk/pull/1669)
+ * Fixes #1953 Allow multiple file uploads using drag & drop for RoomView
+   [\#1671](https://github.com/matrix-org/matrix-react-sdk/pull/1671)
+ * Fix issue with preview of phone number on register and waiting for sms code
+   confirmation code
+   [\#1670](https://github.com/matrix-org/matrix-react-sdk/pull/1670)
+ * Attempt to improve TagPanel performance
+   [\#1647](https://github.com/matrix-org/matrix-react-sdk/pull/1647)
+ * Fix one variant of a scroll jump that occurs when decrypting an m.text
+   [\#1656](https://github.com/matrix-org/matrix-react-sdk/pull/1656)
+ * Avoid NPEs by using ref method for collecting loggedInView in MatrixChat
+   [\#1665](https://github.com/matrix-org/matrix-react-sdk/pull/1665)
+ * DnD Ordered TagPanel
+   [\#1653](https://github.com/matrix-org/matrix-react-sdk/pull/1653)
+ * Update widget title on edit.
+   [\#1663](https://github.com/matrix-org/matrix-react-sdk/pull/1663)
+ * Set widget title
+   [\#1661](https://github.com/matrix-org/matrix-react-sdk/pull/1661)
+ * Display custom widget content titles
+   [\#1650](https://github.com/matrix-org/matrix-react-sdk/pull/1650)
+ * Add maximize / minimize apps drawer icons.
+   [\#1649](https://github.com/matrix-org/matrix-react-sdk/pull/1649)
+ * Warn when migrating e2e data to indexeddb
+   [\#1654](https://github.com/matrix-org/matrix-react-sdk/pull/1654)
+ * Don't Auto-show UnknownDeviceDialog
+   [\#1600](https://github.com/matrix-org/matrix-react-sdk/pull/1600)
+ * Remove logging.
+   [\#1655](https://github.com/matrix-org/matrix-react-sdk/pull/1655)
+ * Add messaging endpoint for room encryption status.
+   [\#1648](https://github.com/matrix-org/matrix-react-sdk/pull/1648)
+ * Add some missing translatable strings
+   [\#1588](https://github.com/matrix-org/matrix-react-sdk/pull/1588)
+ * Add widget -> riot postMessage API
+   [\#1640](https://github.com/matrix-org/matrix-react-sdk/pull/1640)
+ * Add some null checks
+   [\#1646](https://github.com/matrix-org/matrix-react-sdk/pull/1646)
+ * Implement shift-click and ctrl-click semantics for TP
+   [\#1641](https://github.com/matrix-org/matrix-react-sdk/pull/1641)
+ * Don't show group when clicking tag panel
+   [\#1642](https://github.com/matrix-org/matrix-react-sdk/pull/1642)
+ * Implement TagPanel (or LeftLeftPanel) for group filtering
+   [\#1639](https://github.com/matrix-org/matrix-react-sdk/pull/1639)
+ * Implement UI for using bulk device deletion API
+   [\#1638](https://github.com/matrix-org/matrix-react-sdk/pull/1638)
+ * Replace (IRC) with flair
+   [\#1637](https://github.com/matrix-org/matrix-react-sdk/pull/1637)
+ * Allow guests to view individual groups
+   [\#1635](https://github.com/matrix-org/matrix-react-sdk/pull/1635)
+ * Allow guest to see MyGroups, show ILAG when creating a group
+   [\#1636](https://github.com/matrix-org/matrix-react-sdk/pull/1636)
+ * Move group publication toggles to UserSettings
+   [\#1634](https://github.com/matrix-org/matrix-react-sdk/pull/1634)
+ * Pull the theme through the default process
+   [\#1617](https://github.com/matrix-org/matrix-react-sdk/pull/1617)
+ * Rebase ConfirmRedactDialog on QuestionDialog
+   [\#1630](https://github.com/matrix-org/matrix-react-sdk/pull/1630)
+ * Fix logging of missing substitution variables
+   [\#1629](https://github.com/matrix-org/matrix-react-sdk/pull/1629)
+ * Rename Related Groups to improve readability
+   [\#1632](https://github.com/matrix-org/matrix-react-sdk/pull/1632)
+ * Make PresenceLabel more easily translatable
+   [\#1616](https://github.com/matrix-org/matrix-react-sdk/pull/1616)
+ * Perform substitution on all parts, not just the last one
+   [\#1618](https://github.com/matrix-org/matrix-react-sdk/pull/1618)
+ * Send Access Token in Headers to help prevent it being spit out in errors
+   [\#1552](https://github.com/matrix-org/matrix-react-sdk/pull/1552)
+ * Add aria-labels to ActionButtons
+   [\#1628](https://github.com/matrix-org/matrix-react-sdk/pull/1628)
+ * MemberPresenceAvatar: fix null references
+   [\#1620](https://github.com/matrix-org/matrix-react-sdk/pull/1620)
+ * Disable presence controls if there's no presence
+   [\#1623](https://github.com/matrix-org/matrix-react-sdk/pull/1623)
+ * Fix GroupMemberList search for users without displayname
+   [\#1627](https://github.com/matrix-org/matrix-react-sdk/pull/1627)
+ * Remove redundant super class EventEmitter for FlairStore
+   [\#1626](https://github.com/matrix-org/matrix-react-sdk/pull/1626)
+ * Fix granular URL previews
+   [\#1622](https://github.com/matrix-org/matrix-react-sdk/pull/1622)
+ * Flairstore: Fix broken reference
+   [\#1619](https://github.com/matrix-org/matrix-react-sdk/pull/1619)
+ * Do something more sensible for sender profile name/aux opacity
+   [\#1615](https://github.com/matrix-org/matrix-react-sdk/pull/1615)
+ * Add eslint rule keyword-spacing
+   [\#1614](https://github.com/matrix-org/matrix-react-sdk/pull/1614)
+ * Fix various issues surrounding granular settings to date
+   [\#1613](https://github.com/matrix-org/matrix-react-sdk/pull/1613)
+ * differentiate between state events and message events
+   [\#1612](https://github.com/matrix-org/matrix-react-sdk/pull/1612)
+ * Refactor translations
+   [\#1608](https://github.com/matrix-org/matrix-react-sdk/pull/1608)
+ * Make TintableSvg links behave like normal image links
+   [\#1611](https://github.com/matrix-org/matrix-react-sdk/pull/1611)
+ * Fix linting errors.
+   [\#1610](https://github.com/matrix-org/matrix-react-sdk/pull/1610)
+ * Granular settings
+   [\#1516](https://github.com/matrix-org/matrix-react-sdk/pull/1516)
+ * Implement user-controlled presence
+   [\#1482](https://github.com/matrix-org/matrix-react-sdk/pull/1482)
+ * Edit widget icon styling
+   [\#1609](https://github.com/matrix-org/matrix-react-sdk/pull/1609)
+ * Attempt to improve textual power levels
+   [\#1607](https://github.com/matrix-org/matrix-react-sdk/pull/1607)
+ * Determine whether power level is custom once Roles have been determined
+   [\#1606](https://github.com/matrix-org/matrix-react-sdk/pull/1606)
+ * Status.im theme
+   [\#1605](https://github.com/matrix-org/matrix-react-sdk/pull/1605)
+ * Revert "Lowercase all usernames"
+   [\#1604](https://github.com/matrix-org/matrix-react-sdk/pull/1604)
+
 Changes in [0.11.4](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.11.4) (2018-02-09)
 =====================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.3...v0.11.4)

From 6fbd4e04fa3ab4330ae0b6e88118974721177e6d Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Mon, 19 Mar 2018 12:16:32 +0000
Subject: [PATCH 03/40] v0.12.0-rc.1

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index c33babceb0..373d889a22 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.11.4",
+  "version": "0.12.0-rc.1",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From 7b1d73ca57014282daf2233ea5d675645787adbc Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Mon, 19 Mar 2018 14:58:59 +0000
Subject: [PATCH 04/40] Prepare changelog for v0.12.0-rc.2

---
 CHANGELOG.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0ad559922..462674dd4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+Changes in [0.12.0-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.2) (2018-03-19)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.1...v0.12.0-rc.2)
+
+ * Take TagPanel out of labs
+   [\#1805](https://github.com/matrix-org/matrix-react-sdk/pull/1805)
+
 Changes in [0.12.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.1) (2018-03-19)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.4...v0.12.0-rc.1)

From 12e468a31473f491c7d6e4f60619f5b9eb4353e2 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Mon, 19 Mar 2018 14:59:00 +0000
Subject: [PATCH 05/40] v0.12.0-rc.2

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 373d889a22..f3ad6a54f9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.1",
+  "version": "0.12.0-rc.2",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From f0b130a04ba0fcf8378c16d254d8718b0085be36 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 20 Mar 2018 17:19:49 +0000
Subject: [PATCH 06/40] Fix room tile badge not disappearing when receiving a
 read receipt

Fixes https://github.com/vector-im/riot-web/issues/6357
---
 src/components/views/rooms/RoomTile.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js
index 448810e2ea..05aaf79e0b 100644
--- a/src/components/views/rooms/RoomTile.js
+++ b/src/components/views/rooms/RoomTile.js
@@ -146,6 +146,15 @@ module.exports = React.createClass({
         dis.unregister(this.dispatcherRef);
     },
 
+    componentWillReceiveProps: function(props) {
+        // XXX: This could be a lot better - this makes the assumption that
+        // the notification count may have changed when the properties of
+        // the room tile change.
+        this.setState({
+            notificationCount: this.props.room.getUnreadNotificationCount(),
+        });
+    },
+
     // Do a simple shallow comparison of props and state to avoid unnecessary
     // renders. The assumption made here is that only state and props are used
     // in rendering this component and children.

From 9d6cd28661bee3cf8881077f6f9babf03324b87f Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Tue, 20 Mar 2018 17:34:23 +0000
Subject: [PATCH 07/40] Prepare changelog for v0.12.0-rc.3

---
 CHANGELOG.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 462674dd4b..581464000d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+Changes in [0.12.0-rc.3](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.3) (2018-03-20)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.2...v0.12.0-rc.3)
+
+ * Fix room tile badge not disappearing when receiving a read receipt
+   [\#1807](https://github.com/matrix-org/matrix-react-sdk/pull/1807)
+
 Changes in [0.12.0-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.2) (2018-03-19)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.1...v0.12.0-rc.2)

From 3a8f38011372335a369e43b5567868cd3b0c1534 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Tue, 20 Mar 2018 17:38:12 +0000
Subject: [PATCH 08/40] v0.12.0-rc.3

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index f3ad6a54f9..09016fd87f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.2",
+  "version": "0.12.0-rc.3",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From d99478b51367261dc0a811ca2d1a0088730822c3 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 22 Mar 2018 10:23:34 +0000
Subject: [PATCH 09/40] Fix broken import preventing people tag

---
 src/actions/RoomListActions.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/actions/RoomListActions.js b/src/actions/RoomListActions.js
index a92bd1ebaf..e5911c4e32 100644
--- a/src/actions/RoomListActions.js
+++ b/src/actions/RoomListActions.js
@@ -18,7 +18,7 @@ import { asyncAction } from './actionCreators';
 import RoomListStore from '../stores/RoomListStore';
 
 import Modal from '../Modal';
-import Rooms from '../Rooms';
+import * as Rooms from '../Rooms';
 import { _t } from '../languageHandler';
 import sdk from '../index';
 

From 6c0a7bf1ce3be661aa9eded21db5a20a37963e9e Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 22 Mar 2018 13:17:47 +0000
Subject: [PATCH 10/40] Prepare changelog for v0.12.0-rc.4

---
 CHANGELOG.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 581464000d..36709caf62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+Changes in [0.12.0-rc.4](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.4) (2018-03-22)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.3...v0.12.0-rc.4)
+
+ * Fix broken import preventing people tag
+   [\#1811](https://github.com/matrix-org/matrix-react-sdk/pull/1811)
+
 Changes in [0.12.0-rc.3](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.3) (2018-03-20)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.2...v0.12.0-rc.3)

From 72b9cb0be419a4a0b406a49f5d374900cbc1d583 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 22 Mar 2018 13:17:48 +0000
Subject: [PATCH 11/40] v0.12.0-rc.4

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 09016fd87f..6b74c7eed6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.3",
+  "version": "0.12.0-rc.4",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From 18ec690e2edb4e87780c7fd282d7fdc19a618ba9 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 29 Mar 2018 16:57:07 +0100
Subject: [PATCH 12/40] Add radio button for setting group is_joinable

which dictates whether the group can be joined without invitation.
---
 src/components/structures/GroupView.js | 54 ++++++++++++++++++++++++--
 src/i18n/strings/en_EN.json            |  2 +
 2 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 30e897e5dc..a491bc65e0 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -546,6 +546,9 @@ export default React.createClass({
         this.setState({
             editing: true,
             profileForm: Object.assign({}, this.state.summary.profile),
+            joinableForm: {
+                isJoinable: this.state.summary.profile.is_joinable,
+            },
         });
         dis.dispatch({
             action: 'panel_disable',
@@ -608,11 +611,15 @@ export default React.createClass({
         }).done();
     },
 
+    _onJoinableChange: function(ev) {
+        this.setState({
+            joinableForm: { isJoinable: ev.target.value === "true" },
+        });
+    },
+
     _onSaveClick: function() {
         this.setState({saving: true});
-        const savePromise = this.state.isUserPrivileged ?
-            this._matrixClient.setGroupProfile(this.props.groupId, this.state.profileForm) :
-            Promise.resolve();
+        const savePromise = this.state.isUserPrivileged ? this._saveGroup() : Promise.resolve();
         savePromise.then((result) => {
             this.setState({
                 saving: false,
@@ -643,6 +650,11 @@ export default React.createClass({
         }).done();
     },
 
+    _saveGroup: async function() {
+        await this._matrixClient.setGroupProfile(this.props.groupId, this.state.profileForm);
+        await this._matrixClient.setGroupJoinable(this.props.groupId, this.state.joinableForm.isJoinable);
+    },
+
     _onAcceptInviteClick: function() {
         this.setState({membershipBusy: true});
         this._groupStore.acceptGroupInvite().then(() => {
@@ -716,6 +728,7 @@ export default React.createClass({
         return <div className={groupSettingsSectionClasses}>
             { header }
             { changeDelayWarning }
+            { this._getJoinableNode() }
             { this._getLongDescriptionNode() }
             { this._getRoomsNode() }
         </div>;
@@ -926,6 +939,41 @@ export default React.createClass({
         return null;
     },
 
+    _getJoinableNode: function() {
+        return this.state.editing ? <div>
+            <h3>
+                { _t('Who can join this community?') }
+                { this.state.groupJoinableLoading ?
+                    <InlineSpinner /> : <div />
+                }
+            </h3>
+            <div>
+                <label>
+                    <input type="radio"
+                        value="false"
+                        checked={!this.state.joinableForm.isJoinable}
+                        onClick={this._onJoinableChange}
+                    />
+                    <div className="mx_GroupView_label_text">
+                        { _t('Only people who have been invited') }
+                    </div>
+                </label>
+            </div>
+            <div>
+                <label>
+                    <input type="radio"
+                        value="true"
+                        checked={this.state.joinableForm.isJoinable}
+                        onClick={this._onJoinableChange}
+                    />
+                    <div className="mx_GroupView_label_text">
+                        { _t('Everyone') }
+                    </div>
+                </label>
+            </div>
+        </div> : null;
+    },
+
     _getLongDescriptionNode: function() {
         const summary = this.state.summary;
         let description = null;
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 49b9b641b0..3d522603ea 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -774,6 +774,8 @@
     "%(inviter)s has invited you to join this community": "%(inviter)s has invited you to join this community",
     "You are an administrator of this community": "You are an administrator of this community",
     "You are a member of this community": "You are a member of this community",
+    "Who can join this community?": "Who can join this community?",
+    "Everyone": "Everyone",
     "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!",
     "Long Description (HTML)": "Long Description (HTML)",
     "Description": "Description",

From 2a6d7e6e8ed15bc00b56f07188b1ee6bf8da0b16 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 29 Mar 2018 17:25:06 +0100
Subject: [PATCH 13/40] Use less confusing values on radio buttons

---
 src/components/structures/GroupView.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index a491bc65e0..9fbba0987a 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -400,6 +400,9 @@ FeaturedRoom.contextTypes = GroupContext;
 RoleUserList.contextTypes = GroupContext;
 FeaturedUser.contextTypes = GroupContext;
 
+const GROUP_JOINABLE = "GROUP_JOINABLE";
+const GROUP_NOT_JOINABLE = "GROUP_NOT_JOINABLE";
+
 export default React.createClass({
     displayName: 'GroupView',
 
@@ -613,7 +616,7 @@ export default React.createClass({
 
     _onJoinableChange: function(ev) {
         this.setState({
-            joinableForm: { isJoinable: ev.target.value === "true" },
+            joinableForm: { isJoinable: ev.target.value === GROUP_JOINABLE },
         });
     },
 
@@ -950,7 +953,7 @@ export default React.createClass({
             <div>
                 <label>
                     <input type="radio"
-                        value="false"
+                        value={GROUP_NOT_JOINABLE}
                         checked={!this.state.joinableForm.isJoinable}
                         onClick={this._onJoinableChange}
                     />
@@ -962,7 +965,7 @@ export default React.createClass({
             <div>
                 <label>
                     <input type="radio"
-                        value="true"
+                        value={GROUP_JOINABLE}
                         checked={this.state.joinableForm.isJoinable}
                         onClick={this._onJoinableChange}
                     />

From 6cb9d28e75e00142f15fac42316a8a4310864c96 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 5 Apr 2018 16:56:35 +0100
Subject: [PATCH 14/40] Update to use new join_policy API

---
 src/components/structures/GroupView.js | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 9fbba0987a..ac6e89d407 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -1,6 +1,6 @@
 /*
 Copyright 2017 Vector Creations Ltd.
-Copyright 2017 New Vector Ltd.
+Copyright 2017, 2018 New Vector Ltd.
 
 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
@@ -400,8 +400,8 @@ FeaturedRoom.contextTypes = GroupContext;
 RoleUserList.contextTypes = GroupContext;
 FeaturedUser.contextTypes = GroupContext;
 
-const GROUP_JOINABLE = "GROUP_JOINABLE";
-const GROUP_NOT_JOINABLE = "GROUP_NOT_JOINABLE";
+const GROUP_JOINPOLICY_OPEN = "open";
+const GROUP_JOINPOLICY_INVITE = "invite";
 
 export default React.createClass({
     displayName: 'GroupView',
@@ -550,7 +550,7 @@ export default React.createClass({
             editing: true,
             profileForm: Object.assign({}, this.state.summary.profile),
             joinableForm: {
-                isJoinable: this.state.summary.profile.is_joinable,
+                policyType: this.state.summary.profile.join_policy,
             },
         });
         dis.dispatch({
@@ -616,7 +616,7 @@ export default React.createClass({
 
     _onJoinableChange: function(ev) {
         this.setState({
-            joinableForm: { isJoinable: ev.target.value === GROUP_JOINABLE },
+            joinableForm: { policyType: ev.target.value },
         });
     },
 
@@ -655,7 +655,9 @@ export default React.createClass({
 
     _saveGroup: async function() {
         await this._matrixClient.setGroupProfile(this.props.groupId, this.state.profileForm);
-        await this._matrixClient.setGroupJoinable(this.props.groupId, this.state.joinableForm.isJoinable);
+        await this._matrixClient.setGroupJoinPolicy(this.props.groupId, {
+            type: this.state.joinableForm.policyType,
+        });
     },
 
     _onAcceptInviteClick: function() {
@@ -953,8 +955,8 @@ export default React.createClass({
             <div>
                 <label>
                     <input type="radio"
-                        value={GROUP_NOT_JOINABLE}
-                        checked={!this.state.joinableForm.isJoinable}
+                        value={GROUP_JOINPOLICY_INVITE}
+                        checked={this.state.joinableForm.policyType === GROUP_JOINPOLICY_INVITE}
                         onClick={this._onJoinableChange}
                     />
                     <div className="mx_GroupView_label_text">
@@ -965,8 +967,8 @@ export default React.createClass({
             <div>
                 <label>
                     <input type="radio"
-                        value={GROUP_JOINABLE}
-                        checked={this.state.joinableForm.isJoinable}
+                        value={GROUP_JOINPOLICY_OPEN}
+                        checked={this.state.joinableForm.policyType === GROUP_JOINPOLICY_OPEN}
                         onClick={this._onJoinableChange}
                     />
                     <div className="mx_GroupView_label_text">

From ef427eaf6793c20c9304398a9441f8d947ee0140 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 3 Apr 2018 17:35:34 +0100
Subject: [PATCH 15/40] Add null-guard to prevent RoomAvatar NPE when room is
 null

which may have been occuring when peeking into a room that the
client hasn't got a Room object for.

Fixes https://github.com/vector-im/riot-web/issues/6432
---
 src/components/views/avatars/RoomAvatar.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/views/avatars/RoomAvatar.js b/src/components/views/avatars/RoomAvatar.js
index e547cf0fa7..ef69bcb60a 100644
--- a/src/components/views/avatars/RoomAvatar.js
+++ b/src/components/views/avatars/RoomAvatar.js
@@ -66,7 +66,8 @@ module.exports = React.createClass({
     },
 
     onRoomStateEvents: function(ev) {
-        if (ev.getRoomId() !== this.props.room.roomId ||
+        if (!this.props.room ||
+            ev.getRoomId() !== this.props.room.roomId ||
             ev.getType() !== 'm.room.avatar'
         ) return;
 

From 0da187c101786d72d75869c92e7ee8c4be4fb16c Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Fri, 6 Apr 2018 10:27:03 +0100
Subject: [PATCH 16/40] Fix broken ForgotPassword component

---
 src/components/structures/login/ForgotPassword.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/structures/login/ForgotPassword.js b/src/components/structures/login/ForgotPassword.js
index 53688ee6c3..ca50b9db6e 100644
--- a/src/components/structures/login/ForgotPassword.js
+++ b/src/components/structures/login/ForgotPassword.js
@@ -23,6 +23,7 @@ import { _t } from '../../../languageHandler';
 import sdk from '../../../index';
 import Modal from "../../../Modal";
 import MatrixClientPeg from "../../../MatrixClientPeg";
+import SdkConfig from "../../../SdkConfig";
 
 import PasswordReset from "../../../PasswordReset";
 
@@ -185,7 +186,7 @@ module.exports = React.createClass({
             );
         } else {
             let serverConfigSection;
-            if (!config.disable_custom_urls) {
+            if (!SdkConfig.get().disable_custom_urls) {
                 serverConfigSection = (
                     <ServerConfig ref="serverConfig"
                         withToggleButton={true}

From 929718b032b63e2279353871a077a0dbfc97d59c Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Fri, 6 Apr 2018 11:03:17 +0100
Subject: [PATCH 17/40] Fix to prevent guests from seeing features

---
 src/settings/handlers/DeviceSettingsHandler.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/settings/handlers/DeviceSettingsHandler.js b/src/settings/handlers/DeviceSettingsHandler.js
index 13117f7498..b2a225e190 100644
--- a/src/settings/handlers/DeviceSettingsHandler.js
+++ b/src/settings/handlers/DeviceSettingsHandler.js
@@ -102,7 +102,7 @@ export default class DeviceSettingsHandler extends SettingsHandler {
     _readFeature(featureName) {
         if (MatrixClientPeg.get() && MatrixClientPeg.get().isGuest()) {
             // Guests should not have any labs features enabled.
-            return {enabled: false};
+            return false;
         }
 
         const value = localStorage.getItem("mx_labs_feature_" + featureName);

From 76144b964aa1d8b7f8e64fe4c138620eae80dec3 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Fri, 6 Apr 2018 14:58:10 +0100
Subject: [PATCH 18/40] Update to match is_openly_joinable API

---
 src/components/structures/GroupView.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index ac6e89d407..8a5d3d2025 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -550,7 +550,10 @@ export default React.createClass({
             editing: true,
             profileForm: Object.assign({}, this.state.summary.profile),
             joinableForm: {
-                policyType: this.state.summary.profile.join_policy,
+                policyType:
+                    this.state.summary.profile.is_openly_joinable ?
+                        GROUP_JOINPOLICY_OPEN :
+                        GROUP_JOINPOLICY_INVITE,
             },
         });
         dis.dispatch({

From 84635b715c2b8a1f3d915c6e1ae2891b1777ea23 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 15:31:52 +0100
Subject: [PATCH 19/40] Bump matrix-js-sdk to rc.2

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 6b74c7eed6..8b4020babc 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
     "isomorphic-fetch": "^2.2.1",
     "linkifyjs": "^2.1.3",
     "lodash": "^4.13.1",
-    "matrix-js-sdk": "0.10.0-rc.1",
+    "matrix-js-sdk": "0.10.0-rc.2",
     "optimist": "^0.6.1",
     "prop-types": "^15.5.8",
     "querystring": "^0.2.0",

From 39cda801432f6e11623ca737effbde0c1ca56704 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 15:41:01 +0100
Subject: [PATCH 20/40] Prepare changelog for v0.12.0-rc.5

---
 CHANGELOG.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 36709caf62..1beb4f5876 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+Changes in [0.12.0-rc.5](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.5) (2018-04-09)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.4...v0.12.0-rc.5)
+
+ * Added radio button to set group join policy
+ * Fix to prevent guests from accessing lab features
+ * Fix broken forgot password page
+ * Fix crash when joining a room after peeking
+
 Changes in [0.12.0-rc.4](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.4) (2018-03-22)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.3...v0.12.0-rc.4)

From 9bab958a975f50a578b4bda9f460992e3e7ac451 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 15:41:02 +0100
Subject: [PATCH 21/40] v0.12.0-rc.5

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 8b4020babc..5fff12160a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.4",
+  "version": "0.12.0-rc.5",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From 18fcb1d6a628b78c3f18cabed5cfb2a2c4972164 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 29 Mar 2018 12:36:59 +0100
Subject: [PATCH 22/40] Implement "Join this community" button

for groups that have truthy summary.profile.is_joinable.
---
 src/components/structures/GroupView.js | 108 ++++++++++++++++++-------
 1 file changed, 80 insertions(+), 28 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 8a5d3d2025..14c6b4a0be 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -691,6 +691,20 @@ export default React.createClass({
         });
     },
 
+    _onJoinClick: function() {
+        this.setState({membershipBusy: true});
+        this._matrixClient.joinGroup(this.props.groupId).then(() => {
+            // don't reset membershipBusy here: wait for the membership change to come down the sync
+        }).catch((e) => {
+            this.setState({membershipBusy: false});
+            const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
+            Modal.createTrackedDialog('Error joining room', '', ErrorDialog, {
+                title: _t("Error"),
+                description: _t("Unable to join community"),
+            });
+        });
+    },
+
     _onLeaveClick: function() {
         const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
         Modal.createTrackedDialog('Leave Group', '', QuestionDialog, {
@@ -707,9 +721,9 @@ export default React.createClass({
                 }).catch((e) => {
                     this.setState({membershipBusy: false});
                     const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
-                    Modal.createTrackedDialog('Error leaving room', '', ErrorDialog, {
+                    Modal.createTrackedDialog('Error leaving community', '', ErrorDialog, {
                         title: _t("Error"),
-                        description: _t("Unable to leave room"),
+                        description: _t("Unable to leave community"),
                     });
                 });
             },
@@ -875,9 +889,8 @@ export default React.createClass({
         const BaseAvatar = sdk.getComponent("avatars.BaseAvatar");
 
         const group = this._matrixClient.getGroup(this.props.groupId);
-        if (!group) return null;
 
-        if (group.myMembership === 'invite') {
+        if (group && group.myMembership === 'invite') {
             if (this.state.membershipBusy || this.state.inviterProfileBusy) {
                 return <div className="mx_GroupView_membershipSection">
                     <Spinner />
@@ -918,33 +931,72 @@ export default React.createClass({
                     </div>
                 </div>
             </div>;
-        } else if (group.myMembership === 'join' && this.state.editing) {
-            const leaveButtonTooltip = this.state.isUserPrivileged ?
+        }
+
+        let membershipContainerExtraClasses;
+        let membershipButtonExtraClasses;
+        let membershipButtonTooltip;
+        let membershipButtonText;
+        let membershipButtonOnClick;
+
+        // User is not in the group
+        if ((!group || group.myMembership === 'leave') &&
+            this.state.summary &&
+            this.state.summary.profile &&
+            Boolean(this.state.summary.profile.is_joinable)
+        ) {
+            membershipButtonText = _t("Join this community");
+            membershipButtonOnClick = this._onJoinClick;
+
+            membershipButtonExtraClasses = 'mx_GroupView_joinButton';
+            membershipContainerExtraClasses = 'mx_GroupView_membershipSection_leave';
+        } else if (
+            group &&
+            group.myMembership === 'join' &&
+            this.state.editing
+        ) {
+            membershipButtonText = _t("Leave this community");
+            membershipButtonOnClick = this._onLeaveClick;
+            membershipButtonTooltip = this.state.isUserPrivileged ?
                 _t("You are an administrator of this community") :
                 _t("You are a member of this community");
-            const leaveButtonClasses = classnames({
-                "mx_RoomHeader_textButton": true,
-                "mx_GroupView_textButton": true,
-                "mx_GroupView_leaveButton": true,
-                "mx_RoomHeader_textButton_danger": this.state.isUserPrivileged,
-            });
-            return <div className="mx_GroupView_membershipSection mx_GroupView_membershipSection_joined">
-                <div className="mx_GroupView_membershipSubSection">
-                    { /* Empty div for flex alignment */ }
-                    <div />
-                    <div className="mx_GroupView_membership_buttonContainer">
-                        <AccessibleButton
-                            className={leaveButtonClasses}
-                            onClick={this._onLeaveClick}
-                            title={leaveButtonTooltip}
-                        >
-                            { _t("Leave") }
-                        </AccessibleButton>
-                    </div>
-                </div>
-            </div>;
+
+            membershipButtonExtraClasses = {
+                'mx_GroupView_leaveButton': true,
+                'mx_RoomHeader_textButton_danger': this.state.isUserPrivileged,
+            };
+            membershipContainerExtraClasses = 'mx_GroupView_membershipSection_joined';
+        } else {
+            return null;
         }
-        return null;
+
+        const membershipButtonClasses = classnames([
+            'mx_RoomHeader_textButton',
+            'mx_GroupView_textButton',
+        ],
+            membershipButtonExtraClasses,
+        );
+
+        const membershipContainerClasses = classnames(
+            'mx_GroupView_membershipSection',
+            membershipContainerExtraClasses,
+        );
+
+        return <div className={membershipContainerClasses}>
+            <div className="mx_GroupView_membershipSubSection">
+                { /* Empty div for flex alignment */ }
+                <div />
+                <div className="mx_GroupView_membership_buttonContainer">
+                    <AccessibleButton
+                        className={membershipButtonClasses}
+                        onClick={membershipButtonOnClick}
+                        title={membershipButtonTooltip}
+                    >
+                        { membershipButtonText }
+                    </AccessibleButton>
+                </div>
+            </div>
+        </div>;
     },
 
     _getJoinableNode: function() {

From 560da03a9f36ac815cbce43a8c99c8a1f1891f5b Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 29 Mar 2018 12:39:21 +0100
Subject: [PATCH 23/40] run gen-i18n

---
 src/i18n/strings/en_EN.json | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 3d522603ea..7d213d73a8 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -186,7 +186,6 @@
     "Message Replies": "Message Replies",
     "Message Pinning": "Message Pinning",
     "Presence Management": "Presence Management",
-    "Tag Panel": "Tag Panel",
     "Disable Emoji suggestions while typing": "Disable Emoji suggestions while typing",
     "Use compact timeline layout": "Use compact timeline layout",
     "Hide removed messages": "Hide removed messages",
@@ -761,10 +760,11 @@
     "Failed to update community": "Failed to update community",
     "Unable to accept invite": "Unable to accept invite",
     "Unable to reject invite": "Unable to reject invite",
+    "Unable to join community": "Unable to join community",
     "Leave Community": "Leave Community",
     "Leave %(groupName)s?": "Leave %(groupName)s?",
     "Leave": "Leave",
-    "Unable to leave room": "Unable to leave room",
+    "Unable to leave community": "Unable to leave community",
     "Community Settings": "Community Settings",
     "Changes made to your community might not be seen by other users for up to 30 minutes.": "Changes made to your community might not be seen by other users for up to 30 minutes.",
     "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.": "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.",
@@ -772,10 +772,12 @@
     "Featured Rooms:": "Featured Rooms:",
     "Featured Users:": "Featured Users:",
     "%(inviter)s has invited you to join this community": "%(inviter)s has invited you to join this community",
+    "Join this community": "Join this community",
     "You are an administrator of this community": "You are an administrator of this community",
     "You are a member of this community": "You are a member of this community",
     "Who can join this community?": "Who can join this community?",
     "Everyone": "Everyone",
+    "Leave this community": "Leave this community",
     "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!": "Your community hasn't got a Long Description, a HTML page to show to community members.<br />Click here to open settings and give it one!",
     "Long Description (HTML)": "Long Description (HTML)",
     "Description": "Description",

From ef104b762e0772a9604e3e5a74c62d671d219ba4 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 16:57:27 +0100
Subject: [PATCH 24/40] Update group join button to match new API

---
 src/components/structures/GroupView.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 14c6b4a0be..9352760914 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -943,7 +943,7 @@ export default React.createClass({
         if ((!group || group.myMembership === 'leave') &&
             this.state.summary &&
             this.state.summary.profile &&
-            Boolean(this.state.summary.profile.is_joinable)
+            Boolean(this.state.summary.profile.is_openly_joinable)
         ) {
             membershipButtonText = _t("Join this community");
             membershipButtonOnClick = this._onJoinClick;

From 0f9fd3296248299518a27b2cfad3eca6f33df80b Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 17:10:02 +0100
Subject: [PATCH 25/40] Prepare changelog for v0.12.0-rc.6

---
 CHANGELOG.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1beb4f5876..cfd32e5200 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+Changes in [0.12.0-rc.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.6) (2018-04-09)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.5...v0.12.0-rc.6)
+
+ * Fix group join button not appearing
+
 Changes in [0.12.0-rc.5](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.5) (2018-04-09)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.4...v0.12.0-rc.5)

From d02dced2463bf2f26b15e9485e851865b386ce6c Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Mon, 9 Apr 2018 17:10:03 +0100
Subject: [PATCH 26/40] v0.12.0-rc.6

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 5fff12160a..af5710b1f0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.5",
+  "version": "0.12.0-rc.6",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From 6f10b5a410e083c1560f704436c7a8ca8317ba20 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 10:03:54 +0100
Subject: [PATCH 27/40] Fetch group data when leaving or joining to update the
 view

---
 src/components/structures/GroupView.js |  7 ++++---
 src/stores/GroupStore.js               | 24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 9352760914..4b8ac70336 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -679,7 +679,7 @@ export default React.createClass({
 
     _onRejectInviteClick: function() {
         this.setState({membershipBusy: true});
-        this._matrixClient.leaveGroup(this.props.groupId).then(() => {
+        this._groupStore.leaveGroup().then(() => {
             // don't reset membershipBusy here: wait for the membership change to come down the sync
         }).catch((e) => {
             this.setState({membershipBusy: false});
@@ -693,7 +693,8 @@ export default React.createClass({
 
     _onJoinClick: function() {
         this.setState({membershipBusy: true});
-        this._matrixClient.joinGroup(this.props.groupId).then(() => {
+
+        this._groupStore.joinGroup().then(() => {
             // don't reset membershipBusy here: wait for the membership change to come down the sync
         }).catch((e) => {
             this.setState({membershipBusy: false});
@@ -716,7 +717,7 @@ export default React.createClass({
                 if (!confirmed) return;
 
                 this.setState({membershipBusy: true});
-                this._matrixClient.leaveGroup(this.props.groupId).then(() => {
+                this._groupStore.leaveGroup().then(() => {
                     // don't reset membershipBusy here: wait for the membership change to come down the sync
                 }).catch((e) => {
                     this.setState({membershipBusy: false});
diff --git a/src/stores/GroupStore.js b/src/stores/GroupStore.js
index 2ea69b61aa..d4f0b09ff9 100644
--- a/src/stores/GroupStore.js
+++ b/src/stores/GroupStore.js
@@ -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)

From 1da56d9e980dadaa85dc6f3a4717ad5d5682fefc Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 11:49:35 +0100
Subject: [PATCH 28/40] Hide settings after leaving a group

---
 src/components/structures/GroupView.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 4b8ac70336..91fa378f33 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -467,6 +467,10 @@ export default React.createClass({
     _onGroupMyMembership: function(group) {
         if (group.groupId !== this.props.groupId) return;
 
+        if (group.myMembership === 'leave') {
+            // Leave settings - the user might have clicked the "Leave" button
+            this._onCancelClick();
+        }
         this.setState({membershipBusy: false});
     },
 

From 9e6841df09fade330111e040503e07d9fce540af Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 11:49:59 +0100
Subject: [PATCH 29/40] Show membership spinner next to Leave/Join button when
 leaving/joining

---
 src/components/structures/GroupView.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 91fa378f33..47c6ab57ca 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -989,8 +989,8 @@ export default React.createClass({
 
         return <div className={membershipContainerClasses}>
             <div className="mx_GroupView_membershipSubSection">
-                { /* Empty div for flex alignment */ }
-                <div />
+                { /* The <div /> is for flex alignment */ }
+                { this.state.membershipBusy ? <Spinner /> : <div /> }
                 <div className="mx_GroupView_membership_buttonContainer">
                     <AccessibleButton
                         className={membershipButtonClasses}

From e616dbac3390ff7f8e0bf4d3d6a8c26edd7a139b Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 13:28:42 +0100
Subject: [PATCH 30/40] Factor out `_closeSettings` for cleanliness

---
 src/components/structures/GroupView.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 47c6ab57ca..5ef627034c 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -469,7 +469,7 @@ export default React.createClass({
 
         if (group.myMembership === 'leave') {
             // Leave settings - the user might have clicked the "Leave" button
-            this._onCancelClick();
+            this._closeSettings();
         }
         this.setState({membershipBusy: false});
     },
@@ -567,6 +567,10 @@ export default React.createClass({
     },
 
     _onCancelClick: function() {
+        this._closeSettings();
+    },
+
+    _closeSettings() {
         this.setState({
             editing: false,
             profileForm: null,

From f72103894268432386562dc08a1d1221adeacc3b Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Thu, 29 Mar 2018 14:33:54 +0100
Subject: [PATCH 31/40] Reword group setting delay

---
 src/components/structures/GroupView.js | 10 ++++++++--
 src/i18n/strings/en_EN.json            |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 5ef627034c..353c0a8694 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -752,8 +752,14 @@ export default React.createClass({
         const header = this.state.editing ? <h2> { _t('Community Settings') } </h2> : <div />;
         const changeDelayWarning = this.state.editing && this.state.isUserPrivileged ?
             <div className="mx_GroupView_changeDelayWarning">
-                { _t( 'Changes made to your community might not be seen by other users ' +
-                      'for up to 30 minutes.',
+                { _t(
+                    'Changes made to your community <bold1>name</bold1> and <bold2>avatar</bold2> ' +
+                    'might not be seen by other users for up to 30 minutes.',
+                    {},
+                    {
+                        'bold1': (sub) => <b> { sub } </b>,
+                        'bold2': (sub) => <b> { sub } </b>,
+                    },
                 ) }
             </div> : <div />;
         return <div className={groupSettingsSectionClasses}>
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 7d213d73a8..84a65fa3cf 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -766,7 +766,7 @@
     "Leave": "Leave",
     "Unable to leave community": "Unable to leave community",
     "Community Settings": "Community Settings",
-    "Changes made to your community might not be seen by other users for up to 30 minutes.": "Changes made to your community might not be seen by other users for up to 30 minutes.",
+    "Changes made to your community <bold1>name</bold1> and <bold2>avatar</bold2> might not be seen by other users for up to 30 minutes.": "Changes made to your community <bold1>name</bold1> and <bold2>avatar</bold2> might not be seen by other users for up to 30 minutes.",
     "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.": "These rooms are displayed to community members on the community page. Community members can join the rooms by clicking on them.",
     "Add rooms to this community": "Add rooms to this community",
     "Featured Rooms:": "Featured Rooms:",

From b4ea03f823305e2f0946c498c5d93029aafdcb57 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 14:27:38 +0100
Subject: [PATCH 32/40] Prepare changelog for v0.12.0-rc.7

---
 CHANGELOG.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index cfd32e5200..a9364b5820 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,12 @@
+Changes in [0.12.0-rc.7](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.7) (2018-04-10)
+===============================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.6...v0.12.0-rc.7)
+
+ * Reword group setting delay
+  [\#1816](https://github.com/matrix-org/matrix-react-sdk/pull/1816)
+ * Improve group joining/leaving feedback
+  [\#1831](https://github.com/matrix-org/matrix-react-sdk/pull/1831)
+ 
 Changes in [0.12.0-rc.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.6) (2018-04-09)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.5...v0.12.0-rc.6)

From f2e60b1526e44b577c55cbdc838b7af5a4f0df66 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 14:27:38 +0100
Subject: [PATCH 33/40] v0.12.0-rc.7

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index af5710b1f0..44dc934556 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.6",
+  "version": "0.12.0-rc.7",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {

From b0818df329d9ea86af2048a75c81955b2324bf06 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 15:31:04 +0100
Subject: [PATCH 34/40] Add 500ms delay to show `membershipBusy` for longer

to avoid a UI that flashes quickly
---
 src/components/structures/GroupView.js | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 353c0a8694..1c1009d6fa 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -671,8 +671,12 @@ export default React.createClass({
         });
     },
 
-    _onAcceptInviteClick: function() {
+    _onAcceptInviteClick: async function() {
         this.setState({membershipBusy: true});
+
+        // Wait 500ms to prevent flashing
+        await Promise.delay(500);
+
         this._groupStore.acceptGroupInvite().then(() => {
             // don't reset membershipBusy here: wait for the membership change to come down the sync
         }).catch((e) => {
@@ -685,8 +689,12 @@ export default React.createClass({
         });
     },
 
-    _onRejectInviteClick: function() {
+    _onRejectInviteClick: async function() {
         this.setState({membershipBusy: true});
+
+        // Wait 500ms to prevent flashing
+        await Promise.delay(500);
+
         this._groupStore.leaveGroup().then(() => {
             // don't reset membershipBusy here: wait for the membership change to come down the sync
         }).catch((e) => {
@@ -699,9 +707,12 @@ export default React.createClass({
         });
     },
 
-    _onJoinClick: function() {
+    _onJoinClick: async function() {
         this.setState({membershipBusy: true});
 
+        // Wait 500ms to prevent flashing
+        await Promise.delay(500);
+
         this._groupStore.joinGroup().then(() => {
             // don't reset membershipBusy here: wait for the membership change to come down the sync
         }).catch((e) => {
@@ -721,10 +732,14 @@ export default React.createClass({
             description: _t("Leave %(groupName)s?", {groupName: this.props.groupId}),
             button: _t("Leave"),
             danger: true,
-            onFinished: (confirmed) => {
+            onFinished: async (confirmed) => {
                 if (!confirmed) return;
 
                 this.setState({membershipBusy: true});
+
+                // Wait 500ms to prevent flashing
+                await Promise.delay(500);
+
                 this._groupStore.leaveGroup().then(() => {
                     // don't reset membershipBusy here: wait for the membership change to come down the sync
                 }).catch((e) => {

From 98c76a891c9beadf8135815b5abdf417078a2ebe Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 15:56:57 +0100
Subject: [PATCH 35/40] Change comments

---
 src/components/structures/GroupView.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js
index 1c1009d6fa..2884484419 100644
--- a/src/components/structures/GroupView.js
+++ b/src/components/structures/GroupView.js
@@ -674,7 +674,8 @@ export default React.createClass({
     _onAcceptInviteClick: async function() {
         this.setState({membershipBusy: true});
 
-        // Wait 500ms to prevent flashing
+        // Wait 500ms to prevent flashing. Do this before sending a request otherwise we risk the
+        // spinner disappearing after we have fetched new group data.
         await Promise.delay(500);
 
         this._groupStore.acceptGroupInvite().then(() => {
@@ -692,7 +693,8 @@ export default React.createClass({
     _onRejectInviteClick: async function() {
         this.setState({membershipBusy: true});
 
-        // Wait 500ms to prevent flashing
+        // Wait 500ms to prevent flashing. Do this before sending a request otherwise we risk the
+        // spinner disappearing after we have fetched new group data.
         await Promise.delay(500);
 
         this._groupStore.leaveGroup().then(() => {
@@ -710,7 +712,8 @@ export default React.createClass({
     _onJoinClick: async function() {
         this.setState({membershipBusy: true});
 
-        // Wait 500ms to prevent flashing
+        // Wait 500ms to prevent flashing. Do this before sending a request otherwise we risk the
+        // spinner disappearing after we have fetched new group data.
         await Promise.delay(500);
 
         this._groupStore.joinGroup().then(() => {
@@ -737,7 +740,8 @@ export default React.createClass({
 
                 this.setState({membershipBusy: true});
 
-                // Wait 500ms to prevent flashing
+                // Wait 500ms to prevent flashing. Do this before sending a request otherwise we risk the
+                // spinner disappearing after we have fetched new group data.
                 await Promise.delay(500);
 
                 this._groupStore.leaveGroup().then(() => {

From 3b5fb3ae3015b1bae0bf483f4360222392ad419b Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Tue, 10 Apr 2018 18:08:19 +0100
Subject: [PATCH 36/40] Use GeminiScrollbarWrapper in Flair settings of
 UserSettings

---
 src/components/views/groups/GroupUserSettings.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/views/groups/GroupUserSettings.js b/src/components/views/groups/GroupUserSettings.js
index 755d6aae8f..0405d411d2 100644
--- a/src/components/views/groups/GroupUserSettings.js
+++ b/src/components/views/groups/GroupUserSettings.js
@@ -16,7 +16,6 @@ limitations under the License.
 
 import React from 'react';
 import PropTypes from 'prop-types';
-import GeminiScrollbar from 'react-gemini-scrollbar';
 import sdk from '../../../index';
 import { MatrixClient } from 'matrix-js-sdk';
 import { _t } from '../../../languageHandler';
@@ -55,14 +54,15 @@ export default React.createClass({
             text = _t('Loading...');
         } else if (groups.length > 0) {
             const GroupPublicityToggle = sdk.getComponent('groups.GroupPublicityToggle');
+            const GeminiScrollbarWrapper = sdk.getComponent('elements.GeminiScrollbarWrapper');
             const groupPublicityToggles = groups.map((groupId, index) => {
                 return <GroupPublicityToggle key={index} groupId={groupId} />;
             });
             text = _t('Display your community flair in rooms configured to show it.');
             scrollbox = <div className="mx_GroupUserSettings_groupPublicity_scrollbox">
-                <GeminiScrollbar>
+                <GeminiScrollbarWrapper>
                     { groupPublicityToggles }
-                </GeminiScrollbar>
+                </GeminiScrollbarWrapper>
             </div>;
         } else {
             text = _t("You're not currently a member of any communities.");

From 8b2446f80397532d14ffb1e3aa9a2abe8956f1f1 Mon Sep 17 00:00:00 2001
From: Matthew Hodgson <matthew@matrix.org>
Date: Mon, 9 Apr 2018 23:02:59 +0100
Subject: [PATCH 37/40] rename createGroupButton to not be a total misnomer...

---
 src/components/structures/TagPanel.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/components/structures/TagPanel.js b/src/components/structures/TagPanel.js
index 7a187e4298..03d4b8f027 100644
--- a/src/components/structures/TagPanel.js
+++ b/src/components/structures/TagPanel.js
@@ -147,7 +147,7 @@ const TagPanel = React.createClass({
                 </Droppable>
             </GeminiScrollbar>
             <div className="mx_TagPanel_divider" />
-            <div className="mx_TagPanel_createGroupButton">
+            <div className="mx_TagPanel_groupsButton">
                 <GroupsButton tooltip={true} />
             </div>
         </div>;

From a142f4405a1340c42d2ee98231893485d0695925 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Wed, 11 Apr 2018 10:41:11 +0100
Subject: [PATCH 38/40] Revert "Use GeminiScrollbarWrapper in Flair settings of
 UserSettings"

This reverts commit 3b5fb3ae3015b1bae0bf483f4360222392ad419b.
---
 src/components/views/groups/GroupUserSettings.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/components/views/groups/GroupUserSettings.js b/src/components/views/groups/GroupUserSettings.js
index 0405d411d2..755d6aae8f 100644
--- a/src/components/views/groups/GroupUserSettings.js
+++ b/src/components/views/groups/GroupUserSettings.js
@@ -16,6 +16,7 @@ limitations under the License.
 
 import React from 'react';
 import PropTypes from 'prop-types';
+import GeminiScrollbar from 'react-gemini-scrollbar';
 import sdk from '../../../index';
 import { MatrixClient } from 'matrix-js-sdk';
 import { _t } from '../../../languageHandler';
@@ -54,15 +55,14 @@ export default React.createClass({
             text = _t('Loading...');
         } else if (groups.length > 0) {
             const GroupPublicityToggle = sdk.getComponent('groups.GroupPublicityToggle');
-            const GeminiScrollbarWrapper = sdk.getComponent('elements.GeminiScrollbarWrapper');
             const groupPublicityToggles = groups.map((groupId, index) => {
                 return <GroupPublicityToggle key={index} groupId={groupId} />;
             });
             text = _t('Display your community flair in rooms configured to show it.');
             scrollbox = <div className="mx_GroupUserSettings_groupPublicity_scrollbox">
-                <GeminiScrollbarWrapper>
+                <GeminiScrollbar>
                     { groupPublicityToggles }
-                </GeminiScrollbarWrapper>
+                </GeminiScrollbar>
             </div>;
         } else {
             text = _t("You're not currently a member of any communities.");

From f4d3e6fabfebd8acb935ac05f1bdcdb7fb8abcb4 Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Wed, 11 Apr 2018 11:31:30 +0100
Subject: [PATCH 39/40] Prepare changelog for v0.12.0

---
 CHANGELOG.md | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9364b5820..3f08fddee5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+Changes in [0.12.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0) (2018-04-11)
+=====================================================================================================
+[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.7...v0.12.0)
+
+ * Further improve group joining/leaving feedback
+  [\#1832](https://github.com/matrix-org/matrix-react-sdk/pull/1832)
+ * Cosmetic changes to Communities button
+
 Changes in [0.12.0-rc.7](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.12.0-rc.7) (2018-04-10)
 ===============================================================================================================
 [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.12.0-rc.6...v0.12.0-rc.7)

From 87d0c4b45a5a25f3db8ea4cd898ed8e2400926aa Mon Sep 17 00:00:00 2001
From: Luke Barnard <luke@matrix.org>
Date: Wed, 11 Apr 2018 11:31:31 +0100
Subject: [PATCH 40/40] v0.12.0

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 44dc934556..8483adb56d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "matrix-react-sdk",
-  "version": "0.12.0-rc.7",
+  "version": "0.12.0",
   "description": "SDK for matrix.org using React",
   "author": "matrix.org",
   "repository": {