Skip to content

Commit

Permalink
取得されたDMが message_create イベントであるかチェックする
Browse files Browse the repository at this point in the history
Fixes: 2c8e0d8 ("/direct_messages/events/list.json によるDMの取得に対応")
  • Loading branch information
upsilon committed Aug 18, 2018
1 parent f2bfd6d commit d3a7359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenTween/Twitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,10 @@ public async Task GetDirectMessageEvents(bool read)
}
while (cursor != null);

var events = eventLists.SelectMany(x => x.Events).ToArray();
var events = eventLists.SelectMany(x => x.Events)
.Where(x => x.Type == "message_create")
.ToArray();

if (events.Length == 0)
return;

Expand Down

0 comments on commit d3a7359

Please sign in to comment.