improve message sending

This commit is contained in:
saces 2026-02-06 18:34:15 +01:00
parent f3cde63e37
commit b6ee0f901e
4 changed files with 29 additions and 13 deletions

View file

@ -75,14 +75,10 @@ func (mxc *MXClient) _onMessage(ctx context.Context, evt *event.Event) {
*/
}
type sendmessage_data_content struct {
Body string `json:"body"`
}
type sendmessage_data struct {
RoomId id.RoomID `json:"roomid"`
Type event.Type `json:"type"`
Content sendmessage_data_content `json:"content"`
RoomId id.RoomID `json:"roomid"`
Type event.Type `json:"type"`
Content map[string]any `json:"content"`
}
func (mxc *MXClient) SendRoomMessage(ctx context.Context, data string) (*mautrix.RespSendEvent, error) {