|
|
|
@ -13,6 +13,7 @@ import (
|
|
|
|
"strconv"
|
|
|
|
"strconv"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"git.lalonde.me/matth/AltVRBot/pkg/utils"
|
|
|
|
"github.com/PuerkitoBio/goquery"
|
|
|
|
"github.com/PuerkitoBio/goquery"
|
|
|
|
"golang.org/x/net/html"
|
|
|
|
"golang.org/x/net/html"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -217,6 +218,7 @@ func (avr *AltVR) fetchPendingConversations() ([]Conversation, error) {
|
|
|
|
|
|
|
|
|
|
|
|
func (avr *AltVR) postNewConversation(userID, message string) error {
|
|
|
|
func (avr *AltVR) postNewConversation(userID, message string) error {
|
|
|
|
uid, _ := strconv.ParseUint(userID, 10, 64)
|
|
|
|
uid, _ := strconv.ParseUint(userID, 10, 64)
|
|
|
|
|
|
|
|
message = utils.TruncateString(message, 140)
|
|
|
|
jv, _ := json.Marshal(&ConversationNewMessageOutgoing{
|
|
|
|
jv, _ := json.Marshal(&ConversationNewMessageOutgoing{
|
|
|
|
Conversation: ConversationNewMessage{
|
|
|
|
Conversation: ConversationNewMessage{
|
|
|
|
UserID: uid,
|
|
|
|
UserID: uid,
|
|
|
|
|