rrbrambley / MessageBeast-ObjC

A library for building Message-based apps on App.net
MIT License
6 stars 0 forks source link

Find way to make client apps call proper sendAllUnsent method #36

Open rrbrambley opened 10 years ago

rrbrambley commented 10 years ago

AATTMessageManager has a sendAllUnsent... method that should only be used when

  1. the specified channel is not an action channel, or
  2. the action messages in the specified action channel do not correspond to unsent target messages.

So, there is actually a method in AATTActionMessageManager that can be used to send unsent messages in action channels, and it does the right thing – only sends the messages if their target messages have been sent already. However, there is nothing preventing client apps from using the method in AATTMessageManager instead of this one.

In the Android version of this library, an exception is thrown if the MessageManager method is used for action channels, and then there is a package-visible method that the ActionMessageManager can access on the MessageManager when it needs to force sending in other scenarios. However, Objective-C doesn't really support this same thing.

Do something.