mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 20:37:29 -06:00
start work on notifications
This commit is contained in:
parent
e670c32a91
commit
5853179728
17 changed files with 437 additions and 5 deletions
|
|
@ -18,7 +18,11 @@
|
|||
|
||||
package message
|
||||
|
||||
import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
)
|
||||
|
||||
func (p *processor) notifyStatus(status *gtsmodel.Status) error {
|
||||
return nil
|
||||
|
|
@ -29,5 +33,17 @@ func (p *processor) notifyFollow(follow *gtsmodel.Follow) error {
|
|||
}
|
||||
|
||||
func (p *processor) notifyFave(fave *gtsmodel.StatusFave) error {
|
||||
return nil
|
||||
|
||||
notif := >smodel.Notification{
|
||||
NotificationType: gtsmodel.NotificationFave,
|
||||
TargetAccountID: fave.TargetAccountID,
|
||||
OriginAccountID: fave.AccountID,
|
||||
StatusID: fave.StatusID,
|
||||
}
|
||||
|
||||
if err := p.db.Put(notif); err != nil {
|
||||
return fmt.Errorf("notifyFave: error putting fave in database: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue