This commit is contained in:
claudemiro
2016-12-26 22:08:29 -02:00
parent 746b978e52
commit b117386591
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ func (c *channel) Subscribe(a *app, conn *connection, channelData string) error
a.TriggerMemberAddedHook(c, subscription)
// pusher_internal:subscription_succeeded
data := make(map[string]subscriptionSucceeedEventPresenceData)
data := make(map[string]subscriptionSucceededEventPresenceData)
data["presence"] = newSubscriptionSucceedEventPresenceData(c)
js, err = json.Marshal(data)
+1 -1
View File
@@ -7,6 +7,6 @@ package ipe
// Only this version is supported
const supportedProtocolVersion = 7
// // Maximun event size permitted 10 kB
// // Maximum event size permitted 10 kB
// See: http://blogs.gnome.org/cneumair/2008/09/30/1-kb-1024-bytes-no-1-kb-1000-bytes/
const maxDataEventSize = 10 * 1000
+3 -3
View File
@@ -89,14 +89,14 @@ func newSubscriptionSucceededEvent(channel, data string) subscriptionSucceededEv
// \"count\": 2
// }
// }"
type subscriptionSucceeedEventPresenceData struct {
type subscriptionSucceededEventPresenceData struct {
Ids []string `json:"ids"`
Hash map[string]interface{} `json:"hash"`
Count int `json:"count"`
}
func newSubscriptionSucceedEventPresenceData(c *channel) subscriptionSucceeedEventPresenceData {
event := subscriptionSucceeedEventPresenceData{}
func newSubscriptionSucceedEventPresenceData(c *channel) subscriptionSucceededEventPresenceData {
event := subscriptionSucceededEventPresenceData{}
var ids []string
hash := make(map[string]interface{}, c.TotalSubscriptions())
+1 -1
View File
@@ -18,7 +18,7 @@ import (
"github.com/dimiro1/ipe/utils"
)
// Prepare Querystring
// Prepare QueryString
func prepareQueryString(params url.Values) string {
var keys []string