Skip to content

Commit

Permalink
Fix comments with mentions in direct messages
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Jul 3, 2024
1 parent 6f8de4a commit c090ea2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.2] - 2024-07-03
### Fixed
- Comments with mentions in direct messages was not delivered to client.

## [1.2.1] - 2023-12-03

### Changed
Expand Down
10 changes: 0 additions & 10 deletions chat/process-event.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func (c *Chat) renderEvent(event *frf.Event) tg.Chattable {
}
return c.withPostBody(c.newHTMLMessage(text), event)
case "mention_in_comment":
if event.Post != nil && event.Post.IsDirect() {
// We will receive this in 'direct_comment' event
return nil
}

if ok, _ := c.App.IsPostTracked(c.ID, event.PostID); ok {
// We will receive this with post subscription
return nil
Expand All @@ -90,11 +85,6 @@ func (c *Chat) renderEvent(event *frf.Event) tg.Chattable {

return c.withCommentBody(c.newHTMLMessage(headText), event)
case "mention_comment_to":
if event.Post != nil && event.Post.IsDirect() {
// We will receive this in 'direct_comment' event
return nil
}

if ok, _ := c.App.IsPostTracked(c.ID, event.PostID); ok {
// We will receive this with post subscription
return nil
Expand Down

0 comments on commit c090ea2

Please sign in to comment.