소스 검색

Redact recycle emoji after requesting retry

Tulir Asokan 3 년 전
부모
커밋
357cb5af90
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      matrix.go

+ 3 - 0
matrix.go

@@ -492,6 +492,9 @@ func (mx *MatrixHandler) HandleReaction(evt *event.Event) {
 	content := evt.Content.AsReaction()
 	if strings.Contains(content.RelatesTo.Key, "retry") || strings.HasPrefix(content.RelatesTo.Key, "\u267b") { // ♻️
 		if portal.requestMediaRetry(user, content.RelatesTo.EventID) {
+			_, _ = portal.MainIntent().RedactEvent(portal.MXID, evt.ID, mautrix.ReqRedact{
+				Reason: "requested media from phone",
+			})
 			// Errored media, don't try to send as reaction
 			return
 		}