Add message handler for m.notice
This commit is contained in:
parent
51cbda451c
commit
78fc89804c
1
.gitignore
vendored
1
.gitignore
vendored
@ -85,3 +85,4 @@ Makefile.in
|
|||||||
/src/matrix-message-base.c
|
/src/matrix-message-base.c
|
||||||
/src/matrix-message-text.c
|
/src/matrix-message-text.c
|
||||||
/src/matrix-message-emote.c
|
/src/matrix-message-emote.c
|
||||||
|
/src/matrix-message-notice.c
|
||||||
|
@ -53,6 +53,7 @@ libmatrix_glib_0_0_la_VALA_SOURCES = \
|
|||||||
matrix-message-base.vala \
|
matrix-message-base.vala \
|
||||||
matrix-message-text.vala \
|
matrix-message-text.vala \
|
||||||
matrix-message-emote.vala \
|
matrix-message-emote.vala \
|
||||||
|
matrix-message-notice.vala \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
AM_CPPFLAGS += \
|
AM_CPPFLAGS += \
|
||||||
|
@ -228,6 +228,9 @@ matrix_event_types_ctor(void)
|
|||||||
matrix_message_register_type("m.emote",
|
matrix_message_register_type("m.emote",
|
||||||
MATRIX_MESSAGE_TYPE_EMOTE,
|
MATRIX_MESSAGE_TYPE_EMOTE,
|
||||||
NULL);
|
NULL);
|
||||||
|
matrix_message_register_type("m.notice",
|
||||||
|
MATRIX_MESSAGE_TYPE_NOTICE,
|
||||||
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
31
src/matrix-message-notice.vala
Normal file
31
src/matrix-message-notice.vala
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* 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 type to hold a m.notice message
|
||||||
|
*
|
||||||
|
* A m.notice message should be considered similar to a plain m.text
|
||||||
|
* message except that clients should visually distinguish it in some
|
||||||
|
* way. It is intended to be used by automated clients, such as bots,
|
||||||
|
* bridges, and other entities, rather than humans. Additionally, such
|
||||||
|
* automated agents which watch a room for messages and respond to
|
||||||
|
* them ought to ignore m.notice messages. This helps to prevent
|
||||||
|
* infinite-loop situations where two automated clients continuously
|
||||||
|
* exchange messages, as each responds to the other.
|
||||||
|
*/
|
||||||
|
public class Matrix.Message.Notice : Matrix.Message.Base {}
|
Loading…
Reference in New Issue
Block a user