Commit Graph

60 Commits

Author SHA1 Message Date
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ı
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
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ı
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ı
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ı
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ı
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ı
68db271dfd chore: remove logs 2023-03-26 21:17:57 -04:00
Barış Soner Uşaklı
2c5a5bf366 feat: change chat notification delivery
instead of checking if user is online in the past x minutes, check if the user has read the room, if they have already marked the chat as read don't send notification
2023-03-26 21:13:07 -04:00
Barış Soner Uşaklı
2a9b3ee464 fix: add missing delete 2023-03-26 20:11:11 -04:00
Barış Soner Uşaklı
c1ec20470b fix: catch exceptions from sendNotifications 2022-01-19 20:52:12 -05:00
Magnus
7bd3e31dec Fullname in notifications (#10157)
* init - fullname notifications setting

* fullname in topic reply

* fullname for group-request-membership

* fullname for group-leave notification

* fullname for new-post-flag & new-user-flag

* removed log

* fullname for user follow

* fullname in message notification

* fullname in follow

* fullname for sendNotificationToPostOwner

* fullname in sendNotificationToTopicOwner

* fullname in doExport

* shorthand name set

* shorter name set

* fullname in notifications

* displayname for notifications

* removed unused require
2022-01-19 10:19:11 -05:00
Barış Soner Uşaklı
fb363957d1 refactor: tab rules 2021-11-18 16:42:18 -05:00
Barış Soner Uşaklı
73f40e96a5 fix: #9620, fix notif delay 2021-06-21 11:17:57 -04:00
Barış Soner Uşaklı
c953b1b3d1 fix: #9292, messageobj.content already parsed 2021-02-11 12:55:00 -05:00
Julian Lam
783786cf8c fix: do not blindly escape a notification's bodyLong
For 7+ years we were escaping this value, but it is in many cases already sanitized (as it may be a post content). For those cases when it is not, I now run it through parse.raw.

Instead of escaping, it now strips p, img, and a tags.
2021-02-09 11:16:40 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
b44ddecdf8 feat: #8204, separate notification type for group chats 2020-11-17 12:52:02 -05:00
psychobunny
4fc84e9f5c chore: lint notifications.js 2020-09-28 11:18:43 -04:00
psychobunny
5b427a0c3b feat: option in ACP to configure notification/email delay for chats 2020-09-28 11:15:45 -04:00
Baris Usakli
6b3eb0144e refactor: use arrow function 2019-10-09 13:30:59 -04:00
Baris Usakli
c01b0fbd8c fix: #7951, don't send notification for system messages 2019-10-09 13:29:49 -04:00
Baris Usakli
27c27b497e refactor: use arrow func 2019-08-19 11:07:59 -04:00
Julian Lam
756a717eb8 feat: convert src/messaging/* to async/await (#7778)
* feat: src/messaging/create.js, #7743

* feat: src/messaging/data.js, #7743

* feat: src/messaging/delete.js, #7743

* feat: src/messaging/edit.js, index.js, #7743

* fix: added in missing awaits

* feat: wrapped up src/messaging/* rewrite

* refactor: messaging delete/restore similar blocks of code
2019-07-22 11:18:13 -04:00
Barış Soner Uşaklı
7a1888dfbf closes #6514 2018-05-30 16:29:44 -04:00
Julian Lam
a367b698e3 a bit more integration for #6463 2018-04-20 13:49:23 -04:00
Baris Usakli
48cff9bfcb fix chat message subject 2018-01-09 17:11:58 -05:00
Barış Soner Uşaklı
d2ffdbda7d closes #6203 2018-01-03 13:59:58 -05:00
Barış Soner Uşaklı
dd176dd5f2 Notification delivery (#6072)
* ability for users to choose how they receive notifications

add type field to more notifications, the type field is used to
determine what to do based on user
setting(none,notification,email,notificationemail)

* change var name to types

* cleanup

* add event types for privileged users

* remove unused language keys

* fix uids check

* changed if statements

* upgrade script to preserver old settings
2017-11-15 21:35:10 -05:00
Julian Lam
d9ace1723c removed references to libs that aren't used 2017-07-17 12:40:50 -04:00
Julian Lam
a2627d2066 added default payload to emails, and adding nodebb logo for email header 2017-07-13 11:30:44 -04:00
Peter Jaszkowiak
932ae4e86d Merge branch 'master' into notif-abort 2017-05-09 11:31:58 -06:00
Peter Jaszkowiak
4b87324234 Quick fix 2017-04-26 16:02:15 -06:00
Peter Jaszkowiak
033ce02e7b Rename hooks
Add `static:messaging.canMessageRoom` as well
2017-04-26 15:22:17 -06:00
Peter Jaszkowiak
42e21d5aa9 Add more messaging hooks 2017-04-26 10:45:40 -06:00
barisusakli
5a2ff8ed0a closes #5527 2017-03-14 23:03:09 +03:00
Peter Jaszkowiak
dd2b930824 Resolve merge conflicts, minify only .js files 2017-02-23 18:31:49 -07:00
barisusakli
5c01c7b1c7 delayed notification test 2017-02-22 13:35:05 +03:00
Peter Jaszkowiak
93f38d4f30 ESlint no-multi-assign
and max-nested-callbacks, no-mixed-requires, max-statements-per-line
2017-02-18 18:06:28 -07:00
Peter Jaszkowiak
57f89663aa ESlint radix 2017-02-18 14:29:52 -07:00
Peter Jaszkowiak
3b0dd2d1ef ESlint padded-blocks 2017-02-18 02:32:24 -07:00
Peter Jaszkowiak
feb8405f95 ESlint eol-last 2017-02-18 02:30:48 -07:00
Peter Jaszkowiak
bc1d70c126 ESlint comma-dangle 2017-02-17 19:31:21 -07:00