diff --git a/include/mastodont_notif_types.h b/include/mastodont_notif_types.h index 4bcb32f..4b0d2e3 100644 --- a/include/mastodont_notif_types.h +++ b/include/mastodont_notif_types.h @@ -30,6 +30,6 @@ #define MSTDNT_NOTIFICATION_CHAT_MENTION (1<<8) #define MSTDNT_NOTIFICATION_REPORT (1<<9) -typedef mstdnt_notification_t uint16_t; +typedef uint16_t mstdnt_notification_t; #endif /* MASTODONT_NOTIF_TYPES */ diff --git a/include/mastodont_visibility_types.h b/include/mastodont_visibility_types.h index c5b6a2e..a5989d4 100644 --- a/include/mastodont_visibility_types.h +++ b/include/mastodont_visibility_types.h @@ -25,6 +25,6 @@ #define MSTDNT_VISIBILITY_LIST (1<<4) #define MSTDNT_VISIBILITY_LOCAL (1<<5) -typedef mstdnt_visibility_t uint8_t; +typedef uint8_t mstdnt_visibility_t; #endif /* MASTODONT_VISIBILITY_TYPES_H */ diff --git a/src/notification.c b/src/notification.c index b749100..555cdd2 100644 --- a/src/notification.c +++ b/src/notification.c @@ -19,6 +19,7 @@ #include #include #include +#include static void _mstdnt_val_notif_type_call(cJSON* v, void* _type) { @@ -82,7 +83,7 @@ int mstdnt_notifications_from_result(struct mstdnt_fetch_results* results, cJSON_ArrayForEach(notif_j_list, root) { - mstdnt_status_from_json((*notif) + i++, notif_j_list->child); + mstdnt_notification_from_json((*notif) + i++, notif_j_list->child); } return 0; @@ -103,7 +104,7 @@ int mastodont_get_notifications(mastodont_t* data, struct mstdnt_notification** notifs, size_t* size) { - struct _mstdnt_statuses_cb_args cb_args = { statuses, size }; + struct _mstdnt_notifications_result_cb_args cb_args = { notifs, size }; union param_value u_exclude_types, u_account_id, u_exclude_visibilities, u_include_types, u_with_muted, u_max_id, u_min_id,