Merge pull request #875 from vector-im/madlittlemods/event-data-attribute-on-announcement-view

Add `data-event-id` to `AnnouncementView` so it appears for state events in the timeline
This commit is contained in:
R Midhun Suresh 2022-10-11 11:40:21 +05:30 committed by GitHub
commit dc13d1b283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,11 @@ export class AnnouncementView extends TemplateView {
super(vm);
}
render(t) {
return t.li({className: "AnnouncementView"}, t.div(vm => vm.announcement));
render(t, vm) {
return t.li({
className: "AnnouncementView",
'data-event-id': vm.eventId
}, t.div(vm => vm.announcement));
}
/* This is called by the parent ListView, which just has 1 listener for the whole list */