mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 01:14:29 +01:00
Add option to disable backfill read receipt bridging
This commit is contained in:
parent
1bdbf0a22d
commit
62e806c8c3
2 changed files with 2 additions and 1 deletions
|
@ -74,6 +74,7 @@ type BridgeConfig struct {
|
|||
ArchiveTag string `yaml:"archive_tag"`
|
||||
PinnedTag string `yaml:"pinned_tag"`
|
||||
TagOnlyOnCreate bool `yaml:"tag_only_on_create"`
|
||||
MarkReadOnlyOnCreate bool `yaml:"mark_read_only_on_create"`
|
||||
|
||||
WhatsappThumbnail bool `yaml:"whatsapp_thumbnail"`
|
||||
|
||||
|
|
2
user.go
2
user.go
|
@ -749,7 +749,7 @@ func (user *User) syncChatDoublePuppetDetails(doublePuppet *Puppet, chat Chat, j
|
|||
return
|
||||
}
|
||||
intent := doublePuppet.CustomIntent()
|
||||
if chat.UnreadCount == 0 {
|
||||
if chat.UnreadCount == 0 && (justCreated || !user.bridge.Config.Bridge.MarkReadOnlyOnCreate) {
|
||||
lastMessage := user.bridge.DB.Message.GetLastInChat(chat.Portal.Key)
|
||||
if lastMessage != nil {
|
||||
err := intent.MarkRead(chat.Portal.MXID, lastMessage.MXID)
|
||||
|
|
Loading…
Reference in a new issue