update fork to be up-to-date with matrixmc
This commit is contained in:
parent
46a4a3f51b
commit
3daadc3d10
1 changed files with 12 additions and 11 deletions
15
main.go
15
main.go
|
|
@ -370,15 +370,16 @@ func (b *Bridge) SendMessage(roomID id.RoomID, text string) {
|
||||||
}
|
}
|
||||||
func (b *Bridge) SendMessageWithpmp(roomID id.RoomID, displayname, text string) {
|
func (b *Bridge) SendMessageWithpmp(roomID id.RoomID, displayname, text string) {
|
||||||
if b.Usepmp {
|
if b.Usepmp {
|
||||||
json := map[string]any{
|
evt := &event.MessageEventContent{
|
||||||
"msgtype": "m.text",
|
MsgType: event.MsgText,
|
||||||
"body": text,
|
Body: text,
|
||||||
"com.beeper.per_message_profile": map[string]string{
|
BeeperPerMessageProfile: &event.BeeperPerMessageProfile{
|
||||||
"displayname": displayname,
|
ID: displayname,
|
||||||
"id": displayname,
|
Displayname: displayname,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
b.Matrix.SendMessageEvent(b.ctx, b.RoomID, event.EventMessage, json)
|
evt.AddPerMessageProfileFallback()
|
||||||
|
b.Matrix.SendMessageEvent(b.ctx, b.RoomID, event.EventMessage, evt)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b.Matrix.SendText(b.ctx, b.RoomID, text)
|
b.Matrix.SendText(b.ctx, b.RoomID, text)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue