Commit Graph

70 Commits (4c56b45a9f1a85d348a053a77560ff7438ba2764)

Author SHA1 Message Date
Bastian 951f0fc816 Fix error if topicEvents is undefined
Signed-off-by: Bastian <matrix@noxware.de>
2019-02-06 20:10:56 +01:00
Bastian aa0ae88076 Replace QuestionDialog with InfoDialog
Signed-off-by: Bastian <matrix@noxware.de>
2019-02-06 19:43:59 +01:00
Bastian 23971b3d0d Refactor to use HtmlUtils for linkifying and sanitizing
Signed-off-by: Bastian <matrix@noxware.de>
2019-01-31 22:36:08 +01:00
Bastian 8273662500 Replace QuestionDialog with InfoDialog
Display a default message if no room topic is present

Signed-off-by: Bastian <matrix@noxware.de>
2019-01-31 18:00:37 +01:00
Bastian 135af401f7 Merge branch 'develop' into boeserwolf/get-set-topic 2019-01-30 14:21:58 +01:00
Bastian bc6d13e768 Extend slash command '/topic' to display the room topic
If no <topic> is provided, the command will display a modal dialog containing
the sanitized and linkified room topic. This is just adding some juice to make
reading long room topics more convenient.
2019-01-30 12:18:54 +01:00
Travis Ralston 9b6ef8af72 Add an /upgraderoom command to make upgrading easier for development 2019-01-17 15:59:05 -07:00
Christopher Medlin e102000e58 Change to 'roomname' instead of 'name'. 2019-01-04 11:29:51 -08:00
Christopher Medlin c89b6e1e27 Add slash command for changing room name
Signed-off-by: Christopher Medlin <christopherjmedlin@protonmail.com>
2019-01-03 15:42:17 -08:00
Travis Ralston 84b568a235 Appease the linter 2018-11-29 15:16:45 -07:00
Travis Ralston 987ad0b0db Check if users exist before inviting them and communicate errors
Fixes https://github.com/vector-im/riot-web/issues/3283
Fixes https://github.com/vector-im/riot-web/issues/3968
Fixes https://github.com/vector-im/riot-web/issues/4308
Fixes https://github.com/vector-im/riot-web/issues/1597
Fixes https://github.com/vector-im/riot-web/issues/6790

This does 3 things:
* Makes the `MultiInviter` check for a user profile before attempting an invite. This is to prove the user exists.
* Use the `MultiInviter` everywhere to avoid duplicating the logic. Although a couple places only invite one user, it is still worthwhile.
* Communicate errors from the `MultiInviter` to the user in all cases. This is done through dialogs, where some existed previously but were not invoked.

Specifically to the 403 error not working: What was happening was the `MultiInviter` loop was setting the `fatal` flag, but that didn't resolve the promise it stored. This caused a promise to always be open, therefore never hitting a dialog.
2018-11-29 15:05:53 -07:00
Travis Ralston 5d804e1e57 Appease the linter 2018-11-07 17:01:47 -07:00
Travis Ralston 88bfe6fc39 debugging--; 2018-11-07 16:59:24 -07:00
Travis Ralston 9017635c79 Support room IDs and event permalinks in the join command
Mostly useful for power users who want to jump to places more easily.

Examples:
* `/join !somewhere:example.org`
* `/join !somewhere:example.org altserver.com` - to join through `altserver.com`
* `/goto https://matrix.to/#/!somewhere:example.org/$something:example.org?via=altserver.com`

Fixes https://github.com/vector-im/riot-web/issues/3248
Fixes https://github.com/vector-im/riot-web/issues/7543
2018-11-07 16:53:29 -07:00
David Baker 63938a3f9f Slash command to discard megolm session
For faster crypto debugging

