Commit Graph

1572 Commits

Author SHA1 Message Date
Julian Lam
445b70deda test: migrate socket modules tests to v3 api 2023-12-05 11:47:55 -05:00
Julian Lam
565ca3cc3b fix: deprecated emailer hook 2023-12-05 10:41:23 -05:00
Julian Lam
2c1c4dfe41 test: migrate socket.io groups tests to use api v3 2023-12-05 10:41:14 -05:00
Julian Lam
2c6024e07f feat: update groups.leave to allow global mods to kick users out of groups 2023-12-01 13:04:32 -05:00
Julian Lam
a4133500fe refactor(socket.io): deprecate SocketModules.chats.canMessage and .markAllRead with no alternative. deprecate .getRecentChats in favour of api.chats.list 2023-11-20 13:06:26 -05:00
Barış Soner Uşaklı
fdff165e2b feat: closes #12154, add exempt groups
for new user restrictions
2023-11-07 12:36:40 -05:00
Barış Soner Uşaklı
4c4f3ac983 feat: add direct message link (#12138)
* feat: add direct message link

/message/:mid
add /:index? to chat routes
add copy link to chat messages
add messageCount to each room object
add infinitescroll in both directions to chat

* fix more tests

* test: more text fixes

* test: fix tests

* remove async

* dont crash if element not in dom

clamp scrollToIndex values to 0, msgCount
2023-10-31 10:15:06 -04:00
Barış Soner Uşaklı
6c7e614417 feat: batch.processSortedSet min/max (#12129)
* feat: batch.processSortedSet min/max

* test if this works
2023-10-26 10:23:27 -04:00
Barış Soner Uşaklı
b398321a5e Chat with privileged (#12092)
* Update headers.js

Fixes X-Upstream-Hostname header for os hostnames with invalid characters

* Added missing period in allowed hostname chars

Allowed hostname chars should include A-Za-z0-9-. based on https://man7.org/linux/man-pages/man7/hostname.7.html

* feat: add chat:privileged global privilege

to only allow chatting with privileged users

* test: fix priv test

* test: one more fix

---------

Co-authored-by: chadjw <chad.warner@gmail.com>
2023-10-17 13:19:25 -04:00
Barış Soner Uşaklı
b870538095 lint: fix quotes 2023-10-13 17:19:22 -04:00
Julian Lam
9936442706 test: worked with chatgpt to restrict the i18n test a bit to match requirements 2023-10-13 12:46:37 -04:00
Julian Lam
6606d96aaa test: fix flag tests 2023-10-12 10:23:30 -04:00
Julian Lam
e012edea3b feat: flag rescinding logic + api method 2023-10-12 10:23:30 -04:00
Julian Lam
da2390594a test: added test cases for .addReport and .rescindReport() 2023-10-12 10:23:30 -04:00
Barış Soner Uşaklı
3b46ad424d lint: fix lint 2023-10-06 12:26:09 -04:00
Julian Lam
d25a24fcf4 fix: allowing forward slash in language keys, temporarily allowing upper case characters 2023-10-06 11:29:43 -04:00
Julian Lam
69dde2b9dd test: added i18n test to enforce kebab casing 2023-10-05 14:41:24 -04:00
Barış Soner Uşaklı
844cb91beb feat: update all language keys to use - instead of _ (#12059)
* feat: update all language keys to use - instead of _

* refactor: update language keys
2023-10-05 12:48:50 -04:00
Barış Soner Uşaklı
66be9826a2 test: add reverse list test 2023-10-03 12:50:20 -04:00
Julian Lam
857433d12a fix: breaking tests 2023-10-02 11:19:05 -04:00
Julian Lam
d7e9f32412 test: additional tests for #12034 2023-09-26 14:54:13 -04:00
Barış Soner Uşaklı
f1a80d48cc 10411 (#12037)
* feat: add type to privilege maps

deprecate old hooks that are used for adding new privileges, new hooks are static:privileges.global.init/static:privileges.categories.init

* deprecate admin priv hooks

* fix: if type doesnt exist default to 'other'

* remove filter

* fix: copy privilege functions to use new filter instead of indices

allow static hooks to use sync functions

* fix: openapi

* test: fix template helper
2023-09-25 20:42:18 -04:00
Julian Lam
ce7403014a test: added tests for new logic paths (toPid validation on post creation)
re: #12025
2023-09-25 10:34:35 -04:00
Barış Soner Uşaklı
e452c097d0 refactor: get rid of some async.waterfall/series/parallel calls 2023-09-22 11:44:32 -04:00
Barış Soner Uşaklı
8bc2ef227e refactor: get rid of async.waterfall/series 2023-09-13 16:23:49 -04:00
Barış Soner Uşaklı
e15d68d195 Merge branch 'master' into develop 2023-09-11 16:01:41 -04:00
Julian Lam
9dc9d5ef54 test: remove errant .only() 2023-09-11 14:27:14 -04:00
Barış Soner Uşaklı
dcccbe69e3 Merge branch 'master' into develop 2023-09-11 12:02:28 -04:00
Barış Soner Uşaklı
6625116634 test: fix room count 2023-09-11 10:29:53 -04:00
Barış Soner Uşaklı
53106c009c fix: toMid to posts you cant see 2023-09-11 10:20:10 -04:00
Julian Lam
8202c5555d test: 💥 i18n tests 2023-09-07 11:49:40 -04:00
Julian Lam
ff07fc44e2 fix: failing test due to increased chat message delay 2023-09-07 11:39:22 -04:00
Barış Soner Uşaklı
8db13d8e86 refactor: how admins change emails (#11973)
* refactor: how admins change emails

ability for admins to change emails from acp
ability for admins to change passwords from acp
only users themselves can use /user/<slug>/edit/email
group actions in manage users dropdown
admins can use the same modal from profile page instead of interstitial to update email
add missing checks to addEmail, if email take throw error
add targetUid to email change event

* test: bunch of baloney

* test: remove old test
2023-08-30 19:29:46 -04:00
Barış Soner Uşaklı
1a1fd64d9a fix: deleted chat messages (#11962)
* fix: deleted chat messages

* fix spec
2023-08-28 12:10:42 -04:00
Barış Soner Uşaklı
9720bb4846 Merge branch 'master' into develop 2023-08-24 14:36:25 -04:00
Barış Soner Uşaklı
d5c8bf9eb1 test: add some tests for isPrivilegeGroup 2023-08-24 14:26:27 -04:00
Barış Soner Uşaklı
9534f9b9b9 feat: check mute when messaging, closes #11932 2023-08-19 17:15:06 -04:00
Barış Soner Uşaklı
6b09b7c7d4 test: fix tests, dont hang if payload is string
closes #11933
2023-08-19 16:40:43 -04:00
Barış Soner Uşaklı
35e689cff5 test: fix redirect test 2023-08-16 20:11:22 -04:00
Barış Soner Uşaklı
38c0c8dec0 refactor: ip blacklist.test
also dont call ipaddr.parse if cidr rules is empty
add a test for cidr
2023-08-02 12:52:46 -04:00
Barış Soner Uşaklı
82562bec44 fix: fix escaped characters in tooltips, fix priv checks in tooltips
closes #11862, closes #11857
2023-08-01 11:25:37 -04:00
Barış Soner Uşaklı
11bfeaf130 feat: #11850, chat msg search 2023-07-28 10:56:25 -04:00
Barış Soner Uşaklı
d615273d90 test: fix tests to use regular uid 2023-07-26 10:07:38 -04:00
Barış Soner Uşaklı
e41042eeea test: fix tests since nid format changed 2023-07-25 11:11:31 -04:00
Barış Soner Uşaklı
4f3f9d9891 mark chat room notifs read on load 2023-07-21 16:19:26 -04:00
Barış Soner Uşaklı
9e574e0765 test: fix test 2023-07-19 08:05:22 -04:00
Barış Soner Uşaklı
00be053e94 fix: topic postercount field if owner is changed
also fix when posts are purged
2023-07-18 12:38:17 -04:00
Barış Soner Uşaklı
91642cb324 feat: allow multiple room owners, closes #6503 2023-07-17 22:42:00 -04:00
Barış Soner Uşaklı
9b901783fa Chat refactor (#11779)
* first part of chat refactor

remove per user chat zsets & store all mids in chat:room:<roomId>:mids
reverse uids in getUidsInRoom

* feat: create room button

public groups wip

* feat: public rooms

create chats:room zset
chat room deletion

* join socket.io room

* get rid of some calls that load all users in room

* dont load all users when loadRoom is called

* mange room users infinitescroll

dont load all members in api call

* IS for user list

ability to change groups field for public rooms
update groups field if group is renamed

* test: test fixes

* wip

* keep 150 messages

* fix extra awaits

fix dupe code in chat toggleReadState

* unread state for public rooms

* feat: faster push unread

* test: spec

* change base to harmony

* test: lint fixes

* fix language of chat with message

* add 2 methods for perf

messaging.getTeasers and getUsers(roomIds)
instead of loading one by one

* refactor: cleaner conditional

* test fix upgrade script fix

save timestamp of room creation in room object

* set progress.total

* don't check for guests/spiders

* public room unread fix

* add public unread counts

* mark read on send

* ignore instead of throwing

* doggy.gif

* fix: restore delete

* prevent entering chat rooms with

meta.enter

* fix self message causing mark unread

* ability to sort public rooms

* dont init sortable on mobile

* move chat-loaded class to core

* test: fix spec

* add missing keys

* use ajaxify

* refactor: store some refs

* fix: when user is deleted remove from public rooms as well

* feat: change how unread count is calculated

* get rid of cleaned content

get rid of mid

* add help text

* test: fix tests, add back mid

to prevent breaking change

* ability to search members of chat rooms

* remove

* derp

* perf: switch with  partial data

fix tests

* more fixes

if user leaves a group leave public rooms is he is no longer part of any of the groups that have access

fix the cache key used to get all public room ids

dont allow joining chat socket.io room if user is no longer part of group

* fix: lint

* fix: js error when trying to delete room after switching

* add isRoomPublic
2023-07-12 13:03:54 -04:00
Barış Soner Uşaklı
e31f5c42ee test: fix 2023-07-08 00:37:04 -04:00