فهرست منبع

Add italics for bridging emotes

Tulir Asokan 2 سال پیش
والد
کامیت
a67d6d2af7
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      portal.go

+ 3 - 0
portal.go

@@ -1530,6 +1530,9 @@ func (portal *Portal) handleMatrixMessage(sender *User, evt *event.Event) {
 	switch content.MsgType {
 	case event.MsgText, event.MsgEmote, event.MsgNotice:
 		sendReq.Content, sendReq.AllowedMentions = portal.parseMatrixHTML(content)
+		if content.MsgType == event.MsgEmote {
+			sendReq.Content = fmt.Sprintf("_%s_", sendReq.Content)
+		}
 	case event.MsgAudio, event.MsgFile, event.MsgImage, event.MsgVideo:
 		data, err := downloadMatrixAttachment(portal.MainIntent(), content)
 		if err != nil {