Add support for edited statuses
ActivityPub supports "status.update" for editing statuses. These should be made available for streams.
This commit is contained in:
parent
29bb16009b
commit
620be3654f
6 changed files with 66 additions and 9 deletions
|
@ -28,6 +28,8 @@ event: notification
|
|||
data: {"type": "mention"}
|
||||
event: delete
|
||||
data: 1234567
|
||||
event: status.update
|
||||
data: {"content": "foo"}
|
||||
:thump
|
||||
`, largeContent))
|
||||
var wg sync.WaitGroup
|
||||
|
@ -51,6 +53,14 @@ data: 1234567
|
|||
} else {
|
||||
t.Fatalf("bad update content: %q", event.Status.Content)
|
||||
}
|
||||
case *UpdateEditEvent:
|
||||
if event.Status.Content == "foo" {
|
||||
passUpdate = true
|
||||
} else if event.Status.Content == largeContent {
|
||||
passUpdateLarge = true
|
||||
} else {
|
||||
t.Fatalf("bad update content: %q", event.Status.Content)
|
||||
}
|
||||
case *NotificationEvent:
|
||||
passNotification = true
|
||||
if event.Notification.Type != "mention" {
|
||||
|
@ -125,6 +135,12 @@ data: {"content": "foo"}
|
|||
if event.Status.Content != "foo" {
|
||||
t.Fatalf("want %q but %q", "foo", event.Status.Content)
|
||||
}
|
||||
case *UpdateEditEvent:
|
||||
cnt++
|
||||
passUpdate = true
|
||||
if event.Status.Content != "foo" {
|
||||
t.Fatalf("want %q but %q", "foo", event.Status.Content)
|
||||
}
|
||||
}
|
||||
}
|
||||
if cnt != 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue