diff options
-rw-r--r-- | matrix/matrix.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go index 9689827..556d567 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -189,7 +189,12 @@ func (c *Container) Start() { } func (c *Container) NotifyMessage(room *rooms.Room, message *types.Message) { - notification.Send(room.GetTitle(), message.Text, false) + sender := fmt.Sprintf("%s (%s)", message.Sender, room.GetTitle()) + if room.GetTitle() == message.Sender { + // 1:1 room, title is same as display name of other user. + sender = message.Sender + } + notification.Send(sender, message.Text, false) } func (c *Container) HandleMessage(evt *gomatrix.Event) { |