Commit graph

31 commits

Author SHA1 Message Date
Bruno Windels
558ae1128b use alt_aliases rather than aliases for the display alias 2020-02-21 13:02:35 +01:00
Travis Ralston
042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Michael Telatynski
d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
David Baker
4248a20885 Fix settings direct chat
We were expecting this function to return a string user ID, but it
returned a user object

Make it return a user ID and add jsdoc to say what it returns.

Fixes https://github.com/vector-im/riot-web/issues/8180
2019-01-21 16:05:24 +00:00
Aaron Raimist
49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Matthew Hodgson
c410a737d9 fix NPE: apparently otherMember can be undefined as well as null on LL 2018-08-17 12:23:58 +02:00
Bruno Windels
440ebd187d getMyMembership() doesn't take id anymore 2018-08-14 11:47:05 +02:00
Bruno Windels
c8b6ccba25 fallback to room summary for dm detection 2018-08-14 11:43:03 +02:00
Bruno Windels
d87d34030a fix dm detection and conf call code with lazy loading 2018-07-25 16:10:49 +02:00
Bruno Windels
af77f0206a don't assume a member has events associated 2018-07-25 16:10:49 +02:00
Bruno Windels
8529bc55e3 use helper method for knowing whether a user was kicked
mainly for readability, but also to discourage grabbing into the member
because of lazy loading changes
2018-07-25 16:10:49 +02:00
lukebarnard
8509db1bda Cache isConfCallRoom
This only needs to be calculated one per room
2018-01-05 14:53:04 +00:00
Luke Barnard
d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
Richard van der Hoff
0254d2b3a2 q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff
a06bd84213 replace imports of q with bluebird
update `package.json`

```
find src test -name '*.js' |
   xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
   xargs perl -i -pe 'if (/import [qQ]/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 18:05:08 +01:00
David Baker
5fd45233fb DM guessing: prefer oldest joined member
In the DM guessing code, prefer the oldest joined member if there's
anyone in the rom other than us. Otherwise, fall back to the old
behaviour.

Fixes https://github.com/vector-im/riot-web/issues/4288
2017-06-13 17:35:09 +01:00
Michael Telatynski
464863acd6 remove unused imports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 21:35:55 +01:00
Luke Barnard
975a2db3e4 UI delay done in UI 2017-03-27 09:42:04 +01:00
Luke Barnard
7ecabe49d2 Fix people section DropTarget and refactor Rooms
- Set the verb for the people section to "tag as direct chat". This requires some CSS modifications to Riot because it's a long bit of text relative to, say, "demote".
 - Because it's quite useful to be able to set the DM status of a room with just a boolean, add a convenience function for guessing a DM member and setting the DM flag on that room with the resulting member.
2017-03-17 11:59:22 +00: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
David Baker
5b216df28e Not joined members any more 2016-09-21 09:57:17 +01:00
David Baker
d1a5e54a69 Check if a room looks like a DM rooms on joining
and mark it as one if so.

Also change the heuristic to only count rooms with 2 total members rather than 2 joined members, otherwise this is going to mark any room as a DM if someone creates a room, invites a bunch of people and you happen to be first to join.
2016-09-20 17:59:46 +01:00
Matthew Hodgson
96fd460cc8 fix import 2016-09-16 23:29:35 +01:00
Matthew Hodgson
e1bd97d509 don't try to set DM data for guests 2016-09-16 16:15:34 +01:00
David Baker
d19686b96d Fix un-marking rooms as DM rooms 2016-09-13 11:06:07 +01:00
David Baker
96fabe09d2 Update createRoom to support creating DM rooms
* Make ChatInviteDialog and MemberInfo createRoom use it
* Fix bug in setDMRoom
2016-09-09 19:25:00 +01:00
David Baker
ee7c064690 I can't spell 'likely' 2016-09-08 13:56:45 +01:00
David Baker
ec4086c5fc API for (un)marking rooms as DM rooms 2016-09-07 17:46:45 +01:00
David Baker
66b2944011 Convert Rooms.js to ES6 2016-09-07 11:45:32 +01:00
David Baker
8a4606cfbf Remove unused import 2016-09-07 11:34:55 +01:00
David Baker
db42d629aa Rename MatrixTools to Rooms
Since all the functions therein are to do with rooms, so this name is probably more helpful
2016-09-07 11:30:09 +01:00
Renamed from src/MatrixTools.js (Browse further)