Fix missing notifications:

- Add namecache in enotify
- Add "unset()" in notify repository for additional field "abort"
- Add possibility for additional, non-saved fields in model
This commit is contained in:
nupplaPhil 2020-01-28 01:02:53 +01:00
parent 977248f510
commit 443e106105
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
4 changed files with 44 additions and 2 deletions

View file

@ -163,4 +163,29 @@ class Notify extends BaseModel
return $message;
}
/**
* {@inheritDoc}
*/
protected function mapFields(array $data)
{
return [
'hash' => $data['hash'] ?? '',
'type' => $data['type'] ?? 0,
'name' => $data['name'] ?? '',
'url' => $data['url'] ?? '',
'photo' => $data['photo'] ?? '',
'date' => $data['date'] ?? DateTimeFormat::utcNow(),
'msg' => $data['msg'] ?? '',
'uid' => $data['uid'] ?? 0,
'link' => $data['link'] ?? '',
'iid' => $data['iid'] ?? 0,
'parent' => $data['parent'] ?? 0,
'seen' => $data['seen'] ?? false,
'verb' => $data['verb'] ?? '',
'otype' => $data['otype'] ?? '',
'name_cache' => $data['name_cache'] ?? null,
'msg_cache' => $data['msg_cache'] ?? null,
];
}
}