mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-15 07:35:49 -06:00
Move NewPollRequestMessage
This commit is contained in:
parent
4b6979aa89
commit
b1eb90addc
5 changed files with 10 additions and 10 deletions
|
|
@ -146,6 +146,13 @@ func NewActionMessage(event, topic, sequenceID string) *Message {
|
|||
return m
|
||||
}
|
||||
|
||||
// NewPollRequestMessage is a convenience method to create a poll request message
|
||||
func NewPollRequestMessage(topic, pollID string) *Message {
|
||||
m := NewMessage(PollRequestEvent, topic, "New message")
|
||||
m.PollID = pollID
|
||||
return m
|
||||
}
|
||||
|
||||
// ValidMessageID returns true if the given string is a valid message ID
|
||||
func ValidMessageID(s string) bool {
|
||||
return util.ValidRandomString(s, MessageIDLength)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue