Commit Graph

217 Commits

Author SHA1 Message Date
Julian Lam
2dec357aee feat: activitypub actor endpoint for user accounts 2023-12-06 13:38:18 -05:00
Julian Lam
932bd29200 feat: update Messaging.toggleOwner to optionally take a third state argument 2023-11-20 13:06:26 -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ı
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ı
e5a60dc857 fix: param 2023-10-25 13:40:15 -04:00
Barış Soner Uşaklı
dabc282dde refactor: move async call to parallel 2023-10-25 13:25:55 -04:00
Julian Lam
6a696c43a3 fix: handle public chat rooms too 2023-10-25 13:23:01 -04:00
Julian Lam
18c27d1ad3 fix: suppress chat message notifications for users who are known to be in the chat room (uid is present in the corresponding socket.io room) 2023-10-25 13:23:01 -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ı
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ı
f9fb3c3a06 refactor: change private message email subject
if roomName is set use it in the subject along wit the sender displayname
2023-10-05 01:02:39 -04:00
Barış Soner Uşaklı
130815c725 perf: no need to count on every call 2023-10-03 10:04:46 -04:00
Julian Lam
3ba371f6c2 refactor: remove chat message notification queue, implement merge IDs for chat message notifications, so they can be grouped together 2023-10-02 11:19:05 -04:00
Barış Soner Uşaklı
d906097a22 feat: add composerActions for chat rooms 2023-09-16 20:46:54 -04:00
Barış Soner Uşaklı
53106c009c fix: toMid to posts you cant see 2023-09-11 10:20:10 -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ı
1a1fd64d9a fix: deleted chat messages (#11962)
* fix: deleted chat messages

* fix spec
2023-08-28 12:10:42 -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ı
b65d8e823a feat: add new notif type for public rooms
change notification text to display more users
  * user1 wrote in general
  * user1 and user2 wrote in general
  * user1, user2 and user3 wrote in general
  * user1. user2 and 2 others wrote in general
2023-08-20 11:51:09 -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ı
8b533d5467 test: one more fix 2023-08-19 16:47:10 -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ı
82d95ba812 remove logs 2023-08-18 21:42:21 -04:00
Barış Soner Uşaklı
aeb27f4b8d fix: admins should see public chats
even if they are not in any of the groups
2023-08-18 21:41:00 -04:00
Barış Soner Uşaklı
9349cb63cb feat: #11881, limit room names 2023-08-06 17:32:36 -04:00
Barış Soner Uşaklı
9ba6dda8bf handle delete/restore/edit messages 2023-08-06 10:13:33 -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ı
48a66b74f1 fix tests 2023-07-27 17:39:14 -04:00
Barış Soner Uşaklı
d652da61d8 add upgrade script to set mid on msg objects
and create messages:mid for easy msg retrieval
2023-07-27 17:32:35 -04:00
Barış Soner Uşaklı
e68f7c2064 add missing hooks 2023-07-27 16:51:07 -04:00
Barış Soner Uşaklı
78aa904e97 gimme mid 2023-07-27 14:26: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ı
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ı
9b1cc57604 add reverse support to db.processSortedSet (#11826) 2023-07-20 22:26:55 -04:00
Barış Soner Uşaklı
16fe1eb98c fix: updateOwner
if there is another owner don't do anything
if not then make the next user in the room the owner
2023-07-17 22:49:02 -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ı
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ı
887333478a move load on restore 2023-07-13 21:47:07 -04:00
Barış Soner Uşaklı
3bf16f1c75 no need to store 0 for all messages
for deleted and system, if its missing it defaults to 0
2023-07-13 21:25:32 -04:00
Barış Soner Uşaklı
5c2086107e fix: always return empty array if its not set 2023-07-13 11:31:56 -04:00
Barış Soner Uşaklı
857fe16878 use same code in load room 2023-07-12 21:20:30 -04:00
Barış Soner Uşaklı
f8e30c6d52 add icon to rooms based on visibility 2023-07-12 21:13:11 -04:00
Barış Soner Uşaklı
4782764aee fix mobile mobile bar
fix user count if user just joined
2023-07-12 19:36:30 -04:00
Barış Soner Uşaklı
954db1ee19 chore: remove log 2023-07-12 17:07:58 -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ı
1bda90731a fix: #11766, allow privileged users to vote and chat
even if they don't have enough reputation
2023-07-05 15:24:34 -04:00
Barış Soner Uşaklı
e56e44ab23 refactor: move async call to promise.all 2023-06-25 22:08:20 -04:00
Barış Soner Uşaklı
a7375a85ba Merge branch 'master' into develop 2023-06-15 16:41:54 -04:00
Barış Soner Uşaklı
8620a2cd0a fix: #11717 prevent crash in messaging 2023-06-15 15:33:36 -04:00