It is possible to add your own notifications provider in order to fake a notification.
I have played around with it a bit in the past, and managed to make a notification with accept and decline button.
The gist of it is that you need to subclass ZO_NotificationProvider and overwrite all the necessary methods.
I am not sure if this code still works, but maybe you can use it as a starting point:
Lua Code:
local MyNotificationProvider = ZO_NotificationProvider:Subclass()
function MyNotificationProvider:New(notificationManager)
local provider = ZO_NotificationProvider.New(self, notificationManager)
provider.nextId = 1
return provider
end
function MyNotificationProvider:GetNextId()
local id = self.nextId
self.nextId = id + 1
return id
end
function MyNotificationProvider:AddNotification(data)
if(data.id == nil) then
local list = self.list
data.id = self:GetNextId()
list[data.id] = data
else
d("Cannot add a notification with an existing id.")
end
end
function MyNotificationProvider:RemoveNotification(id)
self.list[id] = nil
end
function MyNotificationProvider:Accept(data)
self:RemoveNotification(data.id)
end
function MyNotificationProvider:Decline(data)
self:RemoveNotification(data.id)
end
local myProvider = MyNotificationProvider:New(NOTIFICATIONS)
table.insert(NOTIFICATIONS.providers, myProvider)
myProvider:AddNotification( {
"Hello World!"
})