diff --git a/core/Messenger.c b/core/Messenger.c index 4ea7e507..24797d7a 100644 --- a/core/Messenger.c +++ b/core/Messenger.c @@ -496,8 +496,8 @@ static void check_friend_connectionstatus(int friendnumber, uint8_t status) return; if (status == NOFRIEND) return; - const uint8_t is_connected = friendlist[friendnumber].status == FRIEND_ONLINE; - const uint8_t was_connected = status == FRIEND_ONLINE; + const uint8_t was_connected = friendlist[friendnumber].status == FRIEND_ONLINE; + const uint8_t is_connected = status == FRIEND_ONLINE; if (is_connected != was_connected) friend_connectionstatuschange(friendnumber, is_connected); } diff --git a/core/Messenger.h b/core/Messenger.h index fa0daf41..9352cfbb 100644 --- a/core/Messenger.h +++ b/core/Messenger.h @@ -211,7 +211,7 @@ void m_callback_userstatus(void (*function)(int, USERSTATUS)); in that case, you should discard it. */ void m_callback_read_receipt(void (*function)(int, uint32_t)); -/* set the callback for conenction status changes +/* set the callback for connection status changes function(int friendnumber, uint8_t status) status: 0 -- friend went offline after being previously online