Add message handler for m.text

This commit is contained in:
Gergely Polonkai 2016-03-10 15:42:30 +01:00 committed by Gergely Polonkai
parent 19323453a9
commit 1f1bc94bbd
4 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View File

@ -83,3 +83,4 @@ Makefile.in
/src/matrix-event-call-base.c /src/matrix-event-call-base.c
/src/matrix-glib-0.0.pc /src/matrix-glib-0.0.pc
/src/matrix-message-base.c /src/matrix-message-base.c
/src/matrix-message-text.c

View File

@ -51,6 +51,7 @@ libmatrix_glib_0_0_la_VALA_SOURCES = \
matrix-event-call-answer.vala \ matrix-event-call-answer.vala \
matrix-event-call-hangup.vala \ matrix-event-call-hangup.vala \
matrix-message-base.vala \ matrix-message-base.vala \
matrix-message-text.vala \
$(NULL) $(NULL)
AM_CPPFLAGS += \ AM_CPPFLAGS += \

View File

@ -221,6 +221,10 @@ matrix_event_types_ctor(void)
matrix_event_register_type("m.call.hangup", matrix_event_register_type("m.call.hangup",
MATRIX_EVENT_TYPE_CALL_HANGUP, MATRIX_EVENT_TYPE_CALL_HANGUP,
NULL); NULL);
matrix_message_register_type("m.text",
MATRIX_MESSAGE_TYPE_TEXT,
NULL);
} }
void void

View File

@ -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
* <http://www.gnu.org/licenses/>.
*/
/**
* Message handler for plain text messages
*
* Handle plain text messages.
*/
public class Matrix.Message.Text : Matrix.Message.Base {}