Skip to content

Instantly share code, notes, and snippets.

@gregblake
Created September 17, 2020 14:38
Show Gist options
  • Save gregblake/788932b74e9d3fe2dd17c035e8fa4cdc to your computer and use it in GitHub Desktop.
Save gregblake/788932b74e9d3fe2dd17c035e8fa4cdc to your computer and use it in GitHub Desktop.
Unread key on the state endpoint
[3] pry(main)> Connect::Notification.summary_for(effective_user)
=> {:reactions=>0,
:users=>{2=>19, 618=>17},
:rooms=>
{138=>{:messages=>10, :mentions=>0, :mentions_direct=>0, :mentions_all=>0},
1976=>{:messages=>1, :mentions=>1, :mentions_direct=>1, :mentions_all=>0},
10278=>{:messages=>3, :mentions=>3, :mentions_direct=>2, :mentions_all=>1},
10783=>{:messages=>23, :mentions=>0, :mentions_direct=>0, :mentions_all=>0},
19319=>{:messages=>148, :mentions=>5, :mentions_direct=>0, :mentions_all=>5},
23514=>{:messages=>130, :mentions=>13, :mentions_direct=>0, :mentions_all=>13},
40980=>{:messages=>1, :mentions=>1, :mentions_direct=>1, :mentions_all=>0},
48183=>{:messages=>14, :mentions=>0, :mentions_direct=>0, :mentions_all=>0},
49344=>{:messages=>4, :mentions=>1, :mentions_direct=>1, :mentions_all=>0},
49347=>{:messages=>1, :mentions=>1, :mentions_direct=>0, :mentions_all=>1},
49352=>{:messages=>8, :mentions=>8, :mentions_direct=>8, :mentions_all=>0},
590=>{:messages=>5, :mentions=>5, :mentions_direct=>5, :mentions_all=>0}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment