You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Implement Rich Quoting/Replies
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2017 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.
|
||||
@@ -41,6 +42,8 @@ const INITIAL_STATE = {
|
||||
roomLoadError: null,
|
||||
|
||||
forwardingEvent: null,
|
||||
|
||||
quotingEvent: null,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -108,6 +111,10 @@ class RoomViewStore extends Store {
|
||||
forwardingEvent: payload.event,
|
||||
});
|
||||
break;
|
||||
case 'quote_event':
|
||||
this._setState({
|
||||
quotingEvent: payload.event,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -286,6 +293,11 @@ class RoomViewStore extends Store {
|
||||
return this._state.forwardingEvent;
|
||||
}
|
||||
|
||||
// The mxEvent if one is currently being replied to/quoted
|
||||
getQuotingEvent() {
|
||||
return this._state.quotingEvent;
|
||||
}
|
||||
|
||||
shouldPeek() {
|
||||
return this._state.shouldPeek;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user