summaryrefslogtreecommitdiff
path: root/testrig/testmodels.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-09-06 12:42:55 +0200
committerLibravatar GitHub <noreply@github.com>2022-09-06 12:42:55 +0200
commita872ddebe67c7b76cbb78667224b393a847834ac (patch)
tree28b7d0081ee12ab9928eff0aecd6b55d32d8228d /testrig/testmodels.go
parent[bugfix] Catch json syntax errors in the frontend + display a more helpful me... (diff)
downloadgotosocial-a872ddebe67c7b76cbb78667224b393a847834ac.tar.xz
[feature] Custom emoji updates (serve emoji via s2s api, tune db models) (#805)
* migrate emojis * add get emoji to s2s (federation) API * add new emoji db + cache functions * add shortcodeDomain lookup for emojis * check existing emojis w/cache, not w/constraints * go fmt * add putEmoji func * use new db emoji funcs instead of where * remove emojistringstotags func * add unique constraint back in * fix up broken migration * update index
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r--testrig/testmodels.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go
index 19e451f5b..916b38612 100644
--- a/testrig/testmodels.go
+++ b/testrig/testmodels.go
@@ -2056,6 +2056,7 @@ func NewTestDereferenceRequests(accounts map[string]*gtsmodel.Account) map[strin
var sig, digest, date string
var target *url.URL
statuses := NewTestStatuses()
+ emojis := NewTestEmojis()
target = URLMustParse(accounts["local_account_1"].URI)
sig, digest, date = GetSignatureForDereference(accounts["remote_account_1"].PublicKeyURI, accounts["remote_account_1"].PrivateKey, target)
@@ -2137,6 +2138,14 @@ func NewTestDereferenceRequests(accounts map[string]*gtsmodel.Account) map[strin
DateHeader: date,
}
+ target = URLMustParse(emojis["rainbow"].URI)
+ sig, digest, date = GetSignatureForDereference(accounts["remote_account_1"].PublicKeyURI, accounts["remote_account_1"].PrivateKey, target)
+ fossSatanDereferenceEmoji := ActivityWithSignature{
+ SignatureHeader: sig,
+ DigestHeader: digest,
+ DateHeader: date,
+ }
+
return map[string]ActivityWithSignature{
"foss_satan_dereference_zork": fossSatanDereferenceZork,
"foss_satan_dereference_zork_public_key": fossSatanDereferenceZorkPublicKey,
@@ -2148,6 +2157,7 @@ func NewTestDereferenceRequests(accounts map[string]*gtsmodel.Account) map[strin
"foss_satan_dereference_zork_outbox": fossSatanDereferenceZorkOutbox,
"foss_satan_dereference_zork_outbox_first": fossSatanDereferenceZorkOutboxFirst,
"foss_satan_dereference_zork_outbox_next": fossSatanDereferenceZorkOutboxNext,
+ "foss_satan_dereference_emoji": fossSatanDereferenceEmoji,
}
}