Requires https://github.com/matrix-org/matrix-js-sdk/pull/704
2018-08-29 18:09:37 +01:00
David Baker 3c895e5a0d
Merge pull request #2074 from matrix-org/t3chguy/hide_ddg_me_after_space
hide some commands after space as they have special semantics
2018-07-19 13:51:05 +01:00
Michael Telatynski 5867fe73dd
hide some commands after space as they have special semantics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 15:38:21 +01:00
Matthew Hodgson efdc5430d7 merge develop 2018-07-09 17:50:07 +01:00
Michael Telatynski f5b12bd66a
slash got consumed in the consolidation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-20 17:09:49 +01:00
Michael Telatynski 85ddc0651b
consolidate the two locations commands are defined, as it was a MESS
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-06-18 19:34:40 +01:00
Matthew Hodgson 79f7c5d6ab remove // support, as it never worked
if you want to escape a /, do it with \/ or just precede with a space
2018-05-13 03:29:56 +01:00
David Baker 350dab06a0
Merge pull request #1675 from turt2live/travis/fix-granular-again
Fix a couple more issues with granular settings
2018-01-05 11:48:32 +00:00
Travis Ralston e8392dfa00 Have /tint use the primary color as the secondary if no secondary was given
This is to make the color scheme actually apply itself now that the secondary color is not optional. In order to preserve it being optional in the command, we'll use the primary color as the secondary color as it has no major visual impact.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-12-25 13:39:32 -07:00
Michael Telatynski ab347c82f7
Allow argument to op slashcommand to be negative as PLs can be -ve
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-12-21 12:23:48 +00:00
Travis Ralston 50807d498a Use settings in slash commands too
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-11-05 13:06:55 -07:00
Luke Barnard 6b9a2909df Add rule to enforce spacing in curly brackets in JSX children
This required an updated in version of eslint-plugin-react to 7.4.0.
2017-09-28 11:21:06 +01:00
Matthew Hodgson 678a6c56b4 Merge pull request #1268 from matrix-org/t3chguy/devtools
add /devtools command
2017-09-17 23:16:04 +01:00
Matthew Hodgson 9e77d1b763 tweak comment 2017-09-17 21:50:24 +01:00
Travis Ralston 13a251e29c Give feedback for /ignore and /unignore
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-09-14 16:21:36 -06:00
Travis Ralston 2d517079d9 Add unresponsive /ignore and /unignore commands
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-09-14 16:08:51 -06:00
Michael Telatynski b75ae63956
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/devtools 2017-08-10 16:10:20 +01:00
Michael Telatynski 79b83e60ab
add /devtools command 2017-07-31 12:08:28 +01:00
Michael Telatynski bf98c0da7c
un-i18n Modal Analytics
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-27 17:19:18 +01:00
Richard van der Hoff 4998d1b359 Prepare for asynchronous e2e APIs
the js-sdk is making some of its APIs asynchronous, and adding an `initCrypto`
method which you have to call.

Particular methods we need to worry about are:

* `getStoredDevice`
* `getStoredDevicesForUser`
* `getEventSenderDeviceInfo`
* `isEventSenderVerified`
2017-07-18 23:47:36 +01:00
Michael Telatynski e56203f2a1
de-lint RoomHeader, Avatar, SdkConfig, SlashCommands
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-07-01 14:13:32 +01:00
Kegan Dougal 547f10bcbb Add translations for slash command failures 2017-06-01 15:44:56 +01:00
Michael Telatynski 3ecd9964ec fix vector-im/riot-web#4059 - missed it in code review :(
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-28 20:24:33 +01:00
David Baker 43d8ccf128 Hopefully sort out strings with appended '.'s 2017-05-25 19:21:18 +01:00
David Baker 443ab1add7 Put back default strings on dialogs
But make them work by calling _t in render rather than
getDefaultProps().

Also sort out some 'Warning!' strings
2017-05-25 18:20:48 +01:00
David Baker 5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
David Baker d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
Richard van der Hoff 5df4b9de16 Fix lint errors in SlashCommands 2017-05-23 09:44:11 +01:00
Richard van der Hoff 26c8540d03 Add in a "verify" slash command to confirm signing keys (#912)
Allows users to send a text string via an alternative channel (like email
or SMS) which Riot can leverage to confirm that the signing keys match.

Effectively removes the tedium of checking keys until a better mechanism
is completed.

Signed-off-by: Kit Sczudlo <kit@kitscz.com>
2017-05-23 09:24:18 +01:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Aviral Dasgupta 6befb09509 Replace <p>s with <br/>s consistently
Also, allow newlines in /commands.
Fixes vector-im/vector-web#2114, vector-im/vector-web#2165.
2016-09-16 21:40:00 +05:30
Aviral Dasgupta b62622a814 Improve autocomplete behaviour
Fixes vector-im/vector-web#1761
2016-09-13 15:46:02 +05:30
David Baker df1cc8748f Change references to MatrixTools to Rooms
or remove where they were unused
2016-09-07 11:33:58 +01:00
Richard van der Hoff 6283b200fb Remove /encrypt command
Now that we have the room setting to enable encryption, the /encrypt command is
not only redundant, but confusing, since it's in conflict with the room
setting.
2016-06-23 13:21:55 +01:00
David Baker d8dedae084 Fix /join to be consistent with the other code
Plus a number of other tidyups:

 * Fix /join to dispatch a view_room for the room alias
   with the additional auto_join parameter
 * Make RoomView automatically join the room if the auto_join
   parameter is true and the user isn't already in it
 * Tidy up RoomView's peeking code, also fixing
   https://github.com/vector-im/vector-web/issues/1220
   in react-sdk (although it still requires a synapse change
   to actually fix, but react-sdk does 'the right thing').
 * Remove duplication of usage text from /join command
 * Amalgamate MatrixChat::_viewRoom's many, many parameters
   into an object and sort out case consistency a little.
2016-06-20 16:30:51 +01:00
Matthew Hodgson 07cc9bf77d how ironic 2016-05-24 11:44:30 +01:00