How to get run this inside callback of a notification

Hi,
I have a notification and I want to run a method with this statement.

originally code is like this and I get undefined error for this

  on: {
    close: function () {

and I tried to use an arrow function however I cant do it as below, can you help me ?

var notificationCallbackOnClose = this.$f7.notification.create({
  icon: '<i class="icon demo-icon">7</i>',
  title: 'Incoming Message',
  titleRightText: 'now',
  subtitle: 'Notification with close on click',
  text: 'Open',
  closeOnClick: true,
  on: {
    close: ( () => {
      console.log('call answer')
      this.$store.commit('SET_INCOMINGMESSAGE', true);
    })
  },
});

I also tried to put this statement in another method and try to call that method but again get error

  on: {
    close: function () {
      setMessage()
    }
  },

or this

notificationCallbackOnClose.on('closed', function (popover) {
  console.log('answer notification closed');
        this.$store.commit('SET_INCOMINGMESSAGE', true);
});

Anyway I fixed it with assigning this to that and use that

var that = this

  on: {
    close: function () {
      that.$store.commit('SET_INCOMINGMESSAGE', true);