3 * @copyright Copyright (C) 2010-2021, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 use Friendica\Core\Protocol;
23 use Friendica\Model\Contact;
24 use Friendica\Model\Item;
25 use Friendica\Model\Notification;
38 // Base test config to avoid notice messages
43 'v' => 'http://localhost',
52 'k' => 'worker_dont_fork',
57 'k' => 'curl_timeout',
69 'username' => 'Test user',
70 'nickname' => 'selfcontact',
72 'password' => '$2y$10$DLRNTRmJgKe1cSrFJ5Jb0edCqvXlA9sh/RHdSnfxjbR.04yZRm4Qm',
110 'uri' => 'http://localhost/profile/selfcontact',
115 'uri' => 'http://localhost/profile/othercontact',
120 'uri' => 'http://localhost/profile/friendcontact',
125 'uri' => 'http://localhost/profile/mutualcontact',
134 'name' => 'Self contact',
135 'nick' => 'selfcontact',
137 'nurl' => 'http://localhost/profile/selfcontact',
138 'url' => 'http://localhost/profile/selfcontact',
139 'about' => 'User used in tests',
142 'rel' => Contact::FOLLOWER,
143 'network' => Protocol::DFRN,
144 'location' => 'DFRN',
146 // Having the same name and nick allows us to test
147 // the fallback to api_get_nick() in api_get_user()
152 'name' => 'othercontact',
153 'nick' => 'othercontact',
155 'nurl' => 'http://localhost/profile/othercontact',
156 'url' => 'http://localhost/profile/othercontact',
159 'rel' => Contact::NOTHING,
160 'network' => Protocol::DFRN,
161 'location' => 'DFRN',
167 'name' => 'Friend contact',
168 'nick' => 'friendcontact',
170 'nurl' => 'http://localhost/profile/friendcontact',
171 'url' => 'http://localhost/profile/friendcontact',
174 'rel' => Contact::SHARING,
175 'network' => Protocol::DFRN,
176 'location' => 'DFRN',
182 'name' => 'Friend contact',
183 'nick' => 'friendcontact',
185 'nurl' => 'http://localhost/profile/friendcontact',
186 'url' => 'http://localhost/profile/friendcontact',
189 'rel' => Contact::SHARING,
190 'network' => Protocol::DFRN,
191 'location' => 'DFRN',
197 'name' => 'Mutual contact',
198 'nick' => 'mutualcontact',
200 'nurl' => 'http://localhost/profile/mutualcontact',
201 'url' => 'http://localhost/profile/mutualcontact',
204 'rel' => Contact::FRIEND,
205 'network' => Protocol::DFRN,
206 'location' => 'DFRN',
212 'name' => 'Mutual contact',
213 'nick' => 'mutualcontact',
215 'nurl' => 'http://localhost/profile/mutualcontact',
216 'url' => 'http://localhost/profile/mutualcontact',
219 'rel' => Contact::SHARING,
220 'network' => Protocol::DFRN,
221 'location' => 'DFRN',
231 'name' => 'http://activitystrea.ms/schema/1.0/like',
235 'name' => 'http://purl.org/macgirvin/dfrn/1.0/dislike',
239 'name' => 'http://purl.org/zot/activity/attendyes',
243 'name' => 'http://purl.org/zot/activity/attendno',
247 'name' => 'http://purl.org/zot/activity/attendmaybe',
251 'name' => 'http://activitystrea.ms/schema/1.0/follow',
255 'name' => 'https://www.w3.org/ns/activitystreams#Announce',
259 'name' => 'http://activitystrea.ms/schema/1.0/post',
265 'body' => 'Parent status',
266 'plink' => 'http://localhost/display/1',
271 'plink' => 'http://localhost/display/2',
275 'body' => 'Other user status',
276 'plink' => 'http://localhost/display/3',
280 'body' => 'Friend user reply',
281 'plink' => 'http://localhost/display/4',
285 'body' => '[share]Shared status[/share]',
286 'plink' => 'http://localhost/display/5',
290 'body' => 'Friend user status',
291 'plink' => 'http://localhost/display/6',
297 'parent-uri-id' => 1,
298 'thr-parent-id' => 1,
299 'gravity' => GRAVITY_PARENT,
300 'network' => Protocol::DFRN,
305 'private' => Item::PUBLIC,
311 'parent-uri-id' => 1,
312 'thr-parent-id' => 1,
313 'gravity' => GRAVITY_COMMENT,
314 'network' => Protocol::DFRN,
319 'private' => Item::PUBLIC,
325 'parent-uri-id' => 3,
326 'thr-parent-id' => 3,
327 'gravity' => GRAVITY_PARENT,
328 'network' => Protocol::DFRN,
333 'private' => Item::PUBLIC,
339 'parent-uri-id' => 1,
340 'thr-parent-id' => 1,
341 'gravity' => GRAVITY_COMMENT,
342 'network' => Protocol::DFRN,
347 'private' => Item::PUBLIC,
353 'parent-uri-id' => 1,
354 'thr-parent-id' => 1,
355 'gravity' => GRAVITY_COMMENT,
356 'network' => Protocol::DFRN,
361 'private' => Item::PUBLIC,
367 'parent-uri-id' => 6,
368 'thr-parent-id' => 6,
369 'gravity' => GRAVITY_PARENT,
370 'network' => Protocol::DFRN,
375 'private' => Item::PUBLIC,
392 'parent-uri-id' => 1,
393 'thr-parent-id' => 1,
394 'private' => Item::PUBLIC,
395 'gravity' => GRAVITY_PARENT,
396 'network' => Protocol::DFRN,
407 'parent-uri-id' => 1,
408 'thr-parent-id' => 1,
409 'gravity' => GRAVITY_COMMENT,
410 'network' => Protocol::DFRN,
415 'private' => Item::PUBLIC,
427 'parent-uri-id' => 3,
428 'thr-parent-id' => 3,
429 'gravity' => GRAVITY_PARENT,
430 'network' => Protocol::DFRN,
435 'private' => Item::PUBLIC,
447 'parent-uri-id' => 1,
448 'thr-parent-id' => 1,
449 'gravity' => GRAVITY_COMMENT,
450 'network' => Protocol::DFRN,
455 'private' => Item::PUBLIC,
467 'parent-uri-id' => 1,
468 'thr-parent-id' => 1,
469 'gravity' => GRAVITY_COMMENT,
470 'network' => Protocol::DFRN,
475 'private' => Item::PUBLIC,
487 'parent-uri-id' => 6,
488 'thr-parent-id' => 6,
489 'gravity' => GRAVITY_PARENT,
490 'network' => Protocol::DFRN,
495 'private' => Item::PUBLIC,
507 'parent-uri-id' => 1,
508 'thr-parent-id' => 1,
509 'gravity' => GRAVITY_PARENT,
510 'network' => Protocol::DFRN,
515 'private' => Item::PUBLIC,
527 'parent-uri-id' => 1,
528 'thr-parent-id' => 1,
529 'gravity' => GRAVITY_COMMENT,
530 'network' => Protocol::DFRN,
535 'private' => Item::PUBLIC,
547 'parent-uri-id' => 3,
548 'thr-parent-id' => 3,
549 'gravity' => GRAVITY_PARENT,
550 'network' => Protocol::DFRN,
555 'private' => Item::PUBLIC,
567 'parent-uri-id' => 1,
568 'thr-parent-id' => 1,
569 'gravity' => GRAVITY_COMMENT,
570 'network' => Protocol::DFRN,
575 'private' => Item::PUBLIC,
587 'parent-uri-id' => 1,
588 'thr-parent-id' => 1,
589 'gravity' => GRAVITY_COMMENT,
590 'network' => Protocol::DFRN,
595 'private' => Item::PUBLIC,
611 'parent-uri-id' => 6,
612 'thr-parent-id' => 6,
613 'private' => Item::PUBLIC,
614 'gravity' => GRAVITY_PARENT,
615 'network' => Protocol::DFRN,
627 'network' => Protocol::DFRN,
634 'network' => Protocol::DFRN,
641 'network' => Protocol::DFRN,
644 'post-thread-user' => [
654 'network' => Protocol::DFRN,
667 'network' => Protocol::DFRN,
680 'network' => Protocol::DFRN,
693 'network' => Protocol::DFRN,
706 'network' => Protocol::DFRN,
714 'post-user-id' => 12,
719 'network' => Protocol::DFRN,
728 'name' => 'Reply to',
729 'url' => 'http://localhost/display/1',
730 'photo' => 'http://localhost/',
731 'date' => '2020-01-01 12:12:02',
732 'msg' => 'A test reply from an item',
734 'link' => 'http://localhost/notification/1',
737 'verb' => \Friendica\Protocol\Activity::POST,
738 'otype' => Notification\ObjectType::ITEM,
739 'name_cache' => 'Reply to',
740 'msg_cache' => 'A test reply from an item',
754 'name' => 'Visible list',
760 'name' => 'Private list',
766 'term' => 'Saved search',