improve message sending
This commit is contained in:
parent
f3cde63e37
commit
b6ee0f901e
4 changed files with 29 additions and 13 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue