Skip to content

Commit

Permalink
stubs for future event handling impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslawp committed Sep 16, 2018
1 parent 9949b15 commit fe762f9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions libmattermost.c
Original file line number Diff line number Diff line change
Expand Up @@ -3233,18 +3233,26 @@ mm_process_msg(MattermostAccount *ma, JsonNode *element_node)
purple_blist_remove_chat(chat);
}
}
} else if (purple_strequal(event, "channel_converted")) {
//TODO: implement: remove & add to blist again (see above) or just change type ?
} else if (purple_strequal(event, "channel_updated")) {
//TODO: implement
// } else if (purple_strequal(event, "channel_converted")) {
// //TODO: implement: remove & add to blist again (see above) or just change type ?
// } else if (purple_strequal(event, "channel_updated")) {
// //TODO: implement
} else if (purple_strequal(event, "channel_viewed")) {
//we have marked it viewed already with purple_conversation_has_focus()
} else if (purple_strequal(event, "hello")) {
mm_refresh_statuses(ma, NULL);
} else if (purple_strequal(event, "user_updated")) {
//TODO: implement reusing (partsof) mm_get_users_by_ids_response()
// {"event":"user_updated","data":{"user":
// { "id":"XXXXX","create_at":XXXX,"update_at":XXXX ,"delete_at":0,
// "username":"aaa","auth_data":"","auth_service":"","email":"[email protected]","nickname":"AA",
// "first_name":"AAA","last_name":"AAA","position":"CCC","roles":"system_user",
// "last_picture_update": XXXXX,"locale":"en",
// "timezone":{"automaticTimezone":"","manualTimezone":"","useAutomaticTimezone":"true"}}},"broadcast":
// {"omit_users":null,"user_id":"","channel_id":"","team_id":""},"seq":5}
} else if (event) {
// can be one of: https://api.mattermost.com/#tag/WebSocket
purple_debug_info("mattermost", "unhandled event %s [%s]\n", status,json_object_to_string(obj));
//post_deleted,
purple_debug_info("mattermost", "unhandled event %s [%s]\n", event,json_object_to_string(obj));
} else if (purple_strequal(status,"OK")) {
//TODO: this can be a reply to client sending 'user_typing', 'get_statuses' or 'get_statuses_by_ids'
// we dont know since would need to track seq number... so assume it was one of statuses replies...
Expand Down

0 comments on commit fe762f9

Please sign in to comment.