Kegan Dougal
d0560f594d
Set the right .sender value for m.room.member events
2016-03-16 17:18:33 +00:00
Matthew Hodgson
3d316959f9
Revert this as it just doesn't work - our events are always m.room.members at this point
2016-03-16 16:44:22 +00:00
Matthew Hodgson
3db4d9488b
oops, normal events should use the chronologically earlier content, but membership changes should use the current content.
2016-03-16 14:31:03 +00:00
Matthew Hodgson
6b0fa84697
if synapse handed us profile data in the leave event, then use it. unbreaks overzealous tests
2016-03-16 14:14:14 +00:00
Matthew Hodgson
98b0cf2560
make sure we show display names & avatars on parts, and use the right type of content for displaynames for member events in general. fixes https://github.com/vector-im/vector-web/issues/1140 and https://github.com/vector-im/vector-web/issues/873 and a bunch more
2016-03-16 13:51:55 +00:00
David Baker
8e903c0531
Merge pull request #94 from matrix-org/dbkr/may_send_state_event
...
Add maySendStateEvent method, ported from react-sdk (but fixed).
2016-03-16 10:39:55 +00:00
David Baker
b90984a7f6
Use member.powerLevel instead of duplicating the user power level calculation.
2016-03-16 10:38:16 +00:00
David Baker
57006b7366
Check member hasn't left the room
2016-03-16 10:35:29 +00:00
Richard van der Hoff
07bbe358ea
Clean up a codepath that was only used for crypto messages
...
Transmission of encrypted messages was happening somewhat differently to
normal messages. In particular, we weren't copying the 'unsigned' field when we
got the remote-echo, which meant the 'sync' code didn't correctly match up the
echo with the original.
The separate codepath was becoming a thorn in my side, so fix things up to
bring it back in line.
2016-03-15 15:07:26 +00:00
Richard van der Hoff
4ae353d3d3
Raise localEchoUpdated events in more places
...
We need to know about more transitions for local-echo status changes, so raise
localEchoUpdated events for each transition.
Fixes an issue where we weren't turning failed transmissions red, because the
timeline wasn't being updated.
2016-03-10 12:07:27 +00:00
Richard van der Hoff
b4b8b4bfb8
Merge pull request #95 from matrix-org/rav/raise_event_on_remote_echo
...
Emit an event when a local-echo is turned into a proper event
2016-03-08 16:40:03 +00:00
Richard van der Hoff
234c227fd5
Work around confused timelines causing pagination loops
...
Look out for us getting stuck in a loop of using the same pagination token,
and use something else next time.
Hopefully this will fix https://github.com/vector-im/vector-web/issues/1089 .
2016-03-08 15:38:00 +00:00
Richard van der Hoff
78eded3bbd
Emit an event when a local-echo is turned into a proper event
...
We need to trigger an update of the timeline when this happens, so raise an
event for it.
2016-03-08 15:00:19 +00:00
David Baker
9328a12ccb
Add maySendStateEvent method, ported from react-sdk (but fixed). Plus tests.
2016-03-03 17:44:27 +00:00
Richard van der Hoff
0034bdf4ad
Set the back-pagination token before raising Room.timelineReset
...
This fixes another race condition on gappy syncs, wherein we weren't
back-paginating back from the start of the gappy sync.
2016-03-01 13:35:22 +00:00
David Baker
48f7aca121
Merge pull request #89 from matrix-org/dbkr/invite_name_from_member_event
...
Use our inviter's member event to get their display name if it exists.
2016-02-29 18:05:27 +00:00
David Baker
76f1d24c7b
Make room name generation slightly more sane and add unit tests fir invite naming.
2016-02-29 13:51:55 +00:00
David Baker
45a3bf63b2
Use our inviter's member event to get their display name if it exists.
2016-02-26 14:11:10 +00:00
Richard van der Hoff
abf908b14f
Fire a 'Room.timelineReset' event when we get a gappy sync
...
We need to reset things at the UI level when we get a gappy sync, so give the
clients something to listen for.
Also add a bunch of tests for that bit of code.
2016-02-25 18:26:11 +00:00
Matthew Hodgson
2150bdc444
fix tests
2016-02-19 17:59:26 +00:00
Matthew Hodgson
5886b3358d
f1x l1nt
2016-02-19 17:56:55 +00:00
Matthew Hodgson
8b887d8559
name 3PID invite rooms better
2016-02-19 17:45:57 +00:00
David Baker
e9f6e41550
Local echos are fake too.
2016-02-19 16:18:29 +00:00
David Baker
2950417f70
Add docs to appease jslint
2016-02-19 15:35:36 +00:00
David Baker
39f641a851
Address PR comments
2016-02-19 15:22:38 +00:00
David Baker
95fff38dbb
Add a param to getEventReadUpTo to have it ignore implicit read receipts. Store real receipts separately to make this work.
2016-02-19 14:42:07 +00:00
Richard van der Hoff
785326376a
Merge pull request #80 from matrix-org/rav/keep_redactions
...
Keep redacted events in the timeline
2016-02-17 21:41:42 +00:00
Richard van der Hoff
88827fab84
EventTimeline: Fix baseIndex after removing the last event
...
Removing the last event in an EventTimeline (as we might, for instance, if it
was a local echo in an empty timeline) got us into a state where the baseIndex
would increment when adding events to the end of the timeline, causing much
confusion.
2016-02-16 22:22:26 +00:00
Richard van der Hoff
ab0a06eea7
More delinting
2016-02-16 16:19:32 +00:00
Richard van der Hoff
6a6db36088
delintificate
2016-02-16 16:14:45 +00:00
Richard van der Hoff
4c6d0a5128
Redactions: only remove the keys that are specced for removal
2016-02-16 16:03:18 +00:00
Richard van der Hoff
5eff278454
Keep redacted events in the timeline
...
Everything gets confused when we remove events from timelines, so keep
redacted events in there, and mark them as redacted instead.
2016-02-16 12:05:13 +00:00
Richard van der Hoff
f3e5e03009
Give precedence to later Read Receipts
...
In order to resolve the conflict between local and remote read-receipts, try to
give precedence to the read-receipt which refers to the most recent event.
Also fix the read-receipt synthesis in _addLiveEvents so that it actually works
(drop the spurious MatrixEvent wrapper), and remove the synthesis in
recalculate() (which appears to be redundant).
2016-02-04 15:35:27 +00:00
Richard van der Hoff
8ee1d17ff7
Fix a bug which made the timelines get confused about local messages
...
Make sure that the timeline index is kept consistent when the id of an event
changes when we receive the remote echo of a message we sent.
2016-02-03 11:56:09 +00:00
Richard van der Hoff
3c2fad7c8d
Merge remote-tracking branch 'origin/develop' into rav/context
2016-01-27 09:49:00 +00:00
Richard van der Hoff
a87cefa035
Replace the boolean args on EventTimeline methods with constants
2016-01-26 22:38:26 +00:00
Richard van der Hoff
a01501b42c
Address a number of review comments.
...
Make sure that room state is copied correctly when resetting the live
timeline.
Also comments and bits.
2016-01-26 18:09:15 +00:00
David Baker
0c3abcccf2
camelCase
2016-01-26 14:11:36 +00:00
David Baker
15e8784daf
Add local echo for read receipts. Fixes https://github.com/vector-im/vector-web/issues/623
2016-01-25 17:49:41 +00:00
Richard van der Hoff
840b8f0bc0
Merge branch 'develop' into rav/context
...
Conflicts:
lib/models/room.js
2016-01-25 10:45:22 +00:00
Kegan Dougal
7bdab05785
Unbreak tests
2016-01-21 17:34:12 +00:00
David Baker
1f1d743678
Merge remote-tracking branch 'origin/develop' into dbkr/new_unread_count_format
2016-01-21 09:50:20 +00:00
Matthew Hodgson
24655ac60e
missing semicolon
2016-01-21 00:02:24 +00:00
Matthew Hodgson
eaf7b03bb1
if we are the only person in a room, call it an 'Empty room' too, given this is how humans see a room if they're the only person in it...
2016-01-20 23:55:09 +00:00
David Baker
a24a9d35c4
Fix PR comments: typos and redundant line
2016-01-20 18:52:32 +00:00
David Baker
b4e4aaff00
Merge branch 'develop' into dbkr/new_unread_count_format
2016-01-20 17:25:54 +00:00
Matthew Hodgson
3a73b54e4a
.name defaults to mxid
2016-01-20 17:22:16 +00:00
David Baker
5ec0fce2a4
style
2016-01-20 17:19:26 +00:00
Matthew Hodgson
8b7497374f
name self-chats by displayname if possible rather than mxid, and name empty-chats as 'Empty room' rather than the fugly '?'
2016-01-20 17:19:13 +00:00
David Baker
8cb180525e
Add getter/setter for unread notif counts.
2016-01-20 17:16:20 +00:00