mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-25 20:22:03 -08:00
Relay notices (matrix). Closes #243
This commit is contained in:
parent
43bd779fb7
commit
cfb8107138
@ -100,7 +100,7 @@ func (b *Bmatrix) getRoomID(channel string) string {
|
|||||||
func (b *Bmatrix) handlematrix() error {
|
func (b *Bmatrix) handlematrix() error {
|
||||||
syncer := b.mc.Syncer.(*matrix.DefaultSyncer)
|
syncer := b.mc.Syncer.(*matrix.DefaultSyncer)
|
||||||
syncer.OnEventType("m.room.message", func(ev *matrix.Event) {
|
syncer.OnEventType("m.room.message", func(ev *matrix.Event) {
|
||||||
if (ev.Content["msgtype"].(string) == "m.text" || ev.Content["msgtype"].(string) == "m.emote") && ev.Sender != b.UserID {
|
if (ev.Content["msgtype"].(string) == "m.text" || ev.Content["msgtype"].(string) == "m.notice" || ev.Content["msgtype"].(string) == "m.emote") && ev.Sender != b.UserID {
|
||||||
b.RLock()
|
b.RLock()
|
||||||
channel, ok := b.RoomMap[ev.RoomID]
|
channel, ok := b.RoomMap[ev.RoomID]
|
||||||
b.RUnlock()
|
b.RUnlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user