Don't send pins until a subscription is established, since unpin events never come in that case.

This commit is contained in:
Ian Gulliver
2015-06-07 14:16:54 -07:00
parent 190e1eb182
commit 3995a4d0d9
3 changed files with 5 additions and 7 deletions

View File

@@ -237,14 +237,10 @@ static void cosmo_handle_event(cosmo *instance, json_t *event) {
const char *event_type = json_string_value(json_object_get(event, "event_type"));
if (strcmp(event_type, "message") == 0) {
cosmo_handle_message(instance, event);
/*
// This can all come back once we have channel support.
} else if (strcmp(event_type, "pin") == 0) {
cosmo_handle_pin(instance, event);
// unpin never fires when we're just polling
} else if (strcmp(event_type, "unpin") == 0) {
cosmo_handle_unpin(instance, event);
*/
} else {
fprintf(stderr, "unknown event type: %s\n", event_type);
}