MCPcopy
hub / github.com/gotify/server / GetMessagesByApplication

Method GetMessagesByApplication

database/message.go:54–61  ·  view source on GitHub ↗

GetMessagesByApplication returns all messages from an application.

(tokenID uint)

Source from the content-addressed store, hash-verified

52
53// GetMessagesByApplication returns all messages from an application.
54func (d *GormDatabase) GetMessagesByApplication(tokenID uint) ([]*model.Message, error) {
55 var messages []*model.Message
56 err := d.DB.Where("application_id = ?", tokenID).Order("messages.id desc").Find(&messages).Error
57 if err == gorm.ErrRecordNotFound {
58 err = nil
59 }
60 return messages, err
61}
62
63// GetMessagesByApplicationSince returns limited messages from an application.
64// If since is 0 it will be ignored.

Calls

no outgoing calls