Use a new function to remove duplicated code

5 jobs for feature/add-notification-for-liked-extensions in 5 minutes and 33 seconds (queued for 2 seconds)