diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-26 18:57:55 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-26 18:57:55 +0100 |
commit | 93cff1668c5e42d45a8393a1ac59173c8101b375 (patch) | |
tree | b20e984d79e5bc59fedbfac335c97fe349404b14 /synapse/api/events/room.py | |
parent | WIP: Completely change how event streaming and pagination work. This reflects... (diff) | |
parent | Pepper UT TODOs (diff) | |
download | synapse-93cff1668c5e42d45a8393a1ac59173c8101b375.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into stream_refactor
Diffstat (limited to 'synapse/api/events/room.py')
-rw-r--r-- | synapse/api/events/room.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/synapse/api/events/room.py b/synapse/api/events/room.py index 2a7b5e8aba..9faad57ac0 100644 --- a/synapse/api/events/room.py +++ b/synapse/api/events/room.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from synapse.api.constants import Membership +from synapse.api.constants import Feedback, Membership from synapse.api.errors import SynapseError from . import SynapseEvent @@ -93,17 +93,19 @@ class MessageEvent(SynapseEvent): class FeedbackEvent(SynapseEvent): TYPE = "m.room.message.feedback" - valid_keys = SynapseEvent.valid_keys + [ - "msg_id", # the message ID being acknowledged - "msg_sender_id", # person who is sending the feedback is 'user_id' - "feedback_type", # the type of feedback (delivery, read, etc) - ] + valid_keys = SynapseEvent.valid_keys def __init__(self, **kwargs): super(FeedbackEvent, self).__init__(**kwargs) + if not kwargs["content"]["type"] in Feedback.LIST: + raise SynapseError(400, "Bad feedback value.") def get_content_template(self): - return {} + return { + "type": u"string", + "target_event_id": u"string", + "msg_sender_id": u"string" + } class InviteJoinEvent(SynapseEvent): |