Message IDs of likes & shares get reused, we need to generate our own one

This commit is contained in:
Christian Muehlhaeuser 2019-05-31 23:47:08 +02:00
parent 23baddb2e3
commit f97938d514
No known key found for this signature in database
GPG key ID: 3CF9FA45CA1EBB7E

View file

@ -493,6 +493,7 @@ func (mod *Account) handleNotification(n *mastodon.Notification, notify bool) {
case "reblog": case "reblog":
ev.Forward = true ev.Forward = true
ev.Post.MessageID = n.Account.Acct + "-share-" + ev.Post.MessageID
ev.Post.Author = n.Status.Account.Acct ev.Post.Author = n.Status.Account.Acct
ev.Post.AuthorName = n.Status.Account.DisplayName ev.Post.AuthorName = n.Status.Account.DisplayName
ev.Post.AuthorURL = n.Status.Account.URL ev.Post.AuthorURL = n.Status.Account.URL
@ -513,7 +514,7 @@ func (mod *Account) handleNotification(n *mastodon.Notification, notify bool) {
case "favourite": case "favourite":
ev.Like = true ev.Like = true
ev.Post.MessageID = n.Account.Acct + "-like-" + ev.Post.MessageID
ev.Post.Author = n.Status.Account.Acct ev.Post.Author = n.Status.Account.Acct
ev.Post.AuthorName = n.Status.Account.DisplayName ev.Post.AuthorName = n.Status.Account.DisplayName
ev.Post.AuthorURL = n.Status.Account.URL ev.Post.AuthorURL = n.Status.Account.URL