commit
4f1a2f82cc
|
@ -9,18 +9,18 @@ import (
|
||||||
// RicochetApplication bundles many useful constructs that are
|
// RicochetApplication bundles many useful constructs that are
|
||||||
// likely standard in a ricochet application
|
// likely standard in a ricochet application
|
||||||
type RicochetApplication struct {
|
type RicochetApplication struct {
|
||||||
connection *Connection
|
connection *connection.Connection
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRicochetApplication ...
|
// NewRicochetApplication ...
|
||||||
func NewRicochetApplication(connection *Connection) *RicochetApplication {
|
func NewRicochetApplication(connection *connection.Connection) *RicochetApplication {
|
||||||
ra := new(RicochetApplication)
|
ra := new(RicochetApplication)
|
||||||
ra.connection = connection
|
ra.connection = connection
|
||||||
return ra
|
return ra
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendMessage ...
|
// SendMessage ...
|
||||||
func (ra *RicochetApplication) SendChatMessage(message []string) error {
|
func (ra *RicochetApplication) SendChatMessage(message string) error {
|
||||||
return ra.connection.Do(func() error {
|
return ra.connection.Do(func() error {
|
||||||
channel := ra.connection.Channel("im.ricochet.chat", channels.Outbound)
|
channel := ra.connection.Channel("im.ricochet.chat", channels.Outbound)
|
||||||
if channel != nil {
|
if channel != nil {
|
||||||
|
|
Loading…
Reference in New Issue