Closed (outdated)
Project:
Tapatio
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
15 Sep 2009 at 06:30 UTC
Updated:
13 Feb 2020 at 10:16 UTC
Jump to comment: Most recent
The function comms_get_twitter_group_direct_messages() is written, but is not used by the comms module at all. This is a useful feature that will extend the use cases and privacy for savy users, where savy is defined by being able to send DM.
Comments
Comment #1
marlon0 commentedComment #2
marlon0 commentedSome thoughts on this, for my own notes and in case anyone else has input:
Currently all twitter users are imported into drupal based on being a follower of a group's twitter user, so the drupal user already exists by the time tapatio imports their tweets.
When importing tweets from a group's direct-reply stream, the twitter user very likely doesn't already exist as a drupal user.
Therefore, it seems like for each tweet in the direct-reply stream, we'll need to check if the twitter user exists in drupal, and create them if not.
Comment #3
marlon0 commentedWhat if a user if following a group and then tweets at that group? We don't want to import the same message 2 times (once in the DM importing function, once in the followers importing function).
comms_get_twitter_group_direct messages should add each user in the DM list if nonexistent and also update that user's comms_twitterfrommsgmaxid (if it's lower than the current message).
THEN comms_get_twitter_tweets can run, and it will skip past any messages already pulled in via DM.
Comment #4
evoltech commentedThis is a good question and it depends on which code path is taken.
There are two ways the tapatio module can get tweets from followers, one is by pulling them out of the TwitterAPI getStatus method and the other is via the getTweets method from the TwitterSearchAPI (our extension of the TwitterAPI that allows querying search.twitter.com).
I have been neglecting the first path above in the development branch, and I am not sure where in the resulting data structure direct messages are.
If the second path is used however, the dm won't show up in the results from the search api. We could maybe ignore the twitter message id in the case of a direct message?
What do you think? Does this make sense?
Comment #5
marlon0 commentedI'm not sure I understand when you say "the dm won't show up in the results from the search api" - are you saying TwitterSearchAPI can't retrieve direct messages?
Maybe the solution is to alter comms_get_twitter_tweets to simply disregard any DMs it gets, because any relevant DMs will be imported by comms_get_twitter_group_direct_messages.
Comment #6
evoltech commentedYes I mean that search.twitter.com will not show direct messages.
I think comms_get_twitter_tweets() should call comms_get_twitter_group_direct_messages().
Comment #7
avpadernoI am closing this issue, since it's for a Drupal version no longer supported.