Skip to content

Commit

Permalink
bridgev2/portal: add m.mentions for disappearing message timer notice
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Feb 22, 2025
1 parent 83f81ea commit 43dbbb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bridgev2/portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3377,8 +3377,9 @@ func (portal *Portal) updateUserLocalInfo(ctx context.Context, info *UserLocalPo
func DisappearingMessageNotice(expiration time.Duration, implicit bool) *event.MessageEventContent {
formattedDuration := exfmt.DurationCustom(expiration, nil, exfmt.Day, time.Hour, time.Minute, time.Second)
content := &event.MessageEventContent{
MsgType: event.MsgNotice,
Body: fmt.Sprintf("Set the disappearing message timer to %s", formattedDuration),
MsgType: event.MsgNotice,
Body: fmt.Sprintf("Set the disappearing message timer to %s", formattedDuration),
Mentions: &event.Mentions{},
}
if implicit {
content.Body = fmt.Sprintf("Automatically enabled disappearing message timer (%s) because incoming message is disappearing", formattedDuration)
Expand Down

0 comments on commit 43dbbb1

Please sign in to comment.