Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notificação "Oi" em massa #34

Open
MateusONunes opened this issue Mar 16, 2022 · 0 comments
Open

Notificação "Oi" em massa #34

MateusONunes opened this issue Mar 16, 2022 · 0 comments

Comments

@MateusONunes
Copy link
Contributor

hermes_monitor._checkNotify

        select mm.id, mm.res_id, mm.body, mm.author_id
          from hermes_token ht,
               mail_channel_partner mcp left join hermes_monitor hm 
                                               on (hm.partner_id = mcp.partner_id and hm.channel_id = mcp.channel_id),
               mail_message mm 
         where mcp.partner_id = ht.partner_id
           and mm.id > ht.idlastmessage /*consider from the moment the token loaded*/
           and mm.res_id = mcp.channel_id
           and mm.author_id <> mcp.partner_id /*disregard the author of the message*/
           and mm.id > greatest(coalesce(hm.idlastmessage, 0), coalesce(hm.idlastnotify, 0))
           and mm.message_type = 'comment'
        order by hm.partner_id, mm.id

select * from mail_message mm where mm.id = 191 -- Mensagem que ficou em loop

Captura de tela de 2022-03-16 16-38-41
4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant