Commit Graph

171 Commits

Author SHA1 Message Date
Julian Lam
581516c88e fix: made parentCid optional in api.search.categories 2023-10-31 11:32:07 -04:00
Julian Lam
00de9d5b07 refactor(socket.io): deprecate categories.categorySearch in favour of api.search.categories
THIS IS WIP
2023-10-31 11:32:07 -04:00
Julian Lam
1ce4ca54da refactor(socket.io): deprecate categories.loadMore in favour of api.categories.getTopics 2023-10-31 11:32:07 -04:00
Julian Lam
010727f5cb refactor(socket.io): deprecate categories.loadMoreSubCategories in favour of api.categories.getChildren 2023-10-31 11:32:07 -04:00
Julian Lam
d7c6b3d60e refactor(socket.io): deprecate categories.setWatchState in favour of api.categories.setWatchState 2023-10-31 11:32:07 -04:00
Julian Lam
c442b6e662 refactor(socket.io): deprecate categories.getTopicCount in favour of api.categories.getTopicCount 2023-10-31 11:32:07 -04:00
Julian Lam
96046373da refactor(socket.io): deprecate categories.get in favour of api.categories.list 2023-10-31 11:32:07 -04:00
Julian Lam
52b78e83a8 refactor(socket.io): deprecate categories.getRecentReplies in favour of api.categories.getPosts 2023-10-31 11:32:07 -04: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ı
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
Julian Lam
e012edea3b feat: flag rescinding logic + api method 2023-10-12 10:23:30 -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ı
344ece8db5 fix: #12057, allow gmods to change user email 2023-10-03 20:42:43 -04:00
Barış Soner Uşaklı
40d290c1a9 Tag follow (#12041)
* feat: tag follow

* on tag delete remove it from following users

* feat: on tag rename update user followed tags

and move the

* add new filter on /notifications

* feat: openapi updates

* chore: up themes

* chore: up peace

* refactor: remove unused title
2023-09-27 10:57:00 -04:00
Barış Soner Uşaklı
b9c3cdb679 fix: use isPrivileged instead of isAdmin 2023-09-07 11:39:22 -04:00
Julian Lam
223e76569b feat: introduce new ACP setting for newbie chat message delay, defaults to 2 minutes 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ı
54706b1182 ability to pin chat messages (#11964) 2023-08-28 15:57:30 -04:00
Barış Soner Uşaklı
3d6668e7f0 fix: dont show chat notif if you are already in the room
mark all notifs from chat read when you you mark the chat room read
2023-08-24 22:42:36 -04:00
Barış Soner Uşaklı
979f24b173 feat: #6021 add min:rep-post-links (#11938)
new reputation limit to post links
if post queue is enabled and user doesn't have enough reputation to post links, queue their posts

if post queue is NOT enabled and user doesn't have enough reputation to post links show error

check content on topic post, topic reply, post edit
2023-08-21 14:00:36 -04:00
Barış Soner Uşaklı
9349cb63cb feat: #11881, limit room names 2023-08-06 17:32:36 -04:00
Barış Soner Uşaklı
0316f324e7 feat: add toMid to chat messages 2023-08-06 02:33:28 -04:00
Barış Soner Uşaklı
2fe193d68f refactor: dont load all tokens in verify token
use sortedSetsRemove
2023-07-28 11:47:52 -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ı
61f036ce1d Chat notifs (#11832)
* first part of chat notifs

* moved default notif to manage page

* spec

* notifs

* delete settings on room delete
2023-07-21 15:31:34 -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ı
3e7ca4f20e fix: unread notif filter 2023-07-16 22:44:17 -04:00
Barış Soner Uşaklı
a766f74f0e fix: on leave/kick remove matching sockets from rooms 2023-07-15 18:08:31 -04:00
Barış Soner Uşaklı
f0775651b9 only update user list if its open 2023-07-14 13:01:41 -04:00
Barış Soner Uşaklı
911ef0581c feat: show online users at the top of userlist and update
when they enter/leave
2023-07-14 11:19:57 -04:00
Barış Soner Uşaklı
547bde8939 cache fixes
on newRoom and deleteRooms clear cache
add some checks for empty groups list
2023-07-12 16:35:46 -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ı
4b11cd0da5 feat: closes #11747, add pagination to tokens page 2023-06-22 23:38:57 -04:00
Barış Soner Uşaklı
68ddca1e02 feat: add req and socket to als, closes https://github.com/NodeBB/NodeBB/pull/10304 2023-06-16 10:55:35 -04:00
Julian Lam
6765d053ce test: additional tests for .roll() 2023-05-11 15:22:50 -04:00
Julian Lam
4f524e9f94 feat: token rolling API for admins
+ tests
2023-05-11 15:22:50 -04:00
Julian Lam
e4888dea17 feat: api token migration, new ACP tokens list, token creation 2023-05-11 15:22:50 -04:00
Julian Lam
7b8bffd763 feat: internal utility functions for token management (creation, deletion, etc)
Including tests
2023-05-11 15:22:50 -04:00
Barış Soner Uşaklı
e0db9a8978 test: fix assert.reject calls
fix tests
2023-05-04 09:47:58 -04:00
Julian Lam
36895421ba refactor: topic mark read/unread routes 2023-05-01 12:02:34 -04:00
Julian Lam
69b409385d refactor: migrate posts.getReplies to write API 2023-05-01 12:02:34 -04:00
Julian Lam
ee9f53f1ff refactor: deprecate socket method posts.getPidIndex 2023-05-01 12:02:34 -04:00
Julian Lam
f2082d7de8 refactor: started work on porting socket methods to write API [breaking]
The following socket calls have been removed:

* `posts.getRawPost`
* `posts.getPostSummaryByPid`

Two new Write API routes have been added:

- `GET /api/v3/posts/:pid/raw`
- `GET /api/v3/posts/:pid/summary`
2023-05-01 12:02:34 -04:00
Barış Soner Uşaklı
8e0f9ce573 fix: #11541, fix leave chat error 2023-05-01 09:20:52 -04:00
Barış Soner Uşaklı
e3551d80d7 feat: allow tag editing from topic tools
closes #7536
closes #7465
closes #11538
2023-04-30 21:17:25 -04:00
Barış Soner Uşaklı
b891c5accd test: fix group tests
no idea how these passed on gh runner
2023-04-28 16:43:49 -04:00
Julian Lam
0fc9fdd53d fix: throw generic not-allowed error on groups.join if a non-owner tries to add another user to a group 2023-04-06 17:17:47 -04:00
Julian Lam
18447b06af fix: remove socketGroups.addMember; update admin checks to allow admin:groups privilege, hide add member controls if not admin 2023-04-06 17:17:47 -04:00
Julian Lam
f043dcec96 fix: remove socketGroups.kick 2023-04-06 17:17:47 -04:00
Julian Lam
18c45b4461 refactor: group invitations; issuing, accepting, rejecting; now via API 2023-04-06 17:17:47 -04:00