diff --git a/.gitignore b/.gitignore index f9259fb..77f6651 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ Makefile.in /src/matrix-event-call-base.c /src/matrix-glib-0.0.pc /src/matrix-message-base.c +/src/matrix-message-text.c diff --git a/src/Makefile.am b/src/Makefile.am index 1508c15..71d6aae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,6 +51,7 @@ libmatrix_glib_0_0_la_VALA_SOURCES = \ matrix-event-call-answer.vala \ matrix-event-call-hangup.vala \ matrix-message-base.vala \ + matrix-message-text.vala \ $(NULL) AM_CPPFLAGS += \ diff --git a/src/matrix-event-types.c b/src/matrix-event-types.c index 95ce471..32735ef 100644 --- a/src/matrix-event-types.c +++ b/src/matrix-event-types.c @@ -221,6 +221,10 @@ matrix_event_types_ctor(void) matrix_event_register_type("m.call.hangup", MATRIX_EVENT_TYPE_CALL_HANGUP, NULL); + + matrix_message_register_type("m.text", + MATRIX_MESSAGE_TYPE_TEXT, + NULL); } void diff --git a/src/matrix-message-text.vala b/src/matrix-message-text.vala new file mode 100644 index 0000000..b6dd377 --- /dev/null +++ b/src/matrix-message-text.vala @@ -0,0 +1,24 @@ +/* + * This file is part of matrix-glib-sdk + * + * matrix-glib-sdk is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * matrix-glib-sdk is distributed in the hope that it will be + * useful, but WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with matrix-glib-sdk. If not, see + * . + */ + +/** + * Message handler for plain text messages + * + * Handle plain text messages. + */ +public class Matrix.Message.Text : Matrix.Message.Base {}